OFFSET
1,3
LINKS
Peter Luschny, Die schwingende Fakultät und Orbitalsysteme, August 2011.
Peter Luschny, Swinging Primes.
EXAMPLE
0$ + 1 = 1 + 1 = 2 is prime, so 0 is in the sequence.
MAPLE
a := proc(n) select(x -> isprime(A056040(x)+1), [$0..n]) end:
MATHEMATICA
fQ[n_] := PrimeQ[1 + 2^(n - Mod[n, 2])*Product[k^((-1)^(k + 1)), {k, n}]]; Select[ Range[0, 8660], fQ] (* Robert G. Wilson v, Aug 09 2010 *)
PROG
(PARI) is(k) = ispseudoprime(1+k!/(k\2)!^2); \\ Jinyuan Wang, Mar 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 21 2009
EXTENSIONS
a(45)-a(56) from Robert G. Wilson v, Aug 09 2010
STATUS
approved