OFFSET
1,8
LINKS
J. Stauduhar, Table of n, a(n) for n = 1..5000
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
KEYWORD
nonn,easy
AUTHOR
STATUS
approved