Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Feb 02 2019 14:54:25
%S 2,4,8,15,31,128,163
%N Values of n such that f(n) is a prime, where f(1) = 1, f(n) = prime(n)*f(n-1) + 2.
%C No additional terms up to n = 1000. - _Harvey P. Dale_, Feb 02 2019
%t f[1]=1; f[x_] := f[x] = Prime[x]*f[x - 1] + 2; Do[ If[ PrimeQ[ f[n]], Print[n]], {n, 1, 1900}]
%t nxt[{n_,a_}]:={n+1,a*Prime[n+1]+2}; Select[NestList[nxt,{1,1},200], PrimeQ[ #[[2]]]&][[All,1]] (* _Harvey P. Dale_, Feb 02 2019 *)
%Y The primes are in A086124.
%Y Cf. A000668, A076481, A086122, A086123, A086124.
%K more,nonn
%O 1,1
%A _Labos Elemer_, Jul 23 2003
%E Edited by _Robert G. Wilson v_, Jul 25 2003