|
|
A331622
|
|
a(n) is the number of k such that k and n-k are both composite.
|
|
1
|
|
|
0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 3, 2, 4, 2, 5, 2, 7, 4, 7, 4, 8, 4, 11, 6, 10, 6, 11, 8, 15, 10, 13, 10, 16, 10, 19, 12, 16, 14, 19, 14, 23, 16, 21, 16, 22, 16, 27, 18, 25, 18, 25, 20, 31, 22, 27, 22, 30, 24, 37, 26, 30, 26, 35, 26, 39, 28, 33, 30, 39, 30, 43, 32, 40, 32, 41, 32, 47, 34, 43, 36
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,10
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(10) = 2 because there are two k such that k and 10-k are composite, namely 4 and 6.
|
|
MAPLE
|
f:= proc(x) nops(select(t -> not isprime(t) and not isprime(x-t), [$2..x-2])) end proc:
map(f, [$1..100]);
|
|
MATHEMATICA
|
a[n_] := Count[Range[4, n - 4], x_ /; CompositeQ[x] && CompositeQ[n - x]]; Array[a, 90] (* Giovanni Resta, Jan 23 2020 *)
|
|
PROG
|
(Magma) [#[k: k in [2..n-2] | not IsPrime(k) and not IsPrime(n-k)]: n in [1..81]]; // Marius A. Burtea, Jan 22 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|