OFFSET
0,3
REFERENCES
C. R. Christofferson, Unpublished notes, 15219 Wickmere, Houston, TX 77062, (281) 486-4139.
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
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
KEYWORD
nonn
AUTHOR
C. R. Christofferson (magpie56(AT)aol.com)
STATUS
approved