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.

A116568 Difference between n and the absolute value of the difference between number of nonprimes not exceeding n and number of primes not exceeding n.

This page as a plain text file.
%I A116568 #10 Sep 21 2017 05:53:55
%S A116568 0,2,2,4,4,6,6,8,8,8,10,10,12,12,12,12,14,14,16,16,16,16,18,18,18,18,
%T A116568 18,18,20,20,22,22,22,22,22,22,24,24,24,24,26,26,28,28,28,28,30,30,30,
%U A116568 30,30,30,32,32,32,32,32,32,34,34,36,36,36,36,36,36,38,38,38,38,40,40,42
%N A116568 Difference between n and the absolute value of the difference between number of nonprimes not exceeding n and number of primes not exceeding n.
%H A116568 G. C. Greubel, <a href="/A116568/b116568.txt">Table of n, a(n) for n = 1..5000</a>
%F A116568 a(n) = n - Abs[A097454(n)].
%e A116568 a(11)=10 because the nonprimes not exceeding 11 are 1,4,6,8,9 and 10, the primes not exceeding 11 are 2,3,5,7 and 11 and 11-abs(6-5)=10.
%p A116568 with(numtheory): seq(n-abs(n-2*pi(n)),n=1..73);
%t A116568 Table[n-Abs[2*PrimePi[n]-n],{n,80}] (* _Harvey P. Dale_, Oct 08 2015 *)
%o A116568 (PARI) for(n=1,50, print1(n - abs(2*primepi(n) - n) , ", ")) \\ _G. C. Greubel_, Sep 20 2017
%Y A116568 Cf. A097454.
%K A116568 nonn
%O A116568 1,2
%A A116568 _Roger L. Bagula_, Mar 18 2006
%E A116568 Edited by _N. J. A. Sloane_, Apr 05 2006