login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024683 a(n) is the number of ways prime(n) is a sum of two composite numbers r,s satisfying r < s. 1

%I #18 Feb 24 2023 10:13:31

%S 0,0,0,0,0,1,1,2,2,4,5,6,7,8,8,10,12,13,14,15,16,17,18,20,23,24,25,25,

%T 26,26,32,33,35,36,39,40,41,43,44,46,48,49,52,53,53,54,58,63,64,65,65,

%U 67,68,71,73,75,77,78,79,80,81,84,90,91,92,92,98,100,104,105,105,107,110,112,114

%N a(n) is the number of ways prime(n) is a sum of two composite numbers r,s satisfying r < s.

%H J. Stauduhar, <a href="/A024683/b024683.txt">Table of n, a(n) for n = 1..5000</a>

%F a(n) = Sum_{i=4..floor((prime(n)-1)/2)} c(i) * c(prime(n)-i), where c is the characteristic function of composite numbers (A066247) and prime(n) is the n-th prime (A000040). - _Wesley Ivan Hurt_, Sep 08 2020

%t z = 400; c = Select[Range[2, z], ! PrimeQ@# &]; (* A002808 *)

%t d = Select[Range[2, z], ! PrimeQ@# && OddQ@# &]; (* A014076 *)

%t a[n_] := Length[Intersection[c, Prime[n] - Select[d, # < Prime[n] &]]];

%t Table[a[n], {n, 1, 120}] (* A024683 *)

%t (* _Clark Kimberling_, Jul 21 2020 *)

%t Table[Count[IntegerPartitions[Prime[n],{2}],_?(AllTrue[#,CompositeQ]&&#[[1]]!= #[[2]]&)],{n,80}] (* _Harvey P. Dale_, Feb 24 2023 *)

%Y Subsequence of A224708.

%Y Cf. A000040, A066247.

%K nonn,easy

%O 1,8

%A _Clark Kimberling_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)