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”).

A378615
Number of non prime powers <= prime(n).
2
1, 1, 1, 2, 3, 4, 6, 7, 10, 13, 14, 18, 21, 22, 25, 29, 34, 35, 39, 42, 43, 48, 50, 55, 62, 65, 66, 69, 70, 73, 84, 86, 91, 92, 101, 102, 107, 112, 115, 119, 124, 125, 134, 135, 138, 139, 150, 161, 164, 165, 168, 173, 174, 182, 186, 191, 196, 197, 202, 205
OFFSET
1,4
FORMULA
a(n) = prime(n) - A027883(n). - Chai Wah Wu, Dec 08 2024
EXAMPLE
The non prime powers counted under each term:
n=1 n=2 n=3 n=4 n=5 n=6 n=7 n=8 n=9 n=10
-------------------------------------------------
1 1 1 6 10 12 15 18 22 28
1 6 10 14 15 21 26
1 6 12 14 20 24
1 10 12 18 22
6 10 15 21
1 6 14 20
1 12 18
10 15
6 14
1 12
10
6
1
MATHEMATICA
Table[Length[Select[Range[Prime[n]], Not@*PrimePowerQ]], {n, 100}]
PROG
(Python)
from sympy import prime, primepi, integer_nthroot
def A378615(n): return int((p:=prime(n))-n-sum(primepi(integer_nthroot(p, k)[0]) for k in range(2, p.bit_length()))) # Chai Wah Wu, Dec 07 2024
CROSSREFS
Restriction of A356068 (first-differences A143731).
First-differences are A368748.
Maxima are A378616.
Other classes of numbers (instead of non prime powers):
- prime: A000027 (diffs A000012), restriction of A000720 (diffs A010051)
- squarefree: A071403 (diffs A373198), restriction of A013928 (diffs A008966)
- nonsquarefree: A378086 (diffs A061399), restriction of A057627 (diffs A107078)
- prime power: A027883 (diffs A366833), restriction of A025528 (diffs A010055)
- composite: A065890 (diffs A046933), restriction of A065855 (diffs A005171)
A000040 lists the primes, differences A001223
A000961 and A246655 list the prime powers, differences A057820.
A024619 lists the non prime powers, differences A375735, seconds A376599.
A080101 counts prime powers between primes (exclusive), inclusive A366833.
A361102 lists the non powers of primes, differences A375708.
Sequence in context: A355979 A119793 A181436 * A199118 A035941 A039854
KEYWORD
nonn,new
AUTHOR
Gus Wiseman, Dec 06 2024
STATUS
approved