login
A242046
Least integer k > n + 1 such that n^2 + (n + 1)^2 + k^2 is prime.
1
2, 6, 4, 6, 24, 14, 8, 12, 16, 24, 24, 14, 14, 24, 16, 20, 42, 20, 26, 54, 30, 26, 30, 28, 26, 54, 42, 38, 42, 34, 40, 48, 38, 36, 36, 44, 48, 102, 42, 46, 54, 44, 50, 48, 60, 54, 66, 50, 54, 54, 54, 54, 54, 56, 64, 84, 58, 62, 84, 64, 66, 78, 64, 66, 84, 74
OFFSET
0,1
COMMENTS
If n is in A027863 then a(n) = n + 2, otherwise a(n) > n + 2. All terms are even. Corresponding primes are 5, 41, 29, 61, 617, ...
LINKS
MATHEMATICA
lk[n_]:=Module[{k=n+2, c=n^2+(n+1)^2}, While[!PrimeQ[c+k^2], k++]; k]; Array[ lk, 70, 0] (* Harvey P. Dale, Aug 06 2015 *)
PROG
(PARI) a(n)=k=n+2; while(!isprime(n^2+(n+1)^2+k^2), k++); k
vector(100, n, a(n-1)) \\ Jens Kruse Andersen, Aug 26 2014
CROSSREFS
Cf. A027863.
Sequence in context: A247566 A151689 A216833 * A330776 A327458 A202347
KEYWORD
nonn
AUTHOR
Zak Seidov, Aug 24 2014
EXTENSIONS
Corrected and extended by Jens Kruse Andersen, Aug 26 2014
STATUS
approved