A094048 Let p(n) be the n-th prime congruent to 1 mod 4. Then a(n) = the least m for which m^2+1=p(n)*k^2 has a solution.
2, 18, 4, 70, 6, 32, 182, 29718, 1068, 500, 5604, 10, 8890182, 776, 1744, 113582, 4832118, 1118, 1111225770, 1764132, 14, 1710, 23156, 71011068, 16, 82, 8920484118, 1063532, 2482, 126862368, 352618
Offset: 1
Keywords
Crossrefs
Programs
-
Haskell
a094048 n = head [m | m <- map (a037213 . subtract 1 . (* a002144 n)) (tail a000290_list), m > 0] -- Reinhard Zumkeller, Jun 13 2015
-
Mathematica
f[n_] := Block[{y = 1}, While[ !IntegerQ[ Sqrt[n*y^2 - 1]], y++ ]; Sqrt[n*y^2 - 1]]; lst = {}; Do[p = Prime@ n; If[ Mod[p, 4] == 1, AppendTo[lst, f@p]; Print[{n, Prime@n, f@p}]], {n, 66}]; lst
Extensions
Edited by Don Reble, Apr 30 2004
Comments