The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A034822 Numbers n such that there are no palindromic squares of length n. 11

%I #18 Feb 05 2021 00:21:24

%S 2,4,8,10,14,18,20,24,30,38,40

%N Numbers n such that there are no palindromic squares of length n.

%H Patrick De Geest, <a href="http://www.worldofnumbers.com/square.htm">Palindromic Squares</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PalindromicNumber.html">Palindromic Number</a>

%t A034822[n_] := Select[Range[Ceiling[Sqrt[10^(n - 1)]], Floor[Sqrt[10^n]]], #^2 == IntegerReverse[#^2] &];

%t Select[Range[12], Length[A034822[#]] == 0 &] (* _Robert Price_, Apr 23 2019 *)

%o (Python)

%o from sympy import integer_nthroot as iroot

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

%o def ok(n):

%o for r in range(iroot(10**(n-1), 2)[0] + 1, iroot(10**n, 2)[0]):

%o if ispal(r*r): return False

%o return True

%o print([m for m in range(1, 16) if ok(m)]) # _Michael S. Branicky_, Feb 04 2021

%Y Cf. A002778, A002779, A034307.

%K nonn,base,hard,more

%O 1,1

%A _Patrick De Geest_, Oct 15 1998

%E Two more terms from _Patrick De Geest_, Apr 01 2002

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 May 22 18:14 EDT 2024. Contains 372758 sequences. (Running on oeis4.)