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-8 of 8 results.

A116455 Perfect powers n with no primes between n and the next smaller perfect power, which is in A116086.

Original entry on oeis.org

9, 27, 36, 125, 2197, 3136, 32768, 79524, 97344, 503284375
Offset: 1

Views

Author

T. D. Noe, Mar 28 2006

Keywords

Comments

No other terms < 10^18. - Jud McCranie, Nov 03 2013
No other terms < 4.5*10^18. - Giovanni Resta, Apr 28 2014

Crossrefs

Cf. A001597 (perfect powers), A116086.
Cf. A068435 (for prime powers).

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

Views

Author

Gus Wiseman, Nov 02 2024

Keywords

Comments

Perfect powers (A001597) are numbers with a proper integer root, the complement of A007916.
Is this sequence finite?
The Redmond-Sun conjecture (see A308658) implies that this sequence is finite. - Pontus von Brömssen, Nov 05 2024

Examples

			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.
		

Crossrefs

For powers of 2 see A013597, A014210, A014234, A188951, A244508, A377467.
For no prime-powers we have A377286, ones in A080101.
For a unique prime-power we have A377287.
For squarefree numbers see A377430, A061398, A377431, A068360, A224363.
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.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A001597 lists the perfect powers, differences A053289, seconds A376559.
A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
A046933 counts the interval from A008864(n) to A006093(n+1).
A081676 gives the greatest perfect power <= n.
A131605 lists perfect powers that are not prime-powers.
A246655 lists the prime-powers not including 1, complement A361102.
A366833 counts prime-powers between primes, see A053607, A304521.
A377468 gives the least perfect power > n.

