cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A356417 Numbers whose reversal is a square.

This page as a plain text file.
%I A356417 #43 Aug 07 2022 12:59:43
%S A356417 0,1,4,9,10,18,40,46,52,61,63,90,94,100,121,144,148,163,169,180,400,
%T A356417 423,441,460,484,487,520,522,526,610,630,652,675,676,691,900,925,927,
%U A356417 940,961,982,1000,1042,1062,1089,1210,1251,1273,1297,1405,1426,1440,1480
%N A356417 Numbers whose reversal is a square.
%C A356417 Every power of 10 is a term in the sequence.
%C A356417 If k is in the sequence then so is 10*k. - _David A. Corneth_, Aug 06 2022
%C A356417 If all multiples of 10 were omitted, A074896 would result. - _Jon E. Schoenfield_, Aug 06 2022
%e A356417 0 is a term, 0 -> 0 (0^2).
%e A356417 10 is a term, 10 -> 01 (leading zero is dropped) (1^2).
%e A356417 691 is a term, 691 -> 196 (14^2).
%e A356417 1800 is a term, 1800 -> 0081 (leading zeros are dropped) (9^2).
%t A356417 Select[Range[0, 1500], IntegerQ[Sqrt[IntegerReverse[#]]] &] (* _Amiram Eldar_, Aug 06 2022 *)
%o A356417 (Python)
%o A356417 from sympy import integer_nthroot
%o A356417 def ok(n):
%o A356417     return integer_nthroot(int(str(n)[::-1]), 2)[1]
%o A356417 print([k for k in range(1500) if ok(k)])
%o A356417 (Python)
%o A356417 from math import isqrt
%o A356417 from itertools import count, islice
%o A356417 def A356417_gen(): # generator of terms
%o A356417     yield 0
%o A356417     for l in count(1):
%o A356417         nlist = []
%o A356417         for m in range(1,isqrt(10**l)+1):
%o A356417             if m%10:
%o A356417                 s = str(m**2)
%o A356417                 nlist.append(int(s[::-1])*10**(l-len(s)))
%o A356417         yield from sorted(nlist)
%o A356417 A356417_list = list(islice(A356417_gen(),100)) # _Chai Wah Wu_, Aug 07 2022
%o A356417 (PARI) isok(k) = issquare(fromdigits(Vecrev(digits(k)))); \\ _Michel Marcus_, Aug 06 2022
%Y A356417 Cf. A002942, A004086, A074896.
%K A356417 nonn,base
%O A356417 1,3
%A A356417 _Daniel Blam_, Aug 06 2022