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.

A307790 Number of palindromic heptagonal numbers with exactly n digits.

This page as a plain text file.
%I A307790 #15 Mar 02 2021 02:10:19
%S A307790 3,1,1,2,1,1,3,0,0,1,4,3,2,0,1,0,1,1,2,2,2,2
%N A307790 Number of palindromic heptagonal numbers with exactly n digits.
%C A307790 Number of terms in A054910 with exactly n digits.
%H A307790 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 A307790 There are only two 4-digit heptagonal numbers that are palindromic, 3553 and 4774. Thus, a(4)=2.
%t A307790 A054910 = {0, 1, 7, 55, 616, 3553, 4774, 60606, 848848, 4615164, 5400045, 6050506, 7165445617, 62786368726, 65331413356, 73665056637, 91120102119, 345546645543, 365139931563, 947927729749, 3646334336463, 7111015101117, 17685292586717, 19480809790808491, 615857222222758516, 1465393008003935641, 8282802468642082828, 15599378333387399551, 20316023422432061302}; Table[Length[Select[A054910, IntegerLength[#] == n || (n == 1 && # == 0) &]], {n, 19}]
%o A307790 (Python)
%o A307790 def afind(terms):
%o A307790   m, n, c = 0, 1, 0
%o A307790   while n <= terms:
%o A307790     p = m*(5*m-3)//2
%o A307790     s = str(p)
%o A307790     if len(s) == n:
%o A307790        if s == s[::-1]: c += 1
%o A307790     else:
%o A307790       print(c, end=", ")
%o A307790       n, c = n+1, int(s == s[::-1])
%o A307790     m += 1
%o A307790 afind(14) # _Michael S. Branicky_, Mar 01 2021
%Y A307790 Cf. A000566, A054910, A054971, A059869, A307765, A307766.
%K A307790 nonn,base,more
%O A307790 1,1
%A A307790 _Robert Price_, Apr 28 2019
%E A307790 a(20)-a(22) from _Michael S. Branicky_, Mar 01 2021