%I #18 Oct 12 2020 00:16:43
%S 0,0,0,3,3,3,5,3,3,5,3,3,5,3,7,5,3,3,5,5,3,7,3,3,5,3,7,5,3,7,5,3,3,5,
%T 5,3,7,3,3,5,5,3,7,3,19,5,3,7,5,11,3,11,3,3,5,3,3,5,3,7,5,11,7,11,11,
%U 3,11,3,13,5,3,3,5,5,7,7,3,3,5,5,3,7,5,3,7,3,13,5,3,7,5,3,3,5,5,7,7,3
%N a(n) is the smallest odd prime p such that 2*n+1 = 2*p + A000040(k) for some k>1, or 0 if no such prime exists.
%H Hugo Pfoertner, <a href="/A103153/b103153.txt">Table of n, a(n) for n = 1..10000</a>
%e For n < 4 there are no such primes, thus a(1)-a(3)=0. For n=4, 2*4+1 = 9 = 2*3+3, thus a(4)=3. For n=7, 2*7+1 = 15 = 2*5+5, thus a(7)=7.
%t Do[m = 3; While[ ! (PrimeQ[m] && ((n - 2*m) > 2) && PrimeQ[n - 2*m]), m = m + 2]; Print[m], {n, 9, 299, 2}]
%o (Scheme:) (define (A103153 n) (let ((ind (A103507 n))) (if (zero? ind) 0 (A000040 ind))))
%Y a(n)=0 if A103507(n)=0, otherwise A000040(A103507(n)).
%Y Cf. A103151, A103152, A002373.
%Y Cf. A195352 (similar definition, but p=2 is allowed).
%K nonn
%O 1,4
%A _Lei Zhou_, Feb 09 2005
%E Edited and Scheme code added by _Antti Karttunen_, Jun 19 2007
%E Definition corrected by _Hugo Pfoertner_, Sep 16 2011
|