A043041 Base-10 palindromes that start with 6.
6, 66, 606, 616, 626, 636, 646, 656, 666, 676, 686, 696, 6006, 6116, 6226, 6336, 6446, 6556, 6666, 6776, 6886, 6996, 60006, 60106, 60206, 60306, 60406, 60506, 60606, 60706, 60806, 60906, 61016, 61116, 61216, 61316, 61416, 61516, 61616, 61716, 61816, 61916, 62026
Offset: 1
Links
- Jaroslav Krizek and David A. Corneth, Table of n, a(n) for n = 1..10000 (first 2222 terms from Jaroslav Krizek)
Programs
-
Mathematica
palQ[n_Integer, base_Integer] := Module[{idn = IntegerDigits[n, base]}, idn == Reverse[idn]]; Select[Range[0, 100000], IntegerDigits[#][[1]] == 6 && palQ[#, 10] &] (* T. D. Noe, Mar 12 2013 *) Select[Flatten[Table[Range[6*10^n,7*10^n-1],{n,0,4}]],PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 25 2017 *)
-
PARI
nxt2113(n)={my(d=digits(n)); i=(#d+1)\2; while(i&&d[i]==9, d[i]=0; d[#d+1-i]=0; i--); if(i, d[i]++; d[#d+1-i]=d[i], d=vector(#d+1); d[1]=d[#d]=1); d} nxt(n) = my(d = nxt2113(n)); if(d[1]==6, fromdigits(d), 6*(10^#d+1)) print1(a = 6, ", "); for (n=1, 30, print1(a = nxt(a), ", ")) \\ David A. Corneth, Jun 25 2017
Formula
a(n) = A002113(k) iff k starts with 7 or 16. - David A. Corneth, Jun 25 2017