login
a(n) is the first occurrence of n in sequence A209266.
0

%I #13 Feb 18 2013 13:25:42

%S 3,5,9,14,16,26,54,67,74,103,161,293,236,432,249,788,1078,796,1885,

%T 2091,1712,2618,4099,7088,8137,8091,16086,12595,27627,22835,44576,

%U 31305,68888,109617,86463,77206,126383,202035

%N a(n) is the first occurrence of n in sequence A209266.

%e A209266 = {0, 0, 1, 1, 2, 2, 2, 1, 3, 3, 1, 3, 3, 4, 3, 5, 4, 2, 5, 4, 4, 4, 4, 3, 3, 6, 6, 4,...}.

%e Number 1 first appears as A209266(3), number 2 as A209266(5), number 3 as A209266(9)...

%e So, a = {3, 5, 9, ...} starting from a(1)=3.

%t aim = 32; a = Table[0, {i, 1, aim}]; zeros = aim; i = 2; While[i++; p = Prime[i]; ct = 0; Do[If[(PrimeQ[p - j]) && (PrimeQ[p + j]), f = Last[FactorInteger[j]][[1]]; If[f <= 5, ct++]], {j, 2, p, 2}]; If[(ct <= aim) && (a[[ct]] == 0), a[[ct]] = i; zeros--; zeros > 0]; a

%Y Cf. A209266.

%K nonn,hard

%O 1,1

%A _Lei Zhou_, Feb 07 2013