login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338215 a(n) = A095117(A062298(n)). 2

%I #20 Feb 26 2024 19:37:56

%S 1,1,1,3,3,5,5,6,8,9,9,11,11,12,13,14,14,16,16,17,19,20,20,21,22,24,

%T 25,27,27,28,28,29,30,32,33,34,34,35,36,37,37,39,39,40,42,43,43,44,45,

%U 46,47,49,49,50,51,52,54,55,55,57,57,58,59,60,62,63,63,64

%N a(n) = A095117(A062298(n)).

%C It can be shown that there is at least one prime number between n-pi(n) and n for n >= 3, or pi(n-1)-pi(n-pi(n)) >= 1. Since a(n)=n-pi(n)+pi(n-pi(n)) <= n-pi(n-1)+pi(n-pi(n)) <= n-1, we have a(n) < n for n > 1.

%C a(n)-a(n-1) = 1 - (pi(n)-pi(n-1)) + pi(n-pi(n)) - pi(n-(1+pi(n-1))), where pi(n)-pi(n-1) <= 1 and 1+pi(n-1) >= pi(n) or pi(n-(1+pi(n-1))) <= pi(n-pi(n)). Thus, a(n) - a(n-1) >= 0, meaning that this is a nondecreasing sequence.

%H Michael De Vlieger, <a href="/A338215/b338215.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A095117(A062298(n));

%F a(n) = n - pi(n) + pi(n - pi(n)), where pi(n) is the prime count of n.

%t Array[PrimePi[#] + # &[# - PrimePi[#]] &, 68] (* _Michael De Vlieger_, Nov 04 2020 *)

%o (Python)

%o from sympy import primepi

%o for n in range(1, 10001):

%o b = n - primepi(n)

%o a = b + primepi(b)

%o print(a)

%Y Cf. A000720, A062298, A095117, A337978.

%K nonn

%O 1,4

%A _Ya-Ping Lu_, Oct 17 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 09:29 EDT 2024. Contains 371771 sequences. (Running on oeis4.)