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.

A227692 Smaller of two consecutive squares which are anagrams (permutations) of each other.

This page as a plain text file.
%I A227692 #34 Feb 18 2024 13:20:25
%S A227692 169,24649,833569,20367169,214534609,368678401,372142681,392554969,
%T A227692 407676481,771617284,1013021584,1212780625,1404075841,1567051396,
%U A227692 1623848209,2538748996,2866103296,2898960964,3015437569,3967236196,4098688441,4937451289,5854239169
%N A227692 Smaller of two consecutive squares which are anagrams (permutations) of each other.
%C A227692 Given the n-th square, it is occasionally possible to form the (n+1)-th square using the same digits in a different order.
%C A227692 "Anagram" means that both squares must not only use the same digits but must use each digit the same number of times.
%H A227692 Michael S. Branicky, <a href="/A227692/b227692.txt">Table of n, a(n) for n = 1..10000</a>
%e A227692 169 and 196 are two successive squares.
%p A227692 with(numtheory):for n from 1 to 80000 do:p1:=n^2:p2:= (n+1)^2:pp1:=convert(p1,base,10): pp2:=convert(p2,base,10):n1:=sort(pp1):n2:=sort(pp2): if n1=n2 then printf(`%d, `,p1):else fi:od:
%t A227692 lst = {}; k = 1; s = t = 0; ss = {0}; While[k < 155001, s = t; t += k; st = Sort@IntegerDigits@ t; If[ss == st, AppendTo[lst, s]]; ss = st; k += 2]; lst (* _Robert G. Wilson v_, Oct 24 2014 *)
%o A227692 (Python)
%o A227692 from itertools import count, islice
%o A227692 def agen(): # generator of terms
%o A227692     ip, sp, hp = 0, 0, "0"
%o A227692     for i in count(1):
%o A227692         s = i*i
%o A227692         h = "".join(sorted(str(s)))
%o A227692         if h == hp: yield sp
%o A227692         ip, sp, hp = i, s, h
%o A227692 print(list(islice(agen(), 23))) # _Michael S. Branicky_, Feb 18 2024
%Y A227692 Cf. A069567, A247305.
%K A227692 nonn,base
%O A227692 1,1
%A A227692 _Michel Lagneau_, Aug 12 2013