%I #2 Mar 31 2012 10:23:47
%S 3,5,13,25,67,79,140,127,345,129,222,206,479,1008,1577,766,2583,869,
%T 1406,3427,5367,4215,4141,9716,23067,5030,13586,7502,17340,19211,
%U 14991,30961,27008,82915,84387,91387,92294,32886,30890,70886,271430,131908
%N Index k of the first occurrence of A019565(2n-1) as the smallest term that makes prime(k)-A019565(2n-1) prime.
%e n=1: A019565(2n-1)=2; Prime(3)-2=3 is prime, so a(1)=3;
%e Prime(4)-A019565(1)=5 is prime, not counted;
%e n=2: A019565(2n-1)=6; Prime(5)-A019565(1)=9 is not prime; ... Prime(5)-6=5 is prime, so a(2)=5;
%e Prime(6)-A019565(1)=11 is prime, not counted;
%e ...
%e Prime(12)-A019565(3)=31 is prime, not counted;
%e n=3; A019565(2n-1)=10; Prime(13)-2=39, Prime(13)-6=35; Prime(13)-10=31 is prime, so a(3)=13.
%t A019565 = Function[tn, k1 = tn; o = 1; tt = 1; While[k1 > 0, k2 = Mod[k1, 2]; If[k2 == 1, tt = tt*Prime[o]]; k1 = (k1 - k2)/2; o = o + 1]; tt]; Array[fa, {1, 500}]; Do[fa[n] = 0, {n, 1, 500}]; n = 2; npd = Prime[n]; ct = 1; wt = 1; While[wt < 200, cr = (ct + 1)/2; If[fa[cr] == 0, fa[cr] = n; While[fa[wt] > 0, Print[fa[wt]]; wt = wt + 1]]; n = n + 1; npd = Prime[n]; ct = 1; tt = ct; cp = npd - A019565[tt]; While[ ! (PrimeQ[cp]), ct = ct + 1; tt = ct; cp = npd - A019565[tt]]]
%Y Cf. A103790, A103791.
%K hard,nonn
%O 1,1
%A _Lei Zhou_, Feb 28 2005