Nothing Special   »   [go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A024683
a(n) is the number of ways prime(n) is a sum of two composite numbers r,s satisfying r < s.
1
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, 26, 26, 32, 33, 35, 36, 39, 40, 41, 43, 44, 46, 48, 49, 52, 53, 53, 54, 58, 63, 64, 65, 65, 67, 68, 71, 73, 75, 77, 78, 79, 80, 81, 84, 90, 91, 92, 92, 98, 100, 104, 105, 105, 107, 110, 112, 114
OFFSET
1,8
LINKS
FORMULA
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
MATHEMATICA
z = 400; c = Select[Range[2, z], ! PrimeQ@# &]; (* A002808 *)
d = Select[Range[2, z], ! PrimeQ@# && OddQ@# &]; (* A014076 *)
a[n_] := Length[Intersection[c, Prime[n] - Select[d, # < Prime[n] &]]];
Table[a[n], {n, 1, 120}] (* A024683 *)
(* Clark Kimberling, Jul 21 2020 *)
Table[Count[IntegerPartitions[Prime[n], {2}], _?(AllTrue[#, CompositeQ]&&#[[1]]!= #[[2]]&)], {n, 80}] (* Harvey P. Dale, Feb 24 2023 *)
CROSSREFS
Subsequence of A224708.
Sequence in context: A325108 A329474 A260295 * A244017 A339022 A341467
KEYWORD
nonn,easy
STATUS
approved