cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

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

Views

Author

Labos Elemer, Mar 03 2000

Keywords

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

Examples

			Consecutive perfect powers are A001597(14) = 121, A001597(13) = 100, so a(13) = 121 - 100 = 21.
		

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.

Crossrefs

For non-perfect-powers (A007916) we have A375706.
The union is A023055.
For prime-powers (A000961 or A246655) we have A057820.
Sorted positions of first appearances are A376268, complement A376519.
For second differences we have A376559.
Ascending and descending points are A376560 and A376561.
A001597 lists perfect-powers.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.

Programs

  • Mathematica
    Differences@ Select[Range@ 3200, # == 1 || GCD @@ FactorInteger[#][[All, 2]] > 1 &] (* Michael De Vlieger, Jun 30 2016, after Ant King at A001597 *)
  • Python
    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

Formula

a(n) = A001597(n+1) - A001597(n). - Jonathan Vos Post, Feb 18 2008
From Amiram Eldar, Jun 30 2023: (Start)
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

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

Views

Author

Gus Wiseman, Sep 28 2024

Keywords

Comments

Perfect-powers A007916 are numbers with a proper integer root.
Does this sequence contain zero?

Examples

			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, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
For first differences we have A053289, union A023055, firsts A376268, A376519.
A000961 lists prime-powers inclusive, exclusive A246655.
A001597 lists perfect-powers, complement A007916.
A112344 counts integer partitions into perfect-powers, factorizations A294068.
For perfect-powers: A053289 (first differences), A376560 (positive curvature), A376561 (negative curvature).
For second differences: A036263 (prime), A073445 (composite), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Differences[Select[Range[1000],perpowQ],2]
  • 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
  • Python
    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
    

A376560 Points of upward concavity in the sequence of perfect-powers (A001597). Positives of A376559.

Original entry on oeis.org

1, 3, 4, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 22, 23, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 46, 47, 48, 49, 50, 53, 54, 55, 57, 58, 60, 61, 62, 63, 64, 65, 67, 68, 69, 72, 73, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2024

Keywords

Comments

These are points at which the second differences are positive.
Perfect-powers (A001597) are numbers with a proper integer root.
Note that, for some sources, upward concavity is negative curvature.

Examples

			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, 33, ...
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, 2, ...
with positive positions (A376560):
  1, 3, 4, 6, 8, 9, 10, 11, 12, 15, 16, 17, 20, 22, 23, 26, 27, 28, 31, 32, 33, 34, ...
		

Crossrefs

The version for A000002 is A022297, complement A025505. See also A054354, A376604.
For first differences we have A053289, union A023055, firsts A376268, A376519.
For primes instead of perfect-powers we have A258025.
These are positions of positive terms in A376559.
For downward concavity we have A376561 (probably the complement).
A001597 lists the perfect-powers.
A064113 lists positions of adjacent equal prime gaps.
A333254 gives run-lengths of differences between consecutive primes.
Second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).

Programs

  • Maple
    N:= 10^6: # to use perfect powers <= N
    S:= {1,seq(seq(i^j,j=2..floor(log[i](N))),i=2..isqrt(N))}:
    L:= sort(convert(S,list)):
    DL:= L[2..-1]-L[1..-2]:
    D2L:= DL[2..-1]-DL[1..-2]:
    select(i -> D2L[i]>0, [$1..nops(D2L)]); # Robert Israel, Dec 01 2024
  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Join@@Position[Sign[Differences[Select[Range[1000],perpowQ],2]],1]

A376561 Points of downward concavity in the sequence of perfect-powers (A001597).

Original entry on oeis.org

2, 5, 7, 13, 14, 18, 19, 21, 24, 25, 29, 30, 39, 40, 45, 51, 52, 56, 59, 66, 70, 71, 74, 87, 94, 101, 102, 108, 110, 112, 113, 119, 127, 135, 143, 144, 156, 157, 160, 161, 169, 178, 187, 196, 205, 206, 215, 224, 225, 234, 244, 263, 273, 283, 284, 293, 294, 304
Offset: 1

