OFFSET
1,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..4107 (first 996 terms from N. J. A. Sloane).
MAPLE
# Let b280864 contain a list of the terms of A280864
a:=[];
for n from 1 to 500 do
if member(n^2, b280864, 'p') then a:=[op(a), p]; else \
lprint("error", n); break; fi; od:
a;
MATHEMATICA
nn = 3600; c[_] := False; m[_] := 1;
Set[{i, j, s, t, c[1], c[2]}, {1, 2, {}, {2}, True, True}];
s = Sort[{{1, 1}}~Join~Reap[Do[
r = Times @@ Select[t, FreeQ[s, #] &];
v = Times @@ Intersection[s, t];
k = m[r]; While[Or[c[#], ! CoprimeQ[v, #]] &[k*r], k++]; k *= r;
Set[{c[k], i, j, s, t}, {True, j, k, t, FactorInteger[k][[All, 1]]}];
If[k == u, While[c[u], u++]]; While[c[r*m[r]], m[r]++];
If[IntegerQ@ Sqrt[k], Sow[{Sqrt[k], n}]], {n, 3, nn}] ][[-1, 1]] ];
s[[;; #, -1]] &@ LengthWhile[Differences@ s[[;; , 1]], # == 1 &] (* Michael De Vlieger, Apr 11 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 14 2017
STATUS
approved
