Displaying 1-10 of 29 results found.
First differences of consecutive perfect powers ( A001597).
+10
87
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
COMMENTS
Michel Waldschmidt writes: Conjecture 1.3 (Pillai). Let k be a positive integer. The equation x^p - y^q = k where the unknowns x, y, p and q take integer values, all >= 2, has only finitely many solutions (x,y,p,q). This means that in the increasing sequence of perfect powers [ A001597] the difference between two consecutive terms [the present sequence] tends to infinity. It is not even known whether for, say, k=2, Pillai's equation has only finitely many solutions. A related open question is whether the number 6 occurs as a difference between two perfect powers. See Sierpiński [1970], problem 238a, p. 116. - Jonathan Vos Post, Feb 18 2008
Are there are any adjacent equal terms? - Gus Wiseman, Oct 08 2024
REFERENCES
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.
FORMULA
Formulas from Jakimczuk (2016):
Lim sup_{n->oo} a(n)/(2*n) = 1.
Lim inf_{n->oo} a(n)/(2*n)^(2/3 + eps) = 0. (End)
Can be obtained by inserting 0 between 3 and 6 in A375702 and then adding 1 to all terms. In particular, for n > 2, a(n+1) - 1 = A375702(n). - Gus Wiseman, Sep 14 2024
EXAMPLE
Consecutive perfect powers are A001597(14) = 121, A001597(13) = 100, so a(13) = 121 - 100 = 21.
PROG
(Python)
from sympy import mobius, integer_nthroot
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
CROSSREFS
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.
Second differences of consecutive nonsquarefree numbers ( A013929). First differences of A078147.
+10
44
-3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, 3, 0, -1, -2, 3, -3, 2, 1, -2, 0, 2, -2, -1, 0, 3, 0, 0, 0, -3, 2, -2, 2, -2, 0, 1, 2, -1, -2, 3, 0, -1, -2, 1, 0, -1, 2, 1, -2, 0, 2, -3, 1, -1, 2, -2, 3, 0, 0, -3, 2, 1, -2, 0, 2
COMMENTS
The range is {-3, -2, -1, 0, 1, 2, 3}.
EXAMPLE
The nonsquarefree numbers ( A013929) are:
4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, ...
4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, 4, 4, ...
-3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, ...
MATHEMATICA
Differences[Select[Range[100], !SquareFreeQ[#]&], 2]
PROG
(Python)
from math import isqrt
from sympy import mobius, factorint
def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k: m, k = k, f(k)
k = next(i for i in range(1, 5) if any(d>1 for d in factorint(m+i).values()))
return next(i for i in range(1-k, 5-k) if any(d>1 for d in factorint(m+(k<<1)+i).values())) # Chai Wah Wu, Oct 02 2024
CROSSREFS
The first differences were A078147.
A064113 lists positions of adjacent equal prime gaps.
A114374 counts partitions into nonsquarefree numbers.
A333254 lists run-lengths of differences between consecutive primes.
For nonsquarefree numbers: A013929 (terms), A078147 (first differences), A376594 (inflections and undulations), A376595 (nonzero curvature).
Cf. A061398, A053797, A053806, A120992, A182853, A251092, A373198, A375707, A376305, A376306, A376311, A376312, A376655.
Least perfect-power >= n.
+10
38
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
COMMENTS
Perfect-powers ( A001597) are numbers with a proper integer root, complement A007916.
FORMULA
Positions of first appearances for n > 2 are A216765(n-2) = A001597(n-1) + 1.
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Table[NestWhile[#+1&, n, #>1&&!perpowQ[#]&], {n, 100}]
PROG
(Python)
from sympy import mobius, integer_nthroot
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
CROSSREFS
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.
Second differences of A002808, the sequence of composites.
+10
37
0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, 0, 1, 0, -1, 0, 0, 0, 1, -1, 0, 1, -1, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0
FORMULA
a(n) = c(n+2)-2*c(n+1)+c(n), where c(n)= A002808(n).
EXAMPLE
The composite numbers ( A002808) are:
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, ...
2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, ...
0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1, -1, ...
(End)
MATHEMATICA
c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] Table[(c[w+2]-2*c[w+1])+c[w]), {w, 1, 1000}]
(* second program *)
Differences[Select[Range[100], CompositeQ], 2] (* Gus Wiseman, Oct 08 2024 *)
PROG
(Haskell)
a073445 n = a073445_list !! (n-1)
a073445_list = zipWith (-) (tail a073783_list) a073783_list
(Python)
from sympy import primepi
def iterfun(f, n=0):
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m
return (a:=iterfun(f:=lambda x:n+primepi(x)+1, n))-((b:=iterfun(lambda x:f(x)+1, a))<<1)+iterfun(lambda x:f(x)+2, b) # Chai Wah Wu, Oct 03 2024
CROSSREFS
A002808 lists the composite numbers.
A064113 lists positions of adjacent equal prime gaps.
A333254 gives run-lengths of differences between consecutive primes.
Second differences of consecutive prime-powers inclusive ( A000961). First differences of A057820.
+10
32
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
COMMENTS
For the exclusive version, shift left once.
EXAMPLE
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, ...
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, ...
0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
MATHEMATICA
Differences[Select[Range[1000], #==1||PrimePowerQ[#]&], 2]
PROG
(Python)
from sympy import primepi, integer_nthroot
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
CROSSREFS
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).
Second differences of consecutive squarefree numbers ( A005117). First differences of A076259.
+10
29
0, 1, -1, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 2, 0, -2, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 2, -2, 3, -2, 0, 0, -1, 0, 1, -1, 2, -2, 0, 1, -1, 0, 1, -1, 2, -2, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 1, 2, -3, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 2, -2, 2, -2, 3, -2, -1
EXAMPLE
The squarefree numbers ( A005117) are:
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, ...
1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, ...
0, 1, -1, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 2, 0, -2, 0, 1, -1, 0, 1, -1, 0, 1, ...
MATHEMATICA
Differences[Select[Range[100], SquareFreeQ], 2]
PROG
(Python)
from math import isqrt
from sympy import mobius
def iterfun(f, n=0):
m, k = n, f(n)
while m != k: m, k = k, f(k)
return m
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
a = iterfun(f, n)
b = iterfun(lambda x:f(x)+1, a)
return a+iterfun(lambda x:f(x)+2, b)-(b<<1) # Chai Wah Wu, Oct 02 2024
CROSSREFS
Sorted positions of first appearances are A376655.
A073576 counts integer partitions into squarefree numbers, factorizations A050320.
A333254 lists run-lengths of differences between consecutive primes.
For squarefree numbers: A076259 (first differences), A376591 (inflections and undulations), A376592 (nonzero curvature), A376655 (sorted first positions).
Cf. A000961, A007674, A053797, A053806, A061398, A072284, A112925, A112926, A120992, A251092, A373198, A376342.
Second differences of consecutive perfect powers ( A001597). First differences of A053289.
+10
28
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
COMMENTS
Perfect-powers A007916 are numbers with a proper integer root.
Does this sequence contain zero?
EXAMPLE
1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, ...
3, 4, 1, 7, 9, 2, 5, 4, 13, 15, 17, 19, 21, 4, 3, 16, 25, 27, 20, 9, 18, 13, ...
1, -3, 6, 2, -7, 3, -1, 9, 2, 2, 2, 2, -17, -1, 13, 9, 2, -7, -11, 9, -5, 20, ...
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Differences[Select[Range[1000], perpowQ], 2]
PROG
(Python)
from sympy import mobius, integer_nthroot
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
(PARI) 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
CROSSREFS
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.
Second differences of consecutive non-prime-powers inclusive ( A024619). First differences of A375735.
+10
28
-2, 0, -1, 2, -1, -1, 0, 1, 0, 0, 0, 1, -2, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, -1, 1, -1, 1, -1, 0, 1, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, -1, 0, 0, 0, 0, 0, 1, -1, 0
COMMENTS
Inclusive means 1 is a prime-power but not a non-prime-power. For the exclusive version, shift left once.
EXAMPLE
The non-prime-powers inclusive ( A024619) are:
6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 36, 38, 39, 40, ...
4, 2, 2, 1, 3, 2, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, ...
-2, 0, -1, 2, -1, -1, 0, 1, 0, 0, 0, 1, -2, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, ...
MATHEMATICA
Differences[Select[Range[100], !(#==1||PrimePowerQ[#])&], 2]
PROG
(Python)
from sympy import primepi, integer_nthroot
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+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
Numbers k such that there is a unique perfect-power x in the range prime(k) < x < prime(k+1).
+10
26
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
COMMENTS
Perfect-powers ( A001597) are numbers with a proper integer root, complement A007916.
EXAMPLE
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.
MATHEMATICA
perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All, 2]]>1;
Select[Range[100], Length[Select[Range[Prime[#]+1, Prime[#+1]-1], perpowQ]]==1&]
CROSSREFS
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.
Inflection and undulation points in the sequence of prime-powers inclusive ( A000961).
+10
23
1, 2, 3, 6, 8, 14, 15, 16, 27, 32, 50, 61, 67, 72, 85, 92, 93, 124, 129, 132, 136, 141, 185, 190, 211, 214, 221, 226, 268, 292, 301, 302, 322, 374, 394, 423, 456, 463, 502, 503, 547, 559, 560, 593, 604, 640, 646, 663, 671, 675, 710, 726, 727, 746, 754, 755
COMMENTS
These are points at which the second differences ( A376596) are zero.
Inclusive means 1 is a prime-power. For the exclusive version, subtract 1 and shift left.
EXAMPLE
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, ...
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, ...
0, 0, 0, 1, -1, 0, 1, 0, 1, -2, 1, 2, -2, 0, 0, 0, -1, 4, -1, -2, 2, -2, 2, 2, ...
1, 2, 3, 6, 8, 14, 15, 16, 27, 32, 50, 61, 67, 72, 85, 92, 93, 124, 129, 132, ...
MATHEMATICA
Join@@Position[Differences[Select[Range[1000], #==1||PrimePowerQ[#]&], 2], 0]
CROSSREFS
A064113 lists positions of adjacent equal prime gaps.
For prime-powers inclusive: A057820 (first differences), A376596 (second differences), A376598 (nonzero curvature).
Search completed in 0.022 seconds
|