cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A043041 Base-10 palindromes that start with 6.

This page as a plain text file.
%I A043041 #36 Aug 22 2021 14:55:49
%S A043041 6,66,606,616,626,636,646,656,666,676,686,696,6006,6116,6226,6336,
%T A043041 6446,6556,6666,6776,6886,6996,60006,60106,60206,60306,60406,60506,
%U A043041 60606,60706,60806,60906,61016,61116,61216,61316,61416,61516,61616,61716,61816,61916,62026
%N A043041 Base-10 palindromes that start with 6.
%H A043041 Jaroslav Krizek and David A. Corneth, <a href="/A043041/b043041.txt">Table of n, a(n) for n = 1..10000</a> (first 2222 terms from Jaroslav Krizek)
%F A043041 a(n) = A002113(k) iff k starts with 7 or 16. - _David A. Corneth_, Jun 25 2017
%t A043041 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 *)
%t A043041 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 *)
%o A043041 (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}
%o A043041 nxt(n) = my(d = nxt2113(n)); if(d[1]==6, fromdigits(d), 6*(10^#d+1))
%o A043041 print1(a = 6, ", "); for (n=1, 30, print1(a = nxt(a), ", ")) \\ _David A. Corneth_, Jun 25 2017
%Y A043041 Intersection of A002113 and A217399.
%K A043041 nonn,base,easy
%O A043041 1,1
%A A043041 _Clark Kimberling_