|
|
A034822
|
|
Numbers n such that there are no palindromic squares of length n.
|
|
11
|
|
|
2, 4, 8, 10, 14, 18, 20, 24, 30, 38, 40
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
MATHEMATICA
|
A034822[n_] := Select[Range[Ceiling[Sqrt[10^(n - 1)]], Floor[Sqrt[10^n]]], #^2 == IntegerReverse[#^2] &];
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,hard,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|