OFFSET
1,1
COMMENTS
Conjecture: a(n) > 0 for all n >= 1.
It appears that a(3n+1) is greater than either a(3n) or a(3n+2). - Vladimir Shevelev and Robert G. Wilson v, Oct 20 2016
LINKS
Vladimir Shevelev and Robert G. Wilson v, Table of n, a(n) for n = 1..69
FORMULA
a(n) = nextprime(A181994(n)). - Robert G. Wilson v, Dec 23 2016
MATHEMATICA
p = 2; q = 3; r = 5; t[_] = 0; While[p < 10^9, If[ Mod[r - q, q - p] == 0 && t[(r - q)/(q - p)] == 0, t[(r - q)/(q - p)] = q; Print[{(r - q)/(q - p), q}]]; p = q; q = r; r = NextPrime@ r]; t /@ Range @ 40 (* Robert G. Wilson v, Dec 11 2016 *)
Table[SelectFirst[Partition[Prime[Range[12010000]], 3, 1], Differences[#][[2]]/ Differences[#][[1]]==n&], {n, 33}][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 05 2018 *)
PROG
(PARI) a(n) = forprime(q=3, , my(p=precprime(q-1), r=nextprime(q+1)); if((r-q)/(q-p)==n, return(q))) \\ Felix Fröhlich, Dec 06 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jan 05 2011
STATUS
approved