login
A034902
a(i) is a square mod a(j), i <> j; a(n) prime; a(1) = 2.
2
2, 7, 113, 233, 337, 2129, 3833, 8737, 19553, 46337, 72689, 103681, 361649, 449689, 477017, 668273, 3095353, 7212577, 13188281, 26340857, 46012633, 246116833, 330177017, 354681097, 1014496289, 1315295809, 2269762961, 4651240801, 14947292497
OFFSET
1,1
MATHEMATICA
a[1] = 2; squareModQ[p_, q_] := (For[k=0, k <= q, k++, If[Mod[p-k^2, q] == 0, Return[True]]]; Return[False]); a[n_] := a[n] = For[r=NextPrime[a[n-1]], True, r=NextPrime[r], If[And @@ (squareModQ[r, #] && squareModQ[#, r] & /@ Array[a, n-1]), Return[r]]]; Table[Print[a[n]]; a[n], {n, 1, 10}] (* Jean-François Alcover, Dec 10 2014 *)
PROG
(PARI) isok(newp, v, n) = {for (k=1, n, if (!issquare(Mod(newp, v[k])) || !issquare(Mod(v[k], newp)), return (0)); ); return (1); }
lista(nn) = {my(v=vector(nn), lastp=2); v[1] = lastp; for (n=2, nn, my(newp = nextprime(lastp+1)); while (! isok(newp, v, n-1), newp = nextprime(newp+1)); v[n] = newp; lastp = newp; ); v; } \\ Michel Marcus, Sep 25 2020
CROSSREFS
Sequence in context: A264999 A326940 A326964 * A101429 A270749 A206151
KEYWORD
nonn,nice,more
EXTENSIONS
a(24)-a(29) from Sean A. Irvine, Sep 20 2020
Name edited by Michel Marcus, Sep 24 2020
STATUS
approved