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”).

A037040
Number of odd nonprimes < (2n+1)^2.
4
0, 1, 4, 10, 19, 31, 46, 65, 84, 109, 136, 166, 199, 236, 275, 319, 364, 413, 466, 521, 578, 642, 707, 776, 844, 923, 996, 1079, 1168, 1254, 1342, 1436, 1535, 1636, 1740, 1846, 1960, 2074, 2186, 2310, 2434, 2559, 2690, 2825, 2961, 3103, 3248, 3392, 3542
OFFSET
0,3
REFERENCES
C. R. Christofferson, Unpublished notes, 15219 Wickmere, Houston, TX 77062, (281) 486-4139.
LINKS
FORMULA
a(n) = A038377(n) - 1.
EXAMPLE
The odd nonprimes < 25 are 1, 9, 15 and 21, so a(2) = 4.
MATHEMATICA
a[n_] := 2*n^2 + 2*n + 1 - PrimePi[(2*n + 1)^2]; a[0] = 0; Array[a, 61, 0] (* Amiram Eldar, Sep 06 2024 *)
PROG
(PARI) a(n) = if(n == 0, 0, 2*n^2 + 2*n + 1 - primepi((2*n + 1)^2)); \\ Amiram Eldar, Sep 06 2024
CROSSREFS
Cf. A038377.
Sequence in context: A005448 A373699 A301247 * A007077 A301202 A301021
KEYWORD
nonn
AUTHOR
C. R. Christofferson (magpie56(AT)aol.com)
STATUS
approved