[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A167180
a(n) = pi(n) plus the number of nonprimes less than prime(n).
1
1, 2, 4, 5, 9, 10, 14, 15, 18, 23, 25, 30, 34, 35, 38, 43, 49, 50, 56, 59, 60, 65, 69, 74, 81, 84, 85, 88, 90, 93, 107, 110, 115, 116, 125, 126, 132, 137, 140, 145, 151, 152, 162, 163, 166, 167, 179, 190, 193, 194, 197, 202, 204, 213, 218, 223, 228, 229, 235, 238, 240
OFFSET
1,2
COMMENTS
The number of primes less than n plus the number of nonprimes less than the n-th prime.
LINKS
FORMULA
a(n) = A000720(n) + A014689(n).
MAPLE
A000720 := proc(n) numtheory[pi](n) ; end proc:
A014689 := proc(n) ithprime(n) -n ; end proc:
A167180 := proc(n) A000720(n)+A014689(n) ; end proc: seq(A167180(n), n=1..120) ; # R. J. Mathar, May 21 2010
MATHEMATICA
Table[PrimePi[n] + Prime[n] - n , {n, 1, 20}] (* G. C. Greubel, Jun 04 2016 *)
CROSSREFS
Sequence in context: A024618 A089221 A347877 * A091271 A063985 A050052
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected (89 replaced with 88, 94 with 93, 127 with 126, 146 with 145, etc.) by R. J. Mathar, May 21 2010
STATUS
approved