cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A383259 a(n) is the excess of even composites over odd composites in the first n positive integers.

This page as a plain text file.
%I A383259 #13 Apr 25 2025 20:38:05
%S A383259 0,0,0,1,1,2,2,3,2,3,3,4,4,5,4,5,5,6,6,7,6,7,7,8,7,8,7,8,8,9,9,10,9,
%T A383259 10,9,10,10,11,10,11,11,12,12,13,12,13,13,14,13,14,13,14,14,15,14,15,
%U A383259 14,15,15,16,16,17,16,17,16,17,17,18,17,18,18,19,19,20
%N A383259 a(n) is the excess of even composites over odd composites in the first n positive integers.
%H A383259 Felix Huber, <a href="/A383259/b383259.txt">Table of n, a(n) for n = 1..10000</a>
%H A383259 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CompositeNumber.html">Composite Number</a>
%F A383259 a(n) = pi(n) - (n mod 2) - 1 = A000720(n) - A000034(n) for n > 1.
%F A383259 abs(a(n)-a(n-1)) = A066247(n).
%e A383259 Of the first 9 positive integers are three (4, 6, 8) even and one (9) is odd, so a(9) = 3 - 1 = 2.
%p A383259 A383259:=n->`if`(n=1,0,NumberTheory:-pi(n)-(n mod 2)-1);seq(A383259(n),n=1..74);
%t A383259 a[1]:=0; a[n_]:=PrimePi[n]- Mod[n,2] - 1; Array[a,74] (* _Stefano Spezia_, Apr 25 2025 *)
%Y A383259 Cf. A000034, A000720, A002808, A066247, A071904, A383037.
%K A383259 nonn,easy
%O A383259 1,6
%A A383259 _Felix Huber_, Apr 24 2025