%I #5 Dec 05 2013 19:56:21
%S 1,1,0,1,1,0,1,1,0,1,2,0,1,1,0,2,1,0,1,1,0,1,3,0,1,2,0,1,1,0,2,1,0,1,
%T 1,0,2,1,0,1,3,0,1,2,0,2,1,0,1,1,0,1,1,0,1,3,0,4,2,0,2,1,0,1,2,0,1,1,
%U 0,2,2,0,1,1,0,3,1,0,2,1,0,1,3,0,1,2,0,1,1,0,2,2,0,1,1,0,1,1,0,3,2,0,3,1,0
%N Smallest k such that 3^k + 2n is a prime, or 0 if no such k exists. Index of the smallest power of 3 which when increased by the n-th even number yields a prime.
%C Most of the terms are 0, 1 or 2. Subsidiary sequence: Index of the first occurrence of n. Conjecture: There exists a finite M such that a(n) < M for all n.
%e a(10) = 1 as 3^1 + 20 = 23 is a prime.
%e a(23) = 3 as 3^3 +46 = 73 is a prime but 46+3 and 46+9 are not.
%Y Cf. A087371.
%K nonn
%O 1,11
%A _Amarnath Murthy_, Sep 09 2003
%E More terms from _David Wasserman_, May 24 2005