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!)
A307752 Number of n-digit palindromic pentagonal numbers. 2
3, 1, 0, 2, 1, 1, 2, 2, 0, 4, 0, 0, 3, 1, 1, 1, 3, 2, 4, 1, 3, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Number of n-digit terms in A002069.
LINKS
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 pentagonal number that are palindromic, 1001 and 2882. Thus, a(4)=2.
MATHEMATICA
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};
Table[Length[Select[A002069, IntegerLength[#] == n || (n == 1 && # == 0) &]], {n, 18}] (* Robert Price, Apr 26 2019 *)
PROG
(Python)
def afind(terms):
m, n, c = 0, 1, 0
while n <= terms:
p = m*(3*m-1)//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
Sequence in context: A166408 A327077 A284826 * A101548 A117430 A354795
KEYWORD
nonn,base,more
AUTHOR
Robert Price, Apr 26 2019
EXTENSIONS
a(19)-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 August 26 23:42 EDT 2024. Contains 375462 sequences. (Running on oeis4.)