|
|
A118136
|
|
a(n) = 2 + (2*n! mod n+1).
|
|
0
|
|
|
2, 2, 3, 2, 5, 2, 7, 2, 2, 2, 11, 2, 13, 2, 2, 2, 17, 2, 19, 2, 2, 2, 23, 2, 2, 2, 2, 2, 29, 2, 31, 2, 2, 2, 2, 2, 37, 2, 2, 2, 41, 2, 43, 2, 2, 2, 47, 2, 2, 2, 2, 2, 53, 2, 2, 2, 2, 2, 59, 2, 61, 2, 2, 2, 2, 2, 67, 2, 2, 2, 71, 2, 73, 2, 2, 2, 2, 2, 79, 2, 2, 2, 83, 2, 2, 2, 2, 2, 89, 2, 2, 2, 2, 2, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Prime generating formula based on Wilson's theorem.
|
|
REFERENCES
|
Wladyslaw Narkiewicz, The development of prime number theory: from Euclid to Hardy and Littlewood, Springer-Verlag, New York, 2000, pp. 46-47.
|
|
LINKS
|
|
|
MAPLE
|
f:=n->(2*n! mod (n+1))+2; [seq(f(n), n=0..100)];
|
|
MATHEMATICA
|
a[n_] := 2 + Mod[2*n!, n + 1]
Table[a[n], {n, 0, 100}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|