Palindromic {Zseq} | R Documentation |
Palindromic numbers
Description
Under OEIS A002113, a Palindromic number is a number that
remains the same when its digits are reversed. First 6 Palindromic numbers in decimal are 0, 1, 2, 3, 4, 5.
This function supports various base by specifying the parameter base
but returns are still represented in decimal.
Usage
Palindromic(n, base = 10, gmp = TRUE)
Arguments
n |
the number of first |
base |
choice of base. |
gmp |
a logical; |
Value
a vector of length n
containing first entries from the sequence.
Examples
## generate first 30 palindromic number in decimal
print(Palindromic(30))
[Package Zseq version 0.2.1 Index]