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!)
A033294 Squares which when written backwards remain square (final 0's excluded). 7

%I #34 Jun 07 2023 04:44:13

%S 1,4,9,121,144,169,441,484,676,961,1089,9801,10201,10404,10609,12321,

%T 12544,12769,14641,14884,40401,40804,44521,44944,48841,69696,90601,

%U 94249,96721,698896,1002001,1004004,1006009,1022121,1024144,1026169

%N Squares which when written backwards remain square (final 0's excluded).

%C Of this sequence's first 10000 terms, only nine have an even number of digits; see A354256.

%H Jon E. Schoenfield, <a href="/A033294/b033294.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Reinhard Zumkeller)

%H <a href="/index/Sq#sqrev">Index entry for sequences related to reversing digits of squares</a>

%e 144 = 12 * 12 is a term because 441 = 21 * 21.

%t Select[Range[1100]^2,Mod[#,10]!=0&&IntegerQ[Sqrt[FromDigits[Reverse[ IntegerDigits[ #]]]]]&] (* _Harvey P. Dale_, Oct 28 2013 *)

%o (Haskell)

%o a033294 n = a033294_list !! (n-1)

%o a033294_list = filter chi a000290_list where

%o chi m = m `mod` 10 > 0 && head ds `elem` [1,4,5,6,9] &&

%o a010052 (foldl (\v d -> 10 * v + d) 0 ds) == 1 where

%o ds = unfoldr

%o (\x -> if x == 0 then Nothing else Just $ swap $ divMod x 10) m

%o -- _Reinhard Zumkeller_, Jan 19 2012

%o (Python)

%o from math import isqrt

%o from itertools import count, islice

%o def sqr(n): return isqrt(n)**2 == n

%o def agen():

%o yield from (k*k for k in count(1) if k%10 and sqr(int(str(k*k)[::-1])))

%o print(list(islice(agen(), 36))) # _Michael S. Branicky_, May 21 2022

%Y Subsequence of A115690.

%Y Cf. A007488, A007500, A061457, A354256.

%K base,nonn

%O 1,2

%A _Jeff Burch_

%E More terms from _Erich Friedman_

%E Initial 0 removed and offset changed by _Reinhard Zumkeller_, Jan 19 2012

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 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)