login
a(n) is the smallest k > 0 such that b(n) = b(n-1) + A007504(k) is prime, with b(0) = 1.
0

%I #12 Jun 23 2023 18:25:29

%S 1,1,1,3,1,3,1,3,1,3,41,3,1,5,1,3,1,11,33,3,57,17,7,17,5,17,9,17,9,1,

%T 9,1,3,1,5,1,5,17,9,17,5,17,5,65,11,17,3,33,9,33,7,35,7,33,9,1,5,1,3,

%U 1,9,17,5,1,5,41,21,33,9,1,3,33,21,1,9,33,3

%N a(n) is the smallest k > 0 such that b(n) = b(n-1) + A007504(k) is prime, with b(0) = 1.

%C Regarding the most common values seen, through 15 million terms, value 3 is seen 1065490 times, value 17 is seen 1085824 times. These two values correspond to A007504(3)=10 and A007504(17)=440. Will these two values continue to be the most frequent? If so, why?

%e We label the corresponding prime sequence b(*). So, b(1) = b(0) + 2 is prime, so a(1) = 1 giving b(1) = 3. Later b(10) = 53, so that b(11) = b(10) + 3266 is the earliest prime, so a(11)=41 (via A007504(41)).

%o (PARI) genit(nterms=50)={my(arr=List(),last=1,summ,icnt);while(#arr<nterms,summ=last;icnt=0;forprime(x=2,+oo,summ+=x;icnt+=1;if(icnt%2==0,next);if(ispseudoprime(summ),listput(arr,icnt);last=summ;break)));arr}

%Y Cf. A007504.

%K nonn,easy

%O 1,4

%A _Bill McEachen_, Apr 30 2023