%I #50 Sep 07 2023 02:25:24
%S 0,1,1,2,3,2,3,4,4,4,5,6,5,4,6,4,7,8,3,6,8,6,7,10,8,6,10,6,7,12,5,10,
%T 12,4,10,12,9,10,14,8,9,16,9,8,18,8,9,14,6,12,16,10,11,16,12,14,20,12,
%U 11,24,7,10,20,6,14,18,11,10,16,14,15,22,11,10,24,8,16,22,9,16,20,10
%N Number of times that i and 2n-i are both prime, for i = 1, ..., 2n-1.
%C a(n) is the convolution of terms 1 to 2n of the characteristic function of the primes, A010051, with itself. Related to Goldbach's conjecture that every even number can be expressed as the sum of two primes. - _T. D. Noe_, Aug 01 2002
%C The following sequences all appear to have the same parity (with an extra zero term at the start of A010051): A010051, A061007, A035026, A069754, A071574. - _Jeremy Gardiner_, Aug 09 2002
%C Total number of printer jobs in all possible schedules for n time slots in the first-come-first-served (FCFS) policy.
%C a(n) = Sum_{p prime < 2*n} A010051(2*n - p). - _Reinhard Zumkeller_, Oct 19 2011
%C For n > 1: length of n-th row of triangle A171637. - _Reinhard Zumkeller_, Mar 03 2014
%C a(n) = A001221(A238711(n)) = A238778(n) / n. - _Reinhard Zumkeller_, Mar 06 2014
%C From _Robert G. Wilson v_, Dec 15 2016: (Start)
%C First occurrence of k: 1, 2, 4, 5, 8, 11, 12, 17, 18, 37, 24, 53, 30, 89, 39, 71, 42, 101, 45, 179, 57, 137, 72, 193, 60, 233, ..., .
%C Conjectured last occurrence of k: 1, 3, 6, 19, 34, 31, 64, 61, 76, 79, 94, 83, 166, 199, 136, 181, 184, 229, 244, 271, 316, 277, 346, 313, 301, 293, ..., .
%C Conjectured number occurrences of k: 1, 2, 2, 3, 6, 3, 8, 4, 7, 5, 11, 5, 11, 8, 10, 3, 17, 7, 16, 3, 13, 8, 21, 4, 12, 3, 22, 7, 20, 8, 15, ..., .
%C Records: 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 18, 20, 24, 26, 28, 38, 42, 48, 54, 60, 64, 82, 88, 102, 104, 114, 116, 136, 146, 152, 166, 182, ..., .
%C (End)
%H Reinhard Zumkeller, <a href="/A035026/b035026.txt">Table of n, a(n) for n = 1..10000</a>
%H Rémy Sigrist, <a href="/A035026/a035026.png">Colored scatterplot of the first 500000 terms</a>
%H <a href="/index/Go#Goldbach">Index entries for sequences related to Goldbach conjecture</a>
%F For n > 1, a(n) = 2*A045917(n) - A010051(n).
%F a(n) = A010051(n) + 2*A061357(n). - _Wesley Ivan Hurt_, Aug 21 2013
%F a(n) = A073610(2*n). - _Ridouane Oudra_, Sep 06 2023
%p A035026 := proc(n)
%p local a,i ;
%p a := 0 ;
%p for i from 1 to 2*n-1 do
%p if isprime(i) and isprime(2*n-i) then
%p a := a+1 ;
%p end if;
%p end do:
%p a ;
%p end proc: # _R. J. Mathar_, Jul 01 2013
%t For[lst={}; n=1, n<=100, n++, For[cnt=0; i=1, i<=2n-1, i++ If[PrimeQ[i]&&PrimeQ[2n-i], cnt++ ]]; AppendTo[lst, cnt]]; lst
%t f[n_] := Block[{c = Boole@ PrimeQ[ n/2], p = 2}, While[ 2p < n, If[ PrimeQ[n - p], c += 2]; p = NextPrime@ p]; c];; Array[ f[ 2#] &, 90] (* _Robert G. Wilson v_, Dec 15 2016 *)
%o (Haskell)
%o a035026 n = sum $ map (a010051 . (2 * n -)) $
%o takeWhile (< 2 * n) a000040_list
%o -- _Reinhard Zumkeller_, Oct 19 2011
%Y Cf. A010051. Essentially the same as A002372.
%Y Cf. A073610.
%K easy,nonn
%O 1,4
%A Gordon R. Bower (siegmund(AT)mosquitonet.com)
%E Corrected by _T. D. Noe_, May 05 2002