OFFSET
1,1
COMMENTS
a(n) generates primes with probability >1/2 for a random integer [1,10^4] (see reference). For confirmation, I checked the distribution of primes using the link. Results up to a(24) are shown below. P and C stand for prime and composite, respectively. a(1):P a(2):C a(3):C a(4):P a(5):P a(6):P a(7):P a(8):P a(9):C a(10):C a(11):P a(12):P a(13):P a(14):P a(15):C a(16):C a(17):P a(18):P a(19):P a(20):C a(21):P a(22):P a(23):C a(24):P Probability was 16/24 > 1/2.
REFERENCES
R. Crandall and C. Pomerance, "Prime numbers: a computational perspective", Springer-Verlag, Inc., NY, 2001, p. 49.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..2000
Chris Caldwell, Prime test.
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = |n^2 + n - 1354363|.
PROG
(PARI) a(n)=abs(n^2+n-1354363) \\ Charles R Greathouse IV, Oct 16 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Jun 18 2004
STATUS
approved