OFFSET
1,1
COMMENTS
Does 2 occur infinitely often in A124151?
The sum in A124151 is 1+n if k=1, and 1+k*(k^(2n)-1)/(k^2-1) if k>1. The indices of A124151(n)=2 are where k=1 is avoided, but where k=2 leads to a prime, i.e., where 1+n is not prime but 1+2*(4^n-1)/3 = (2^(2n+1)+1)/3 is prime. Therefore this sequence here is constructed by taking all n=(A000978(i)-1)/2 (the members of A127936), and eliminating cases with 1+n in A000040. - R. J. Mathar, Feb 03 2010
FORMULA
MATHEMATICA
f[n_] := Block[{k = 1}, While[ !PrimeQ[ Sum[k^(2j - 1), {j, n}] + 1] && k < 3, k++ ]; k]; lst = {}; Do[ If[f@n == 2, Print[n]; AppendTo[lst, n]], {n, 9250}]; lst (* Robert G. Wilson v, Dec 17 2006 *)
PROG
(PARI) is(n) = !isprime(n+1) && isprime(1 + 2*(4^n-1)/3); \\ Amiram Eldar, Oct 24 2024
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Artur Jasinski, Dec 14 2006
EXTENSIONS
More terms from Robert G. Wilson v, Dec 17 2006
a(24)-a(35) from R. J. Mathar, Feb 03 2010
STATUS
approved