A223705 Least number k such that prime(n) is the largest divisor of k^2 + 1, or 0 if there is no such k.
1, 0, 2, 0, 0, 5, 4, 0, 0, 12, 0, 6, 9, 0, 0, 23, 0, 11, 0, 0, 27, 0, 0, 34, 22, 10, 0, 0, 33, 15, 0, 0, 37, 0, 44, 0, 28, 0, 0, 80, 0, 19, 0, 81, 14, 0, 0, 0, 0, 107, 89, 0, 64, 0, 16, 0, 82, 0, 60, 53, 0, 138, 0, 0, 25, 114, 0, 148, 0, 136, 42, 0, 0, 104, 0, 0
Offset: 1
Keywords
Programs
-
Mathematica
nn = 100; t = Table[0, {nn}]; Do[If[Mod[Prime[n], 4] == 3, t[[n]] = -1], {n, nn}]; n = 0; While[Times @@ t == 0, n++; s = FactorInteger[n^2 + 1][[-1, 1]]; p = PrimePi[s]; If[p <= nn && t[[p]] == 0, t[[p]] = n]]; Do[If[Mod[Prime[n], 4] == 3, t[[n]] = 0], {n, nn}]; t
Comments