OFFSET
1,2
FORMULA
a(n) = n^2 - A038107(n). - R. J. Mathar, Jun 22 2009
EXAMPLE
a(3)=5 because the only composites <= 9 are 1, 4, 6, 8 and 9.
MAPLE
NumComposites := proc(N::posint) local count, i:count := 0:for i from 1 to N do if not isprime(i) then count := count + 1 fi:od: count; end:seq(NumComposites(k^2), k=1..51); # Zerinvary Lajos, May 26 2008
A038107 := proc(n) numtheory[pi]( n^2) ; end: A078435 := proc(n) n^2-A038107(n) ; end: seq(A078435(n), n=1..100) ; # R. J. Mathar, Jun 22 2009
MATHEMATICA
a[n_] := n^2 - PrimePi[n^2];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 20 2024, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn
AUTHOR
John E. Lenz (jel5010(AT)yahoo.com), Dec 30 2002
STATUS
approved