OFFSET
1,1
EXAMPLE
The 5th odd composite is 27, so that a(5) counts these 6 primes:
4 + 27, 10 + 27, 14 + 27, 16 + 27, 20 + 27, 26 + 27.
MATHEMATICA
z = 400; p = Prime[Range[z]];
c = Select[Range[2, z], ! PrimeQ@# &]; (* A002808 *)
d = Select[Range[2, z], ! PrimeQ@# && OddQ@# &]; (* A014076 *)
f[n_] := Select[c, # < d[[n]] &];
g[n_] := d[[n]] + Select[c, # < d[[n]] &];
q[n_] := Length[Intersection[p, g[n]]];
tq = Table[q[n], {n, 1, 120}] (* A336406 *)
tc = Table[Length[f[n]], {n, 1, 120}] (* A336407 *)
m = Min[Length[tq], Length[tc]]; Take[tc, m] - Take[tq, m] (* A336408 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jul 20 2020
STATUS
approved