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.

A045877 Rotating digits of a(n)^2 right once still yields a square.

This page as a plain text file.
%I A045877 #23 Feb 16 2025 08:32:38
%S A045877 1,2,3,16,21,31,129,221,247,258,1062,1593,1964,2221,13516,17287,18516,
%T A045877 19821,22221,28064,29631,103764,182362,222221,273543,1246713,1509437,
%U A045877 1635219,1856538,2222221,2253804,2749249,2784807,11619096,11949507
%N A045877 Rotating digits of a(n)^2 right once still yields a square.
%C A045877 Squares resulting in leading zeros excluded.
%C A045877 (2*10^k-11)/9 are terms, i.e. A165402 is a subsequence. - _Chai Wah Wu_, Apr 23 2022
%H A045877 Chai Wah Wu, <a href="/A045877/b045877.txt">Table of n, a(n) for n = 1..1838</a>
%H A045877 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SquareNumber.html">Square Number</a>
%e A045877 13516^2 = 18268225{6} -> {6}18268225 = 24865^2.
%o A045877 (Python)
%o A045877 from itertools import count, islice
%o A045877 from sympy.solvers.diophantine.diophantine import diop_DN
%o A045877 def A045877_gen(): # generator of terms
%o A045877     for l in count(0):
%o A045877         l1, l2 = 10**(l+1), 10**l
%o A045877         yield from sorted(set(abs(x) for z in (diop_DN(10,m*(1-l1)) for m in range(10)) for x, y in z if l1 >= x**2 >= l2))
%o A045877 A045877_list = list(islice(A045877_gen(),30)) # _Chai Wah Wu_, Apr 23 2022
%Y A045877 Cf. A000290, A045878, A035126, A035128, A165402.
%K A045877 nonn,base
%O A045877 1,2
%A A045877 _Erich Friedman_
%E A045877 More terms from _Patrick De Geest_, Nov 15 1998