Views

Author

Gus Wiseman, Sep 30 2024

Keywords

Comments

These are points at which the second differences are negative.
Perfect-powers (A001597) are numbers with a proper integer root.
Note that, for some sources, downward concavity is positive curvature.
From Robert Israel, Oct 31 2024: (Start)
The first case of two consecutive numbers in the sequence is a(4) = 13 and a(5) = 14.
The first case of three consecutive numbers is a(293) = 2735, a(294) = 2736, a(295) = 2737.
The first case of four consecutive numbers, if it exists, involves a(k) with k > 69755. (End)

Examples

			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, 33, ...
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, 2, ...
with negative positions (A376561):
  2, 5, 7, 13, 14, 18, 19, 21, 24, 25, 29, 30, 39, 40, 45, 51, 52, 56, 59, 66, 70, ...
		

Crossrefs

The version for A000002 is A025505, complement A022297. See also A054354, A376604.
For first differences we have A053289, union A023055, firsts A376268, A376519.
For primes instead of perfect-powers we have A258026.
For upward concavity we have A376560 (probably the complement).
A000961 lists the prime-powers inclusive, exclusive A246655.
A001597 lists the perfect-powers.
A007916 lists the non-perfect-powers.
A112344 counts partitions into perfect-powers, factorizations A294068.
A333254 gives run-lengths of differences between consecutive primes.
Second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power), A376599 (non-prime-power).

Programs

  • Maple
    N:= 10^6: # to use perfect powers <= N
    P:= {seq(seq(i^m,i=2..floor(N^(1/m))), m=2 .. ilog2(N))}: nP:= nops(P):
    P:= sort(convert(P,list)):
    select(i -> 2*P[i] > P[i-1]+P[i+1], [$2..nP-1]); # Robert Israel, Oct 31 2024
  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Join@@Position[Sign[Differences[Select[Range[1000],perpowQ],2]],-1]

A376519 Positions of terms not appearing for the first time in the first differences (A053289) of perfect-powers (A001597).

Original entry on oeis.org

8, 14, 15, 20, 22, 25, 26, 31, 40, 46, 52, 59, 68, 75, 88, 96, 102, 110, 111, 112, 114, 128, 136, 144, 145, 162, 180, 188, 198, 216, 226, 235, 246, 264, 265, 275, 285, 295, 305, 316, 317, 325, 328, 338, 350, 360, 367, 373, 385, 406, 416, 417, 419, 431, 443
Offset: 1

Views

Author

Gus Wiseman, Sep 28 2024

Keywords

Examples

			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 positions of latter appearances (A376519):
  8, 14, 15, 20, 22, 25, 26, 31, 40, 46, 52, 59, 68, 75, 88, 96, 102, 110, 111, ...
		

Crossrefs

These are the sorted positions of latter appearances in A053289 (union A023055).
The complement is A376268.
A053707 lists first differences of consecutive prime-powers.
A333254 lists run-lengths of differences between consecutive primes.
Other families of numbers and their first differences:
For prime numbers (A000040) we have A001223.
For composite numbers (A002808) we have A073783.
For nonprime numbers (A018252) we have A065310.
For perfect powers (A001597) we have A053289.
For non-perfect-powers (A007916) we have A375706.
For squarefree numbers (A005117) we have A076259.
For nonsquarefree numbers (A013929) we have A078147.
For prime-powers inclusive (A000961) we have A057820.
For prime-powers exclusive (A246655) we have A057820(>1).
For non-prime-powers inclusive (A024619) we have A375735.
For non-prime-powers exclusive (A361102) we have A375708.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    q=Differences[Select[Range[1000],perpowQ]];
    Select[Range[Length[q]],MemberQ[Take[q,#-1],q[[#]]]&]
Showing 1-5 of 5 results.