login
Squares which repeat with at least two full periods when written in base 4.
1

%I #5 Aug 01 2018 10:28:15

%S 6241,378225,672400,1320201,28121809,302794801,386554921,1211179204,

%T 7681646025,73073443041,79698371481,91424593225,120297291921,

%U 292293772164,318793485924,657660987369,1521820771641,18145972716481,72583890865924,163313754448329

%N Squares which repeat with at least two full periods when written in base 4.

%H Giovanni Resta, <a href="/A071130/b071130.txt">Table of n, a(n) for n = 1..80</a> (terms < 4^38)

%e 79^2 = 6241 = 120|120|1 in base 4.

%e 615^2 = 378225 = 11301|11301 in base 4.

%t psq[b_, nd_] := Block[{sq={}, r, x}, Do[r = Mod[nd, p]; Do[x = (b^( Floor[nd/p] p) - 1)/(b^p - 1) t b^r + Floor[t/b^(p - r)]; If[ IntegerQ@ Sqrt@ x, AppendTo[ sq, x]], {t, b^(p - 1), b^p - 1}], {p, nd/2}]; sq]; Union @@ (psq[4, #] & /@ Range[16]) (* _Giovanni Resta_, Aug 01 2018 *)

%Y Cf. A071128 (base 2) - A071135 (base 9), A069919 (base 10).

%K base,nonn

%O 1,1

%A _Erich Friedman_, May 28 2002

%E a(16)-a(20) from _Giovanni Resta_, Aug 01 2018