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!)
A082721 There exist no palindromic hexagonals of length n. 6

%I #17 Mar 08 2021 22:27:34

%S 3,8,9,12,22,24,27,30,36,38,40

%N There exist no palindromic hexagonals of length n.

%H P. De Geest, <a href="http://www.worldofnumbers.com/hexa.htm">Palindromic hexagonals</a>

%t A054969 = {0, 1, 6, 66, 3003, 5995, 15051, 66066, 617716, 828828, 1269621, 1680861, 5073705, 5676765, 1264114621, 5289009825, 6172882716, 13953435931, 1313207023131, 5250178710525, 6874200024786, 61728399382716, 602224464422206, 636188414881636, 1250444114440521, 16588189498188561, 58183932923938185, 66056806460865066, 67898244444289876, 514816979979618415, 3075488771778845703, 6364000440440004636, 15199896744769899151};

%t A082721[n_] := Length[Select[A054969, IntegerLength[#] == n || (n == 1 && # == 0) &]];

%t Select[Range[19], A082721[#] == 0 &] (* _Robert Price_, Apr 27 2019 *)

%o (Python)

%o def ispal(n): s = str(n); return s == s[::-1]

%o def hexpals(limit):

%o yield from (k*(2*k-1) for k in range(limit+1) if ispal(k*(2*k-1)))

%o def aupto(limit):

%o lengths = set(range(1, limit+1))

%o for h in hexpals(10**limit):

%o if len(lengths) == 0: return

%o lh, minlen = len(str(h)), min(lengths)

%o if lh > minlen: print(minlen, "in A082721"); lengths.discard(minlen)

%o if lh in lengths: lengths.discard(lh); print("... discarding", lh)

%o aupto(14) # _Michael S. Branicky_, Mar 08 2021

%Y Cf. A034822, A054969, A059868, A059869, A059870, A082722, A034307.

%K nonn,base,hard,more

%O 1,1

%A _Patrick De Geest_, Apr 13 2003

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 April 20 00:03 EDT 2024. Contains 371798 sequences. (Running on oeis4.)