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!)
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
For n >= 3, a(n) = A073610(n) + n - 3 - 2*A000720(n).
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
Sequence in context: A063749 A231333 A357866 * A212175 A370595 A289441
KEYWORD
nonn
AUTHOR
Robert Israel, Jan 22 2020
STATUS
approved

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 19 05:02 EDT 2024. Contains 371782 sequences. (Running on oeis4.)