OFFSET
1,1
COMMENTS
FORMULA
a(n) = sqrt(A135780(n)).
EXAMPLE
a(1) = 12 since 12^2 = 144 is the least square such that a cyclic permutation of its decimal digits is again a square, namely 441 = 21^2. See A135780 for more explanations.
PROG
(PARI) for(n=1, 10^8, (t=n^2)/* %10 || next <= this would exclude terms with trailing '0's */; found=0; for(j=1, k=#Str(t)-1, t=divrem(t, 10); t[2] || (t=t[1]) && next /* <= this excludes leading '0's */; issquare(t=t[1]+10^k*t[2]) || next; /* t%10 || next; <= would exclude permutations with trailing '0's */ print1( if(found, "<<<"/* mark multiple permutations: this never happens */, found=1; n)", ")))
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
M. F. Hasler, following ideas from David W. Wilson, Jan 31 2008
STATUS
approved