OFFSET
1,5
COMMENTS
Gagola calculated the first 669 terms of this sequence (for all the primes p < 5000) using an HP 9830 in 1981. She found that the largest value of k was only 45 and that 84% of the values of k were less than or equal to 10.
The Generalized Dickson Conjecture implies that the sequence contains each positive integer infinitely many times. - Robert Israel, Aug 05 2019
LINKS
Jason Yuen, Table of n, a(n) for n = 1..10000
Gloria Gagola, Progress on primes, News and Letters, Mathematics Magazine, Vol. 54, No. 1 (1981), p. 43.
EXAMPLE
a(1) = 1 since 4*1^2*prime(1)^2 + 1 = 4*1*2^2 + 1 = 17 is prime.
MAPLE
f:= proc(n) local q, k;
q:= 4*ithprime(n)^2;
for k from 1 do
if isprime(q*k^2+1) then return k fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Aug 05 2019
MATHEMATICA
a[n_] := Module[{k = 1, p = Prime[n]}, While[!PrimeQ[4 * k^2 * p^2 + 1], k++]; k]; Array[a, 100]
PROG
(PARI) a(n) = my(k=1, p=prime(n)); while (!isprime(4*p^2*k^2 + 1), k++); k; \\ Michel Marcus, Aug 05 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Aug 05 2019
STATUS
approved