login
a(n) = number of ks that make primorial P(n)/A019565(k)-A019565(k) prime.
0

%I #3 Mar 31 2012 10:23:47

%S 0,1,3,6,13,28,39,78,138,207,437,865,1423,2750,4904,8861,16201,33346,

%T 58534,111878,208914,397522

%N a(n) = number of ks that make primorial P(n)/A019565(k)-A019565(k) prime.

%e P(2)/A(0)-A(0)=6-1=5 is prime, so a(2)=1;

%e P(4)/A(k)-A(k): 210/2-2=103; 210/3-3=67; 210/6-6=29; 210/5-5=37; 210/10-10=11; 210/7-7=23; so a(4)=6;

%t npd = 1; Do[npd = npd*Prime[n]; tn = 0; tt = 1; cp = npd/tt - tt; ct = 0; While[IntegerQ[cp], If[(cp > 0) && PrimeQ[cp], ct = ct + 1]; tn = tn + 1; tt = 1; k1 = tn; o = 1; While[k1 > 0, k2 = Mod[k1, 2]; If[k2 == 1, tt = tt*Prime[o]]; k1 = ( k1 - k2)/2; o = o + 1]; cp = npd/tt - tt]; Print[ct], {n, 1, 22}]

%Y Cf. A019565, A002110, A103785, A103786, A103787.

%K hard,nonn

%O 1,3

%A _Lei Zhou_, Feb 16 2005