A053289
First differences of consecutive perfect powers (A001597).
Original entry on oeis.org
3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, 33, 35, 19, 18, 39, 41, 43, 28, 17, 47, 49, 51, 53, 55, 57, 59, 61, 39, 24, 65, 67, 69, 71, 35, 38, 75, 77, 79, 81, 47, 36, 85, 87, 89, 23, 68, 71, 10, 12, 95, 97, 99, 101, 103, 40, 65, 107, 109, 100
Offset: 1
Consecutive perfect powers are A001597(14) = 121, A001597(13) = 100, so a(13) = 121 - 100 = 21.
- Wacław Sierpiński, 250 problems in elementary number theory, Modern Analytic and Computational Methods in Science and Mathematics, No. 26, American Elsevier, Warsaw, 1970, pp. 21, 115-116.
- S. S. Pillai, On the equation 2^x - 3^y = 2^X - 3^Y, Bull, Calcutta Math. Soc. 37 (1945) 15-20.
- Daniel Forgues and T. D. Noe, Table of n, a(n) for n = 1..10000
- Rafael Jakimczuk, Gaps between consecutive perfect powers, International Mathematical Forum, Vol. 11, No. 9 (2016), pp. 429-437.
- Holly Krieger and Brady Haran, Catalan's Conjecture, Numberphile video (2018).
- Michel Waldschmidt, Open Diophantine problems, arXiv:math/0312440 [math.NT], 2003-2004.
Sorted positions of first appearances are
A376268, complement
A376519.
For second differences we have
A376559.
A112344 counts integer partitions into perfect-powers, factorizations
A294068.
A333254 gives run-lengths of differences between consecutive primes.
Cf.
A007921,
A036263,
A045542,
A052410,
A053707,
A174965,
A336416,
A375735,
A375736,
A375740,
A376562.
-
Differences@ Select[Range@ 3200, # == 1 || GCD @@ FactorInteger[#][[All, 2]] > 1 &] (* Michael De Vlieger, Jun 30 2016, after Ant King at A001597 *)
-
from sympy import mobius, integer_nthroot
def A053289(n):
if n==1: return 3
def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
kmin, kmax = 1,2
while f(kmax)+1 >= kmax:
kmax <<= 1
rmin, rmax = 1, kmax
while True:
kmid = kmax+kmin>>1
if f(kmid)+1 < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
while True:
rmid = rmax+rmin>>1
if f(rmid) < rmid:
rmax = rmid
else:
rmin = rmid
if rmax-rmin <= 1:
break
return kmax-rmax # Chai Wah Wu, Aug 13 2024
A377468
Least perfect-power >= n.
Original entry on oeis.org
1, 4, 4, 4, 8, 8, 8, 8, 9, 16, 16, 16, 16, 16, 16, 16, 25, 25, 25, 25, 25, 25, 25, 25, 25, 27, 27, 32, 32, 32, 32, 32, 36, 36, 36, 36, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 81, 81, 81
Offset: 1
The version for prime-powers is
A000015.
Positions of last appearances are also
A001597.
The version for squarefree numbers is
A067535.
The opposite version (greatest perfect-power <= n) is
A081676.
A069623 counts perfect-powers <= n.
A131605 lists perfect-powers that are not prime-powers.
Cf.
A014210,
A014234,
A023055,
A031218,
A045542,
A052410,
A065514,
A188951,
A216765,
A336416,
A345531.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Table[NestWhile[#+1&,n,#>1&&!perpowQ[#]&],{n,100}]
-
from sympy import mobius, integer_nthroot
def A377468(n):
if n == 1: return 1
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return int(x-1+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
m = n-f(n-1)
return bisection(lambda x:f(x)+m,n-1,n) # Chai Wah Wu, Nov 05 2024
A376596
Second differences of consecutive prime-powers inclusive (A000961). First differences of A057820.
Original entry on oeis.org
0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, -4, 1, 0, 1, -2, 4, -4, 0, 4, 2, -4, -2, 2, -2, 2, 4, -4, -2, -1, 2, 3, -4, 8, -8, 4, 0, -2, -2, 2, 2, -4, 8, -8, 2, -2, 10, 0, -8, -2, 2, 2, -4, 0, 6, -3, -4, 5, 0, -4, 4, -2, -2
Offset: 1
The prime-powers inclusive (A000961) are:
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, ...
with first differences (A057820):
1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 1, 2, 4, 2, 2, 2, 2, 1, 5, 4, 2, 4, 2, 4, 6, 2, 3, ...
with first differences (A376596):
0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
For first differences we had
A057820, sorted firsts
A376340(n)+1 (except first term).
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive:
A057820 (first differences),
A376597 (inflections and undulations),
A376598 (nonzero curvature).
-
Differences[Select[Range[1000],#==1||PrimePowerQ[#]&],2]
-
from sympy import primepi, integer_nthroot
def A376596(n):
def iterfun(f,n=0):
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m
def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
return (a:=iterfun(f,n))-((b:=iterfun(lambda x:f(x)+1,a))<<1)+iterfun(lambda x:f(x)+2,b) # Chai Wah Wu, Oct 02 2024
A376562
Second differences of consecutive non-perfect-powers (A007916). First differences of A375706.
Original entry on oeis.org
1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
The non-perfect powers (A007916) are:
2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, ...
with first differences (A375706):
1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, ...
with first differences (A376562):
1, -1, 0, 2, -2, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 1, -1, 0, ...
Runs of non-perfect-powers:
A112344 counts integer partitions into perfect-powers, factorizations
A294068.
A333254 gives run-lengths of differences between consecutive primes.
For non-perfect-powers:
A375706 (first differences),
A376588 (inflections and undulations),
A376589 (nonzero curvature).
Cf.
A025475,
A052410,
A053707,
A064113,
A069623,
A093555,
A174965,
A182853,
A336416,
A336417,
A361102.
-
radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
Differences[Select[Range[100],radQ],2]
-
from itertools import count
from sympy import mobius, integer_nthroot, perfect_power
def A376562(n):
def f(x): return int(n+1-sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m, k = n, f(n)
while m != k: m, k = k, f(k)
r = m+((k:=next(i for i in count(1) if not perfect_power(m+i)))<<1)
return next(i for i in count(1-k) if not perfect_power(r+i)) # Chai Wah Wu, Oct 02 2024
A376559
Second differences of consecutive perfect powers (A001597). First differences of A053289.
Original entry on oeis.org
1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, 2, -16, -1, 21, 2, 2, -15, -11, 30, 2, 2, 2, 2, 2, 2, 2, -22, -15, 41, 2, 2, 2, -36, 3, 37, 2, 2, 2, -34, -11, 49, 2, 2, -66, 45, 3, -61, 2, 83, 2, 2, 2, 2, -63, 25, 42, 2, -9, -89
Offset: 1
The perfect powers (A001597) are:
1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
with first differences (A053289):
3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, ...
with first differences (A376559):
1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, ...
A112344 counts integer partitions into perfect-powers, factorizations
A294068.
For perfect-powers:
A053289 (first differences),
A376560 (positive curvature),
A376561 (negative curvature).
Cf.
A045542,
A052410,
A053707,
A064113,
A069623,
A174965,
A216765,
A251092,
A333254,
A336416,
A361102.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Differences[Select[Range[1000],perpowQ],2]
-
lista(nn) = my(v = concat (1, select(ispower, [1..nn])), w = vector(#v-1, i, v[i+1] - v[i])); vector(#w-1, i, w[i+1] - w[i]); \\ Michel Marcus, Oct 02 2024
-
from sympy import mobius, integer_nthroot
def A376559(n):
def bisection(f,kmin=0,kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,x.bit_length())))
a = bisection(f,n,n)
b = bisection(lambda x:f(x)+1,a,a)
return a+bisection(lambda x:f(x)+2,b,b)-(b<<1) # Chai Wah Wu, Oct 02 2024
A377434
Numbers k such that there is a unique perfect-power x in the range prime(k) < x < prime(k+1).
Original entry on oeis.org
2, 6, 15, 18, 22, 25, 31, 34, 39, 44, 47, 48, 53, 54, 61, 66, 68, 72, 78, 85, 92, 97, 99, 105, 114, 122, 129, 137, 146, 154, 162, 168, 172, 181, 191, 200, 210, 217, 219, 228, 240, 251, 263, 269, 274, 283, 295, 306, 309, 319, 329, 342, 357, 367, 378, 393, 400
Offset: 1
Primes 4 and 5 are 7 and 11, and the interval (8,9,10) contains two perfect-powers (8,9), so 4 is not in the sequence.
Primes 5 and 6 are 11 and 13, and the interval (12) contains no perfect-powers, so 5 is not in the sequence.
Primes 6 and 7 are 13 and 17, and the interval (14,15,16) contains just one perfect-power (16), so 6 is in the sequence.
These are the positions of 1 in
A377432.
For no perfect-powers we have
A377436.
For more than one perfect-power we have
A377466.
A000015 gives the least prime-power >= n.
A031218 gives the greatest prime-power <= n.
A065514 gives the greatest prime-power < prime(n), difference
A377289.
A081676 gives the greatest perfect-power <= n.
A131605 lists perfect-powers that are not prime-powers.
A377468 gives the least perfect-power > n.
Cf.
A006549,
A023055,
A045542,
A052410,
A069623,
A080101,
A216765,
A224363,
A246655,
A336416,
A375740,
A376560,
A376561,
A377057.
-
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
Select[Range[100],Length[Select[Range[Prime[#]+1,Prime[#+1]-1],perpowQ]]==1&]
A336414
Number of divisors of n! with distinct prime multiplicities.
Original entry on oeis.org
1, 1, 2, 3, 7, 10, 20, 27, 48, 86, 147, 195, 311, 390, 595, 1031, 1459, 1791, 2637, 3134, 4747, 7312, 10766, 12633, 16785, 26377, 36142, 48931, 71144, 82591, 112308, 128023, 155523, 231049, 304326, 459203, 568095, 642446, 812245, 1137063, 1441067, 1612998, 2193307, 2429362
Offset: 0
The first and second columns below are the a(6) = 20 counted divisors of 6! together with their prime signatures. The third column shows the A000005(6!) - a(6) = 10 remaining divisors.
1: () 20: (2,1) | 6: (1,1)
2: (1) 24: (3,1) | 10: (1,1)
3: (1) 40: (3,1) | 15: (1,1)
4: (2) 45: (2,1) | 30: (1,1,1)
5: (1) 48: (4,1) | 36: (2,2)
8: (3) 72: (3,2) | 60: (2,1,1)
9: (2) 80: (4,1) | 90: (1,2,1)
12: (2,1) 144: (4,2) | 120: (3,1,1)
16: (4) 360: (3,2,1) | 180: (2,2,1)
18: (1,2) 720: (4,2,1) | 240: (4,1,1)
Numbers with distinct prime multiplicities are
A130091.
Divisors with distinct prime multiplicities are counted by
A181796.
The maximum divisor with distinct prime multiplicities is
A327498.
Divisors of n! with equal prime multiplicities are counted by
A336415.
Factorial numbers:
A000142,
A007489,
A022559,
A027423,
A048656,
A048742,
A071626,
A325272,
A325273,
A325617,
A336416.
-
Table[Length[Select[Divisors[n!],UnsameQ@@Last/@FactorInteger[#]&]],{n,0,15}]
-
a(n) = sumdiv(n!, d, my(ex=factor(d)[,2]); #vecsort(ex,,8) == #ex); \\ Michel Marcus, Jul 24 2020
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
A336415
Number of divisors of n! with equal prime multiplicities.
Original entry on oeis.org
1, 1, 2, 4, 6, 10, 13, 21, 24, 28, 33, 49, 53, 85, 94, 100, 104, 168, 173, 301, 307, 317, 334, 590, 595, 603, 636, 642, 652, 1164, 1171, 2195, 2200, 2218, 2283, 2295, 2301, 4349, 4478, 4512, 4519, 8615, 8626, 16818, 16836, 16844, 17101, 33485, 33491, 33507, 33516, 33582
Offset: 0
The a(n) uniform divisors of n for n = 1, 2, 6, 8, 30, 36 are the columns:
1 2 6 8 30 36
1 3 6 15 30
2 4 10 16
1 3 8 15
2 6 10
1 5 9
4 8
3 6
2 5
1 4
3
2
1
In 20!, the multiplicity of the third prime (5) is 4 but the multiplicity of the fourth prime (7) is 2. Hence there are 2^3 - 1 = 3 divisors with all exponents 3 (we subtract |{1}| = 1 from that count as 1 has no exponent 3). - _David A. Corneth_, Jul 27 2020
The version for distinct prime multiplicities is
A336414.
The version for nonprime perfect powers is
A336416.
Uniform partitions are counted by
A047966.
Numbers with distinct prime multiplicities are
A130091.
Divisors with distinct prime multiplicities are counted by
A181796.
Maximum divisor with distinct prime multiplicities is
A327498.
Uniform divisors are counted by
A327527.
Maximum uniform divisor is
A336618.
1st differences are given by
A048675.
-
Table[Length[Select[Divisors[n!],SameQ@@Last/@FactorInteger[#]&]],{n,0,15}]
-
a(n) = sumdiv(n!, d, my(ex=factor(d)[,2]); (#ex==0) || (vecmin(ex) == vecmax(ex))); \\ Michel Marcus, Jul 24 2020
-
a(n) = {if(n<2, return(1)); my(f = primes(primepi(n)), res = 1, t = #f); f = vector(#f, i, val(n, f[i])); for(i = 1, f[1], while(f[t] < i, t--; ); res+=(1<David A. Corneth, Jul 27 2020
A336417
Number of perfect-power divisors of superprimorials A006939.
Original entry on oeis.org
1, 1, 2, 5, 15, 44, 169, 652, 3106, 15286, 89933, 532476, 3698650, 25749335, 204947216, 1636097441, 14693641859, 132055603656, 1319433514898, 13186485900967, 144978145009105, 1594375302986404, 19128405558986057, 229508085926717076, 2983342885319348522
Offset: 0
The a(0) = 1 through a(4) = 15 divisors:
1 2 12 360 75600
-------------------------
1 1 1 1 1
4 4 4
8 8
9 9
36 16
25
27
36
100
144
216
225
400
900
3600
A336416 gives the same for factorials instead of superprimorials.
A000217 counts prime power divisors of superprimorials.
A006939 gives superprimorials or Chernoff numbers.
A022915 counts permutations of prime indices of superprimorials.
A091050 counts perfect power divisors.
A181818 gives products of superprimorials.
A294068 counts factorizations using perfect powers.
A317829 counts factorizations of superprimorials.
Cf.
A000005,
A027423,
A090630,
A118914,
A124010,
A203025,
A251753,
A327527,
A336419,
A336420,
A336421,
A336426.
-
chern[n_]:=Product[Prime[i]^(n-i+1),{i,n}];
perpouQ[n_]:=Or[n==1,GCD@@FactorInteger[n][[All,2]]>1];
Table[Length[Select[Divisors[chern[n]],perpouQ]],{n,0,5}]
-
a(n) = {1 + sum(k=2, n, moebius(k)*(1 - prod(i=1, n, 1 + i\k)))} \\ Andrew Howroyd, Aug 30 2020
Showing 1-10 of 28 results.
Comments