A373674
Last element of each maximal run of powers of primes (including 1).
Original entry on oeis.org
5, 9, 11, 13, 17, 19, 23, 25, 27, 29, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239
Offset: 1
The maximal runs of powers of primes begin:
1 2 3 4 5
7 8 9
11
13
16 17
19
23
25
27
29
31 32
37
41
43
47
49
For runs of prime-powers:
For runs of non-prime-powers:
For antiruns of prime-powers:
For antiruns of non-prime-powers:
A025528 counts prime-powers up to n.
A057820 gives first differences of consecutive prime-powers, gaps
A093555.
A377286
Numbers k such that there are no prime-powers between prime(k)+1 and prime(k+1)-1.
Original entry on oeis.org
1, 3, 5, 7, 8, 10, 12, 13, 14, 16, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82
Offset: 1
Primes 18 and 19 are 61 and 67, and the interval (62, 63, 64, 65, 66) contains the prime-power 64, so 18 is not in the sequence.
The nearest prime-power before prime(n)-1 is
A065514, difference
A377289.
The nearest prime-power after prime(n)+1 is
A345531, difference
A377281.
For at least one prime-power we have
A377057.
For one instead of no prime-powers we have
A377287.
For two instead of no prime-powers we have
A377288.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
Cf.
A001597,
A002808,
A024619,
A053707,
A064113,
A065890,
A075526,
A095195,
A276781,
A376597,
A377051,
A377282.
-
Select[Range[100], Length[Select[Range[Prime[#]+1,Prime[#+1]-1],PrimePowerQ]]==0&]
-
from itertools import count, islice
from sympy import factorint, nextprime
def A377286_gen(): # generator of terms
p, q, k = 2, 3, 1
for k in count(1):
if all(len(factorint(i))>1 for i in range(p+1,q)):
yield k
p, q = q, nextprime(q)
A377286_list = list(islice(A377286_gen(),66)) # Chai Wah Wu, Oct 27 2024
A376305
Run-compression of the sequence of first differences of squarefree numbers.
Original entry on oeis.org
1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 4, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 2, 4, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3
Offset: 1
The sequence of squarefree numbers (A005117) is:
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, ...
The sequence of first differences (A076259) of squarefree numbers is:
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, ...
The run-compression is A376305 (this sequence).
This is the run-compression of first differences of
A005117.
For prime instead of squarefree numbers we have
A037201, halved
A373947.
For run-lengths instead of compression we have
A376306.
For run-sums instead of compression we have
A376307.
For prime-powers instead of squarefree numbers we have
A376308.
For positions of first appearances instead of compression we have
A376311.
The version for nonsquarefree numbers is
A376312.
A116861 counts partitions by compressed sum, by compressed length
A116608.
Cf.
A007674,
A053797,
A053806,
A061398,
A072284,
A112925,
A112926,
A120992,
A274174,
A373197,
A373198,
A375707,
A375708.
A377466
Numbers k such that there is more than one perfect power x in the range prime(k) < x < prime(k+1).
Original entry on oeis.org
4, 9, 11, 30, 327, 445, 3512, 7789, 9361, 26519413
Offset: 1
Primes 9 and 10 are 23 and 29, and the interval (24,25,26,27,28) contains two perfect powers (25,27), so 9 is in the sequence.
For a unique prime-power we have
A377287.
These are the positions of terms > 1 in
A377432.
For a unique perfect power we have
A377434.
For no perfect powers we have
A377436.
A000015 gives the least prime power >= n.
A081676 gives the greatest perfect power <= n.
A131605 lists perfect powers that are not prime-powers.
A377468 gives the least perfect power > n.
Cf.
A000720,
A023055,
A031218,
A045542,
A052410,
A053706,
A069623,
A116086,
A116455,
A216765,
A308658,
A336416,
A345531,
A375740,
A376560,
A376561,
A377057.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Select[Range[100],Count[Range[Prime[#]+1, Prime[#+1]-1],_?perpowQ]>1&]
-
from itertools import islice
from sympy import prime
from gmpy2 import is_power, next_prime
def A377466_gen(startvalue=1): # generator of terms >= startvalue
k = max(startvalue,1)
p = prime(k)
while (q:=next_prime(p)):
c = 0
for i in range(p+1,q):
if is_power(i):
c += 1
if c>1:
yield k
break
k += 1
p = q
A377466_list = list(islice(A377466_gen(),9)) # Chai Wah Wu, Nov 04 2024
A067871
Number of primes between consecutive terms of A246547 (prime powers p^k, k >= 2).
Original entry on oeis.org
2, 0, 2, 3, 0, 2, 4, 3, 4, 8, 0, 1, 8, 14, 1, 7, 7, 4, 25, 2, 15, 15, 17, 16, 10, 45, 2, 44, 20, 26, 18, 0, 2, 28, 52, 36, 42, 32, 45, 45, 47, 19, 30, 106, 36, 35, 4, 114, 28, 135, 89, 42, 87, 42, 34, 66, 192, 106, 56, 23, 39, 37, 165, 49, 37, 262, 58, 160, 22
Offset: 1
The first few prime powers A246547 are 4, 8, 9, 16. The first few primes are 2, 3, 5, 7, 11, 13. We have (4), 5, 7, (8), (9), 11, 13, (16) and so the sequence begins with 2, 0, 2.
The initial terms count the following sets of primes: {5,7}, {}, {11,13}, {17,19,23}, {}, {29,31}, {37,41,43,47}, ... - _Gus Wiseman_, Dec 02 2024
For primes between nonsquarefree numbers we have
A236575.
For composite instead of prime we have
A378456.
A000015 gives the least prime power >= n.
A080101 counts prime powers between primes.
Cf.
A001597,
A024619,
A031218,
A046933,
A276781,
A345531,
A366833,
A377051,
A377057,
A377282,
A377286-
A377288.
-
t = {}; cnt = 0; Do[If[PrimePowerQ[n], If[FactorInteger[n][[1, 2]] == 1, cnt++, AppendTo[t, cnt]; cnt = 0]], {n, 4 + 1, 30000}]; t (* T. D. Noe, May 21 2013 *)
nn = 2^20; Differences@ Map[PrimePi, Select[Union@ Flatten@ Table[a^2*b^3, {b, nn^(1/3)}, {a, Sqrt[nn/b^3]}], PrimePowerQ] ] (* Michael De Vlieger, Oct 26 2023 *)
A375714
Positions of non-successions of consecutive non-perfect-powers. Numbers k such that the k-th non-perfect-power is at least two fewer than the next.
Original entry on oeis.org
2, 5, 11, 19, 20, 24, 27, 39, 53, 69, 87, 107, 110, 112, 127, 151, 177, 196, 204, 221, 233, 265, 299, 317, 334, 372, 412, 454, 481, 497, 543, 591, 641, 693, 747, 803, 861, 921, 959, 982, 1046, 1112, 1180, 1250, 1284, 1321, 1395, 1471, 1549, 1629, 1675, 1710
Offset: 1
The initial non-perfect-powers are 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, which increase by more than one after term 2, term 5, term 11, etc.
Prime-powers inclusive:
Non-prime-powers inclusive:
-
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
ce=Select[Range[100],radQ];
Select[Range[Length[ce]-1],!ce[[#+1]]==ce[[#]]+1&]
-
from itertools import count, islice
from sympy import perfect_power
def A375714_gen(): # generator of terms
a, b = -1, 0
for n in count(1):
c = not perfect_power(n)
if c:
a += 1
if b&(c^1):
yield a
b = c
A375714_list = list(islice(A375714_gen(),52)) # Chai Wah Wu, Sep 11 2024
A376306
Run-lengths of the sequence of first differences of squarefree numbers.
Original entry on oeis.org
2, 1, 2, 1, 1, 1, 2, 3, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 3, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 3, 2, 1, 1, 1
Offset: 1
The sequence of squarefree numbers (A005117) is:
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, ...
The sequence of first differences (A076259) of squarefree numbers is:
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, ...
with runs:
(1,1),(2),(1,1),(3),(1),(2),(1,1),(2,2,2),(1,1),(3,3),(1,1),(2),(1,1), ...
with lengths A376306 (this sequence).
Run-lengths of first differences of
A005117.
For prime instead of squarefree numbers we have
A333254.
For compression instead of run-lengths we have
A376305.
For run-sums instead of run-lengths we have
A376307.
For prime-powers instead of squarefree numbers we have
A376309.
For positions of first appearances instead of run-lengths we have
A376311.
A116861 counts partitions by compressed sum, by compressed length
A116608.
Cf.
A007674,
A053797,
A053806,
A061398,
A072284,
A112925,
A112926,
A120992,
A373198,
A375707,
A376312.
A376312
Run-compression of first differences (A078147) of nonsquarefree numbers (A013929).
Original entry on oeis.org
4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, 2, 4, 2, 1, 4, 1, 3, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 2, 1, 3, 4, 2, 4, 1, 2, 1, 3, 1, 4, 1, 3, 4, 2, 4, 3, 1, 4, 1, 3, 4, 2, 4, 2, 1, 3, 2, 4, 1, 3, 4, 2, 3, 1, 3, 1, 4, 1, 3, 2, 1, 3, 4, 2
Offset: 1
The sequence of nonsquarefree numbers (A013929) is:
4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, ...
with first differences (A078147):
4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, ...
with runs:
(4),(1),(3),(4),(2,2),(4),(1),(2),(1),(4,4,4,4),(1),(3),(1,1),(2,2,2), ...
and run-compression (A376312):
4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, ...
For nonprime instead of squarefree numbers we have
A037201, halved
A373947.
For run-sums instead of compression we have
A376264.
For squarefree instead of nonsquarefree we have
A376305, ones
A376342.
For prime-powers instead of nonsquarefree numbers we have
A376308.
A116861 counts partitions by compressed sum, by compressed length
A116608.
Cf.
A007674,
A053797,
A053806,
A072284,
A112925,
A120992,
A274174,
A373198,
A375707,
A376306,
A376307,
A376311.
A377054
First term of the n-th differences of the powers of primes. Inverse zero-based binomial transform of A000961.
Original entry on oeis.org
1, 1, 0, 0, 0, 1, -5, 15, -34, 63, -97, 115, -54, -251, 1184, -3536, 8736, -18993, 37009, -64545, 98442, -121393, 82008, 147432, -860818, 2710023, -7110594, 17077281, -38873146, 85085287, -179965647, 367885014, -725051280, 1372311999, -2481473550, 4257624252
Offset: 0
The sixth differences of A000961 begin: -5, 10, -9, 1, 6, -10, 16, -18, ..., so a(6) = -5.
This is the first column of the array
A377051.
For positions of first zeros we have
A377055.
-
q=Select[Range[100],#==1||PrimePowerQ[#]&];
Table[Sum[(-1)^(j-k)*Binomial[j,k]*q[[1+k]],{k,0,j}],{j,0,Length[q]/2}]
A377703
First differences of the sequence A345531(k) = least prime-power greater than the k-th prime.
Original entry on oeis.org
1, 3, 1, 5, 3, 3, 4, 2, 6, 1, 9, 2, 4, 2, 10, 2, 3, 7, 2, 6, 2, 8, 8, 4, 2, 4, 2, 4, 8, 7, 9, 2, 10, 2, 6, 6, 4, 2, 10, 2, 10, 2, 4, 2, 12, 12, 4, 2, 4, 6, 2, 2, 13, 7, 6, 2, 6, 4, 2, 6, 18, 4, 2, 4, 14, 6, 6, 6, 4, 6, 2, 12, 6, 4, 6, 8, 4, 8, 10, 2, 10, 2, 6
Offset: 1
A080101 counts prime-powers between primes (exclusive).
A246655 lists the prime-powers, differences
A057820 without first term.
-
Differences[Table[NestWhile[#+1&, Prime[n]+1,!PrimePowerQ[#]&],{n,100}]]
-
from sympy import factorint, prime, nextprime
def A377703(n): return -next(filter(lambda m:len(factorint(m))<=1, count((p:=prime(n))+1)))+next(filter(lambda m:len(factorint(m))<=1, count(nextprime(p)+1))) # Chai Wah Wu, Nov 14 2024
Comments