|
|
A202449
|
|
Least k such that k*n!! - 1 is a prime number.
|
|
1
|
|
|
3, 2, 1, 1, 2, 1, 4, 1, 2, 3, 2, 3, 2, 6, 16, 1, 6, 7, 6, 6, 6, 3, 26, 3, 2, 1, 16, 3, 8, 8, 4, 15, 16, 3, 2, 6, 4, 6, 14, 9, 38, 19, 6, 8, 28, 2, 32, 43, 44, 4, 24, 8, 8, 5, 20, 2, 62, 11, 4, 26, 10, 10, 16, 1, 72, 13, 10, 2, 2, 4, 2, 23, 18, 3, 32, 12, 132
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(7) = 4 because 4*7!! - 1 = 4*105 - 1 = 419 is prime.
|
|
MAPLE
|
for k from 1 do
if isprime(k*doublefactorial(n)-1) then
return k;
end if;
end do:
end proc:
|
|
MATHEMATICA
|
Table[k = 0; While[!PrimeQ[k*n!! -1], k++]; k, {n, 85}]
|
|
PROG
|
(PARI) a(n)=my(N=prod(k=1, n\2, 2*k+n%2), k); while(!isprime(k++*N-1), ); k \\ Charles R Greathouse IV, Dec 22 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|