OFFSET
1,1
COMMENTS
Conjecture: a(n) < prime(n) for n > 21. Conjecture confirmed up to a(122578) = 55296 < prime(122578) = 1620539.
LINKS
Lei Zhou, Table of n, a(n) for n = 1..10000
EXAMPLE
prime(1) = 2, 2 * 2 - 1 = 3 is prime, so a(1)=2;
prime(2) = 3, 3 * 1 - 1 = 2 is prime, so a(2)=1;
......
prime(6) = 13, 13 * 2 - 1 = 25 is not prime,
13 * 3 - 1 = 38 is not prime,
13 * 4 - 1 = 51 is not prime,
13 * 6 - 1 = 77 is not prime,
13 * 8 - 1 = 103 is prime, so a(6)=8.
MATHEMATICA
f[n_] := Block[{p2, p3 = 3^Range[0, Floor@ Log[3, n] + 1]}, p2 = 2^Floor[Log[2, n/p3] + 1]; Min[ Select[ p2*p3, IntegerQ]]]; Table[pr=Prime[i]; j=1; fj=0; While[j++; fj=f[fj+0.5]; cp=-1+pr*fj; !PrimeQ[cp]]; fj, {i, 116}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Lei Zhou, Nov 19 2012
STATUS
approved