



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, 25, 27, 27, 28, 28, 29, 30, 32, 33, 34, 34, 35, 36, 37, 37, 39, 39, 40, 42, 43, 43, 44, 45, 46, 47, 49, 49, 50, 51, 52, 54, 55, 55, 57, 57, 58, 59, 60, 62, 63, 63, 64
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,4


COMMENTS

It can be shown that there is at least one prime number between npi(n) and n for n >= 3, or pi(n1)pi(npi(n)) >= 1. Since a(n)=npi(n)+pi(npi(n)) <= npi(n1)+pi(npi(n)) <= n1, we have a(n) < n for n > 1.
a(n)a(n1) = 1  (pi(n)pi(n1)) + pi(npi(n))  pi(n(1+pi(n1))), where pi(n)pi(n1) <= 1 and 1+pi(n1) >= pi(n) or pi(n(1+pi(n1))) <= pi(npi(n)). Thus, a(n)  a(n1) >= 0, meaning that this is a nondecreasing sequence.


LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..10000


FORMULA

a(n) = A095117(A062298(n));
a(n) = n  pi(n) + pi(n  pi(n)), where pi(n) is the prime count of n.


MATHEMATICA

Array[PrimePi[#] + # &[#  PrimePi[#]] &, 68] (* Michael De Vlieger, Nov 04 2020 *)


PROG

Python)
from sympy import primepi
for n in range(1, 10001):
b = n  primepi(n)
a = b + primepi(b)
print(a)


CROSSREFS

Cf. A000720, A062298, A095117, A337978.
Sequence in context: A067782 A318916 A035299 * A266251 A021302 A004649
Adjacent sequences: A338212 A338213 A338214 * A338216 A338217 A338218


KEYWORD

nonn


AUTHOR

YaPing Lu, Oct 17 2020


STATUS

approved



