login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A307790 Number of palindromic heptagonal numbers with exactly n digits. 2
3, 1, 1, 2, 1, 1, 3, 0, 0, 1, 4, 3, 2, 0, 1, 0, 1, 1, 2, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Number of terms in A054910 with exactly n digits.

LINKS

Table of n, a(n) for n=1..22.

G. J. Simmons, Palindromic powers, J. Rec. Math., 3 (No. 2, 1970), 93-98. [Annotated scanned copy] See page 95.

EXAMPLE

There are only two 4-digit heptagonal numbers that are palindromic, 3553 and 4774. Thus, a(4)=2.

MATHEMATICA

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}]

PROG

(Python)

def afind(terms):

  m, n, c = 0, 1, 0

  while n <= terms:

    p = m*(5*m-3)//2

    s = str(p)

    if len(s) == n:

       if s == s[::-1]: c += 1

    else:

      print(c, end=", ")

      n, c = n+1, int(s == s[::-1])

    m += 1

afind(14) # Michael S. Branicky, Mar 01 2021

CROSSREFS

Cf. A000566, A054910, A054971, A059869, A307765, A307766.

Sequence in context: A089762 A257567 A318440 * A189965 A258820 A030347

Adjacent sequences:  A307787 A307788 A307789 * A307791 A307792 A307793

KEYWORD

nonn,base,more

AUTHOR

Robert Price, Apr 28 2019

EXTENSIONS

a(20)-a(22) from Michael S. Branicky, Mar 01 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 2 23:51 EDT 2022. Contains 357230 sequences. (Running on oeis4.)