
Last chance! 50% off unlimited learning
Sale ends in
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.
Palindromic(n, base = 10, Rmpfr = TRUE, PrecisionBits = 496)
the number of first n
entries from the sequence.
choice of base.
a logical; TRUE
to use large number representation, FALSE
otherwise.
a positive integer for precision bits larger than 2.
a vector of length n
containing first entries from the sequence.
# NOT RUN {
## generate first 30 palindromic number in decimal
first30 = Palindromic(30)
## print without trailing 0's.
print(first30, drop0trailing = TRUE)
# }
Run the code above in your browser using DataLab