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.
%I A178028 #16 Feb 20 2023 06:13:43 %S A178028 1,2,3,9,27,33,99,123,271,333,351,407,429,481,693,777,819,999,2151, %T A178028 3333,4521,7227,7373,9999,33333,81819,99999,194841,326733,333333, %U A178028 340067,366337,369963,386139,389961,437229,534391,623763,706293,762377,863247 %N A178028 Numbers n dividing every cyclic permutation of n^2. %e A178028 123 is a member as all the five cyclic permutations of 123^2 are : %e A178028 {15129, 51291, 12915, 29151, 91512}; %e A178028 15129 = 123*123 ; %e A178028 51291 = 123*417 ; %e A178028 12915 = 123*105 ; %e A178028 29151 = 123*237 ; %e A178028 91512 = 123*744. %p A178028 with(numtheory):for n from 1 to 100000 do:n0:=n^2:l:=length(n0) :ind:=0:for j %p A178028 from 1 to l do:s:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v %p A178028 :s:=s+ u*10^m:od:s:=floor(s-u*10^l+u):if irem(s, n)=0 then ind:=ind+1:n0:=s:else %p A178028 fi: od:if ind=l then printf(`%d, `, n):else fi: od: %t A178028 Select[Range[900000],And@@Divisible[FromDigits/@Table[ RotateRight[ IntegerDigits[ #^2], n],{n,IntegerLength[#^2]}],#]&] (* _Harvey P. Dale_, Jul 31 2013 *) %o A178028 (Sage) %o A178028 def cycle(x): return (cp(x) for cp in CyclicPermutationGroup(len(x))) %o A178028 is_A178028 = lambda n: all(n.divides(Integer(cx,base=10)) for cx in cycle(str(n**2))) # _D. S. McNeil_, Jan 08 2011 %Y A178028 Cf. A177950, A177928. %K A178028 nonn,base %O A178028 1,2 %A A178028 _Michel Lagneau_, May 17 2010