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.

Showing 1-7 of 7 results.

A034822 Numbers k such that there are no palindromic squares of length k.

Original entry on oeis.org

2, 4, 8, 10, 14, 18, 20, 24, 30, 38, 40
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

All terms are even since (10^k+1)^2 is a palindrome of length 2*k+1. a(12) >= 46 if it exists (see A263618). - Chai Wah Wu, Jun 14 2024

Crossrefs

Programs

  • Mathematica
    A034822[n_] := Select[Range[Ceiling[Sqrt[10^(n - 1)]], Floor[Sqrt[10^n]]], #^2 == IntegerReverse[#^2] &];
    Select[Range[12], Length[A034822[#]] == 0 &] (* Robert Price, Apr 23 2019 *)
  • Python
    from sympy import integer_nthroot as iroot
    def ispal(n): s = str(n); return s == s[::-1]
    def ok(n):
      for r in range(iroot(10**(n-1), 2)[0] + 1, iroot(10**n, 2)[0]):
        if ispal(r*r): return False
      return True
    print([m for m in range(1, 16) if ok(m)]) # Michael S. Branicky, Feb 04 2021

Extensions

Two more terms from Patrick De Geest, Apr 01 2002

A059868 There exist no palindromic pentagonal numbers of length a(n).

Original entry on oeis.org

3, 9, 11, 12, 24, 30, 32, 33
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Crossrefs

Programs

  • 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};
    A059868[n_] := Length[Select[A002069, IntegerLength[#] == n  || (n == 1 && # == 0) &]];
    Select[Range[18], A059868[#] == 0 &] (* Robert Price, Apr 26 2019 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def penpals(limit):
      for k in range(limit+1):
        if ispal(k*(3*k-1)//2): yield k*(3*k-1)//2
    def aupto(limit):
      lengths = set(range(1, limit+1))
      for p in penpals(10**limit):
        lp, minlen = len(str(p)), min(lengths)
        for li in list(lengths):
          if li < lp: print(li, "in A059868"); lengths.discard(li)
        if lp in lengths: lengths.discard(lp); print("... discarding", lp)
        if len(lengths) == 0: return
    aupto(15) # Michael S. Branicky, Mar 09 2021

Extensions

Name clarified by David A. Corneth, Apr 26 2019
a(6)-a(8) from Bert Dobbelaere, Apr 15 2025

A059869 Numbers k such that there exist no palindromic heptagonals of length k.

Original entry on oeis.org

8, 9, 14, 16, 32
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Crossrefs

Programs

  • Mathematica
    A054910 = {0, 1, 7, 55, 616, 3553, 4774, 60606, 848848, 4615164, 5400045, 6050506, 7165445617, 62786368726, 65331413356, 73665056637, 91120102119, 345546645543, 365139931563, 947927729749, 3646334336463, 7111015101117, 717685292586717, 19480809790808491, 615857222222758516, 1465393008003935641, 8282802468642082828, 15599378333387399551, 20316023422432061302};
    A059869[n_] := Length[Select[A054910, IntegerLength[#] == n || (n == 1 && # == 0) &]];
    Select[Range[19], A059869[#] == 0 &] (* Robert Price, Apr 28 2019 *)

A059870 Numbers n such that there exist no palindromic octagonal numbers of length n.

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 15, 17, 18, 20, 22, 23, 26, 31, 34
Offset: 1

Views

Author

Patrick De Geest, Feb 15 2000

Keywords

Crossrefs

Extensions

a(13)-a(17) from World!Of Numbers link entered by Michel Marcus, Mar 04 2014

A082721 There exist no palindromic hexagonals of length n.

Original entry on oeis.org

3, 8, 9, 12, 22, 24, 27, 30, 36, 38, 40
Offset: 1

Views

Author

Patrick De Geest, Apr 13 2003

Keywords

Crossrefs

Programs

  • Mathematica
    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};
    A082721[n_] := Length[Select[A054969, IntegerLength[#] == n || (n == 1 && # == 0) &]];
    Select[Range[19], A082721[#] == 0 &] (* Robert Price, Apr 27 2019 *)
  • Python
    def ispal(n): s = str(n); return s == s[::-1]
    def hexpals(limit):
      yield from (k*(2*k-1) for k in range(limit+1) if ispal(k*(2*k-1)))
    def aupto(limit):
      lengths = set(range(1, limit+1))
      for h in hexpals(10**limit):
        if len(lengths) == 0: return
        lh, minlen = len(str(h)), min(lengths)
        if lh > minlen: print(minlen, "in A082721"); lengths.discard(minlen)
        if lh in lengths: lengths.discard(lh); print("... discarding", lh)
    aupto(14) # Michael S. Branicky, Mar 08 2021

A082722 Numbers k for which there exist no palindromic 9-gonals (also known as nonagonals or enneagonals) of length k.

Original entry on oeis.org

2, 6, 13, 14, 15, 16, 20, 25, 27, 28, 29, 30, 31, 32
Offset: 1

Views

Author

Patrick De Geest, Apr 13 2003

Keywords

Comments

Previous name was: There exist no palindromic nonagonals (enneagonals) of length n.

Crossrefs

Programs

  • Mathematica
    A082723 = {0, 1, 9, 111, 474, 969, 6666, 18981, 67276, 4411144, 6964696, 15444451, 57966975, 448707844, 460595064, 579696975, 931929139, 994040499, 1227667221, 9698998969, 61556965516, 664248842466, 699030030996, 99451743334715499, 428987160061789824, 950178723327871059, 1757445628265447571, 4404972454542794044, 9433971680861793349, 499583536595635385994, 1637992008558002997361, 19874891310701319847891};
    A082722[n_] := Length[Select[A082723, IntegerLength[#] == n || (n == 1 && # == 0) &]];
    Select[Range[22], A082722[#] == 0 &] (* Robert Price, Apr 29 2019 *)

Extensions

Definition edited by Jon E. Schoenfield, Sep 15 2013

A307717 Number of palindromic squares, k^2, of length n such that k is also palindromic.

Original entry on oeis.org

4, 0, 2, 0, 5, 0, 3, 0, 8, 0, 5, 0, 13, 0, 9, 0, 22, 0, 16, 0, 37, 0, 27, 0, 60, 0, 43, 0, 93, 0, 65, 0, 138, 0, 94, 0, 197, 0, 131, 0, 272, 0, 177, 0, 365, 0, 233, 0, 478, 0, 300, 0, 613, 0, 379, 0, 772, 0, 471, 0, 957, 0, 577, 0, 1170, 0, 698, 0, 1413, 0
Offset: 1

Views

Author

Robert Price, Apr 23 2019

Keywords

Examples

			There are only two palindromic squares of length 3 whose root is also palindromic. 11^2=121 and 22^2=484. Thus, a(3)=2.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[If[n == 1, 0, Ceiling[Sqrt[10^(n - 1)]]], Floor[Sqrt[10^n]]], # == IntegerReverse[#] && #^2 == IntegerReverse[#^2] &]], {n, 15}]

Formula

From Christoph Koutschan, Feb 19 2022: (Start)
a(2n-1) = A218035(n).
a(n) is given by a quasi-polynomial (for a proof, see A218035):
a(1) = 4;
a(2n) = 0;
a(4n+1) = (n^3-3*n^2+11*n+6)/3 (n > 0);
a(4n+3) = (n^3+5*n+12)/6 (n >= 0). (End)

Extensions

a(16)-a(20) from Robert Price, Apr 25 2019
a(21)-a(70) from Giovanni Resta, Apr 28 2019
Showing 1-7 of 7 results.