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.

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

This page as a plain text file.
%I A383037 #10 Apr 24 2025 13:24:18
%S A383037 0,-1,-2,-3,-2,-3,-4,-3,-4,-5,-4,-5,-4,-3,-4,-5,-4,-3,-4,-3,-4,-5,-4,
%T A383037 -5,-4,-3,-4,-3,-2,-3,-4,-3,-2,-3,-2,-3,-4,-3,-2,-3,-2,-3,-2,-1,-2,-1,
%U A383037 0,1,0,1,0,-1,0,-1,-2,-1,-2,-1,0,1,2,3,4,3,4,3,4,5,4,3,4
%N A383037 a(n) is the excess of composites over primes in the first n odd positive integers.
%H A383037 Felix Huber, <a href="/A383037/b383037.txt">Table of n, a(n) for n = 1..10000</a>
%H A383037 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/OddNumber.html">Odd Number</a>
%F A383037 a(n) = n - 2*pi(2*n) + 1.
%F A383037 a(n) = A210469(n) - pi(2*n) + 1 = A210469(n) - A000720(2*n) + 1 = for n > 1.
%F A383037 a(n) = A118777(2*n-1) - n + 1 for n > 1.
%F A383037 a(n) = A097454(2*n-1) - n + 2 for n > 1.
%F A383037 a(n) = A072731(2*n-1) - n + 3 for n > 1.
%e A383037 Of the first 5 odd positive integers (1, 3, 5, 7, 9), one (9) is a composite and three (3, 5, 7) are primes, so a(5) = 1 - 3 = -2.
%p A383037 A383037:=n->n-NumberTheory:-pi(2*n)*2+1;seq(A383037(n),n=1..71);
%t A383037 a[n_]:=n - 2*PrimePi[2*n] + 1; Array[a,71] (* _Stefano Spezia_, Apr 20 2025 *)
%Y A383037 Cf. A000720, A005408, A065091, A071904, A072731, A097454, A118777, A210469.
%K A383037 sign,easy
%O A383037 1,3
%A A383037 _Felix Huber_, Apr 19 2025