login
A034822
Numbers k such that there are no palindromic squares of length k.
12
2, 4, 8, 10, 14, 18, 20, 24, 30, 38, 40, 46, 54, 56, 62, 64
OFFSET
1,1
COMMENTS
All terms are even since (10^k+1)^2 is a palindrome of length 2*k+1. - Chai Wah Wu, Jun 14 2024
REFERENCES
Elena Deza and Michel Marie Deza, Figurate numbers, World Scientific Publishing (2012), page 279.
LINKS
Eric Weisstein's World of Mathematics, Palindromic Number
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base,hard,more
AUTHOR
Patrick De Geest, Oct 15 1998
EXTENSIONS
Two more terms from Patrick De Geest, Apr 01 2002
a(12)-a(16) from A263618 added by Max Alekseyev, Jun 03 2026
STATUS
approved