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!)
A356417 Numbers whose reversal is a square. 0

%I #43 Aug 07 2022 12:59:43

%S 0,1,4,9,10,18,40,46,52,61,63,90,94,100,121,144,148,163,169,180,400,

%T 423,441,460,484,487,520,522,526,610,630,652,675,676,691,900,925,927,

%U 940,961,982,1000,1042,1062,1089,1210,1251,1273,1297,1405,1426,1440,1480

%N Numbers whose reversal is a square.

%C Every power of 10 is a term in the sequence.

%C If k is in the sequence then so is 10*k. - _David A. Corneth_, Aug 06 2022

%C If all multiples of 10 were omitted, A074896 would result. - _Jon E. Schoenfield_, Aug 06 2022

%e 0 is a term, 0 -> 0 (0^2).

%e 10 is a term, 10 -> 01 (leading zero is dropped) (1^2).

%e 691 is a term, 691 -> 196 (14^2).

%e 1800 is a term, 1800 -> 0081 (leading zeros are dropped) (9^2).

%t Select[Range[0, 1500], IntegerQ[Sqrt[IntegerReverse[#]]] &] (* _Amiram Eldar_, Aug 06 2022 *)

%o (Python)

%o from sympy import integer_nthroot

%o def ok(n):

%o return integer_nthroot(int(str(n)[::-1]), 2)[1]

%o print([k for k in range(1500) if ok(k)])

%o (Python)

%o from math import isqrt

%o from itertools import count, islice

%o def A356417_gen(): # generator of terms

%o yield 0

%o for l in count(1):

%o nlist = []

%o for m in range(1,isqrt(10**l)+1):

%o if m%10:

%o s = str(m**2)

%o nlist.append(int(s[::-1])*10**(l-len(s)))

%o yield from sorted(nlist)

%o A356417_list = list(islice(A356417_gen(),100)) # _Chai Wah Wu_, Aug 07 2022

%o (PARI) isok(k) = issquare(fromdigits(Vecrev(digits(k)))); \\ _Michel Marcus_, Aug 06 2022

%Y Cf. A002942, A004086, A074896.

%K nonn,base

%O 1,3

%A _Daniel Blam_, Aug 06 2022

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 June 30 04:58 EDT 2024. Contains 373861 sequences. (Running on oeis4.)