Programs

  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[100],Count[Range[Prime[#]+1, Prime[#+1]-1],_?perpowQ]>1&]
  • Python
    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

Formula

a(n) = A000720(A116086(n)) = A000720(A116455(n)) for n <= 10. This would hold for all n if there do not exist more than two perfect powers between any two consecutive primes, which is implied by the Redmond-Sun conjecture. - Pontus von Brömssen, Nov 05 2024

Extensions

a(10) from Pontus von Brömssen, Nov 04 2024

A274605 Numbers k such that there is no prime between the k-th perfect power and the (k+1)-st perfect power.

Original entry on oeis.org

3, 6, 8, 14, 60, 72, 216, 328, 361, 23268
Offset: 1

Views

Author

Felix Fröhlich, Jun 30 2016

Keywords

Comments

The perfect powers are given in A001597.
Numbers k such that A080769(k) = 0.
Index of A116086(n) in A001597.
Numbers k such that A000720(A001597(k)) = A000720(A001597(k+1)).
It has been conjectured that 23268 is the last term of the sequence.

Examples

			25 is the 6th perfect power, i.e., 25 = A001597(6), and there is no prime between 25 and the next larger perfect power A001597(7) = 27, so 25 is a term of A116086, and thus 6 is a term of this sequence.
		

Crossrefs

Programs

Formula

a(n) = A069623(A116086(n)). - Pontus von Brömssen, Nov 05 2024

A068315 For numbers k such that A025474(k) > 1 and A025474(k+1) > 1, sequence gives A000961(k).

Original entry on oeis.org

8, 25, 121, 2187, 32761
Offset: 1

Views

Author

Naohiro Nomoto, Mar 08 2002

Keywords

Comments

Equivalently, prime powers (either A000961 or A246655) q such that q and the next prime power are both composite numbers. - Paolo Xausa, Oct 25 2023

Examples

			The interval (121,122,123,124,125) contains no primes, so 121 is in the sequence. - _Gus Wiseman_, Dec 24 2024
		

Crossrefs

Bisection of A068435.
For perfect powers instead of prime powers we have A116086, indices A274605.
The position of a(k) in the prime powers A246655 is A379156(k).
For just one prime we have A379157, indices A379155.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A031218 gives the greatest prime power <= n.
A046933 gives run-lengths of composites between primes.
A065514 gives the greatest prime power < prime(n), difference A377289.
A246655 lists the prime powers, differences A057820.
A366833 counts prime powers between primes, see A053607, A304521.
A366835 counts primes between prime powers.

Programs

  • Mathematica
    With[{upto=33000},Map[First,Select[Partition[Select[Range[upto],PrimePowerQ],2,1],NoneTrue[#,PrimeQ]&]]] (* Paolo Xausa, Oct 25 2023 *)

Formula

a(n) = A246655(A379156(n)). - Gus Wiseman, Dec 24 2024

Extensions

Definition corrected by Jinyuan Wang, Sep 05 2020

A068435 Consecutive prime powers without a prime between them.

Original entry on oeis.org

8, 9, 25, 27, 121, 125, 2187, 2197, 32761, 32768
Offset: 1

Views

Author

Jon Perry, Mar 09 2002

Keywords

Comments

From David A. Corneth, Aug 24 2019: (Start)
Only 5 pairs are known up to 4*10^18. Legendre's conjecture states that there is a prime number between n^2 and (n + 1)^2 for every positive integer n. The conjecture has been verified up to n = 2*10^9. So to that bound we only have to check for two prime powers where at least one has an exponent of at least 3. That has been done to prime powers <= 10^22.
If there is another pair besides the first five listed with both numbers <= 10^22 then Legendre's conjecture is false.
Proof: If there is another such pair with both numbers <= 10^22 then it must be of the form [p^2, q^2] where p is a prime and q is the least prime larger than p. Then q - p >= 2 (as p != 2). So there is no prime between p^2 and q^2 and hence there is no prime between p^2 and (p+1)^2. This is a counterexample to Legendre's conjecture. (End)

Examples

			8 = 2^3, 9 = 3^2, there is no prime between 8 and 9.
25 = 5^2, 27 = 3^3, there is no prime between 25 and 27.
		

Crossrefs

Cf. A116086 and A116455 (for perfect powers, but not necessarily prime powers).

Programs

  • Mathematica
    With[{upto=33000},Select[Partition[Select[Range[upto],PrimePowerQ],2,1],NoneTrue[#,PrimeQ]&]] (* Paolo Xausa, Oct 29 2023 *)
  • PARI
    ispp(x) = !isprime(x) && isprimepower(x);
    lista(nn=50000) = {my(prec = 0); for (i=1, nn, if (ispp(i), if (! prec, prec = i, if (primepi(i) == primepi(prec), print1(prec, ", ", i, ", ")); prec = i;);););} \\ Michel Marcus, Aug 24 2019

A379157 Prime powers p such that the interval from p to the next prime power contains a unique prime number.

Original entry on oeis.org

3, 4, 7, 9, 13, 16, 23, 27, 31, 32, 47, 49, 61, 64, 79, 81, 113, 125, 127, 128, 167, 169, 241, 243, 251, 256, 283, 289, 337, 343, 359, 361, 509, 512, 523, 529, 619, 625, 727, 729, 839, 841, 953, 961, 1021, 1024, 1327, 1331, 1367, 1369, 1669, 1681, 1847, 1849
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2024

Keywords

Examples

			The next prime power after 32 is 37, with interval (32,33,34,35,36,37) containing just one prime 37, so 32 is in the sequence.
		

Crossrefs

For no primes we have A068315/A379156, for perfect powers A116086/A274605.
The previous instead of next prime power we have A175106.
For perfect powers instead of prime powers we have A378355.
The positions of these prime powers (in A246655) are A379155.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A031218 gives the greatest prime power <= n.
A065514 gives the greatest prime power < prime(n), difference A377289.
A246655 lists the prime powers.
A366833 counts prime powers between primes, see A053607, A304521.
A366835 counts primes between prime powers, for perfect powers A080769.

Programs

  • Mathematica
    v=Select[Range[100],PrimePowerQ]
    nextpripow[n_]:=NestWhile[#+1&,n+1,!PrimePowerQ[#]&]
    Select[v,Length[Select[Range[#,nextpripow[#]],PrimeQ]]==1&]

Formula

a(n) = A246655(A379155(n)).

A379154 Prime numbers p such that the interval from p to the next prime number contains a unique perfect power.

Original entry on oeis.org

3, 13, 47, 61, 79, 97, 127, 139, 167, 193, 211, 223, 241, 251, 283, 317, 337, 359, 397, 439, 479, 509, 523, 571, 619, 673, 727, 773, 839, 887, 953, 997, 1021, 1087, 1153, 1223, 1291, 1327, 1367, 1439, 1511, 1597, 1669, 1723, 1759, 1847, 1933, 2017, 2039, 2113
Offset: 1

Views

Author

Gus Wiseman, Dec 18 2024

Keywords

Comments

Perfect powers (A001597) are 1 and numbers with a proper integer root.

Examples

			The prime after 13 is 17, and the interval (13,14,15,16,17) contains only one perfect power 16, so 13 is in the sequence.
		

Crossrefs

The indices of these primes are one plus the positions of 1 in A377432.
For zero instead of one perfect power we have the primes indexed by A377436.
The indices of these primes are A377434.
Swapping "prime" with "perfect power" gives A378355, indices A378368.
For previous instead of next prime we have A378364.
A000040 lists the primes, differences A001223.
A001597 lists the perfect powers, differences A053289.
A007916 lists the non perfect powers, differences A375706.
A081676 gives the greatest perfect power <= n.
A116086 gives perfect powers with no primes between them and the next perfect power.
A366833 counts prime powers between primes, see A053607, A304521.
A377468 gives the least perfect power > n.

Programs

  • Maple
    N:= 10^4: # to get all entries <= N
    S:={seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))}:
    S:= sort(convert(S,list)):
    J:= select(i -> nextprime(S[i]) < S[i+1] and prevprime(S[i]) > S[i-1], [$2..nops(S)-1]):
    J:= [1,op(J)]:
    map(prevprime, S[J]); # Robert Israel, Jan 19 2025
  • Mathematica
    perpowQ[n_]:=n==1||GCD@@FactorInteger[n][[All,2]]>1;
    Select[Range[1000],PrimeQ[#]&&Length[Select[Range[#,NextPrime[#]],perpowQ]]==1&]
  • PARI
    is_a379154(n) = isprime(n) && #select(x->ispower(x), [n+1..nextprime(n+1)-1])==1 \\ Hugo Pfoertner, Dec 19 2024

Formula

a(n) = A151799(A378364(n+1)).

A293190 a(n) = |{A001597(n) <= k <= A001597(n+1): 2*k^2-1 is prime}|.

Original entry on oeis.org

3, 4, 1, 4, 6, 1, 1, 2, 9, 8, 6, 7, 7, 1, 3, 6, 8, 11, 8, 1, 6, 5, 11, 14, 4, 2, 12, 14, 16, 8, 6, 15, 13, 9, 16, 16, 15, 15, 13, 10, 6, 16, 21, 16, 11, 4, 8, 22, 23, 17, 20, 7, 8, 23, 18, 21, 4, 23, 13, 1, 4, 24, 28, 24, 24, 24, 8, 14, 23, 24, 25, 1, 24, 15, 2, 21, 29, 26, 24, 35, 27, 25, 31, 30, 31, 30, 24, 4, 30, 30, 32, 30, 35, 31, 13, 13, 33, 31, 29, 31
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 01 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0. In other words, for any perfect powers x^m and y^n with 0 < x^m < y^n, there is an integer z with x^m <= z <= y^n such that 2*z^2 - 1 is prime.
(ii) For any perfect powers x^m and y^n with 0 < x^m < y^n, there is an integer z with x^m <= z <= y^n such that 2*z + 3 (or 20*z^2 + 3) is prime.
(iii) For perfect powers x^m and y^n with 0 < x^m < y^n, there is a practical number q (cf. A005153) with x^m <= q <= y^n, unless x^m = 5^2 and y^n = 3^3, or x^m = 11^2 and y^n = 5^3, or x^m = 22434^2 and y^n = 55^5.
Compare this with the Redmond-Sun conjecture.

Examples

			a(1) = 3 since 2*2^2 - 1, 2*3^2-1 and 2*4^2-1 are all prime but 2*1^2 - 1 is not prime.
a(3) = 1 since A001597(3) = 8, A001597(4) = 9, 2*8^2 - 1 = 127 is prime but 2*9^2 - 1 is composite.
a(6) = 1 since A001597(6) = 25, A001597(7) = 27, 2*25^2 - 1 = 1249 is prime but 2*26^2 - 1 and 2*27^2 - 1 are composite.
a(14) = 1 since A001597(14) = 121, A001597(15) = 125, 2*125^2
- 1 = 31249 is prime but 2*k^2 - 1 is composite for every k = 121, 122, 123, 124.
a(361) = 1 since A001597(361) = 46^3 = 97336, A001597(362) = 312^2 = 97344, and k = 97342 is the only number among 97336,...,97344 with 2*k^2 - 1 prime.
		

Crossrefs

Programs

  • Mathematica
    n=1;m=1;Do[Do[If[IntegerQ[k^(1/Prime[i])],Print[n," ",Sum[Boole[PrimeQ[2j^2-1]],{j,m,k}]];n=n+1;m=k;Goto[aa]],{i,1,PrimePi[Log[2,k]]}];Label[aa],{k,2,6561}]
Showing 1-8 of 8 results.