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.
%I A307752 #22 Apr 15 2025 13:04:41 %S A307752 3,1,0,2,1,1,2,2,0,4,0,0,3,1,1,1,3,2,4,1,3,1,1,0,3,3,2,2,2,0,2,0,0,1, %T A307752 1,1,1,1,1,1 %N A307752 Number of n-digit palindromic pentagonal numbers. %C A307752 Number of n-digit terms in A002069. %H A307752 G. J. Simmons, <a href="/A002778/a002778_2.pdf">Palindromic powers</a>, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy] See page 95. %e A307752 There are only two 4-digit pentagonal number that are palindromic, 1001 and 2882. Thus, a(4)=2. %t A307752 A002069 = {0, 1, 5, 22, 1001, 2882, 15251, 720027, 7081807, 7451547, 26811862, 54177145, 1050660501, 1085885801, 1528888251, 2911771192, 2376574756732, 5792526252975, 5875432345785, 10810300301801, 264571020175462, 5292834004382925, 10808388588380801, 15017579397571051, 76318361016381367, 150621384483126051, 735960334433069537, 1003806742476083001, 1087959810189597801, 2716280733370826172}; %t A307752 Table[Length[Select[A002069, IntegerLength[#] == n || (n == 1 && # == 0) &]], {n, 18}] (* _Robert Price_, Apr 26 2019 *) %o A307752 (Python) %o A307752 def afind(terms): %o A307752 m, n, c = 0, 1, 0 %o A307752 while n <= terms: %o A307752 p = m*(3*m-1)//2 %o A307752 s = str(p) %o A307752 if len(s) == n: %o A307752 if s == s[::-1]: c += 1 %o A307752 else: %o A307752 print(c, end=", ") %o A307752 n, c = n+1, int(s == s[::-1]) %o A307752 m += 1 %o A307752 afind(14) # _Michael S. Branicky_, Mar 01 2021 %Y A307752 Cf. A000326, A002069, A028386, A059868, A263618, A307717. %K A307752 nonn,base,more %O A307752 1,1 %A A307752 _Robert Price_, Apr 26 2019 %E A307752 a(19)-a(22) from _Michael S. Branicky_, Mar 01 2021 %E A307752 a(23)-a(40) from _Bert Dobbelaere_, Apr 15 2025