OFFSET
1,1
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Wikipedia, Bertrand's postulate
EXAMPLE
2 is present, as 2*2 - 1 = 3 = p_2, and p_{2-1} = p_1 = 2 >= 2.
3 is present, as 2*3 - 1 = 5 = p_3, and p_{3-1} = p_2 = 3 >= 3.
5 is not present, as 2*5 - 1 = 9 = p_2 * p_2, and p_1 * p_1 = 4, with 4 < 5.
7 is present, as 2*7 - 1 = 13 = p_6, and p_5 = 11 >= 7.
PROG
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
n = 0; forprime(p=2, 2^31, if((A064989((2*p)-1) >= p), n++; write("b246373.txt", n, " ", p); if(n > 9999, break)));
(Scheme, with Antti Karttunen's IntSeq-library)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 25 2014
STATUS
approved