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

A366835 In the pair (A246655(n), A246655(n+1)), how many primes are there?

Original entry on oeis.org

2, 1, 1, 2, 1, 0, 1, 2, 1, 1, 2, 2, 1, 0, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2
Offset: 1

Views

Author

Paolo Xausa, Oct 25 2023

Keywords

Comments

First 0 terms appear at n = 6, 14, 41, 359, 3589, corresponding to consecutive prime powers (8,9), (25,27), (121,125), (2187,2197) and (32761,32768), respectively (cf. A068315 and A068435).
There cannot be primes strictly between consecutive prime powers, so we get the same result considering the whole interval (not just the pair). - Gus Wiseman, Dec 25 2024

Examples

			a(1) = 2 because in the first prime power pair (2 and 3) there are two primes.
a(14) = 0 because in the 14th prime power pair (25 and 27) there are no primes.
		

Crossrefs

For perfect powers instead of prime powers we have A080769.
Positions of 1 are A379155, indices of A379157.
Positions of 0 are A379156, indices of A068315.
Positions of 2 are A379158, indices of A379541.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A031218 gives the greatest prime power <= n.
A065514 gives the greatest prime power < prime(n), difference A377289.
A080101 and A366833 count prime powers between primes, see A053607, A304521.
A246655 lists the prime powers, differences A057820.

Programs

  • Mathematica
    With[{upto=500},Map[Count[#,_?PrimeQ]&,Partition[Select[Range[upto],PrimePowerQ],2,1]]] (* Considers prime powers up to 500 *)
  • PARI
    lista(nn) = my(v=[p| p <- [1..nn], isprimepower(p)]); vector(#v-1, k, isprime(v[k]) + isprime(v[k+1])); \\ Michel Marcus, Oct 26 2023

A379155 Numbers k such that there is a unique prime between the k-th and (k+1)-th prime powers (A246655).

Original entry on oeis.org

2, 3, 5, 7, 9, 10, 13, 15, 17, 18, 22, 23, 26, 27, 31, 32, 40, 42, 43, 44, 52, 53, 67, 68, 69, 70, 77, 78, 85, 86, 90, 91, 116, 117, 119, 120, 135, 136, 151, 152, 169, 170, 186, 187, 197, 198, 243, 244, 246, 247, 291, 292, 312, 313, 339, 340, 358, 360, 362
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2024

Keywords

Comments

Numbers k such that exactly one of A246655(k) and A246655(k+1) is prime. - Robert Israel, Jan 22 2025
The prime powers themselves are: 3, 4, 7, 9, 13, 16, 23, 27, 31, 32, 47, 49, 61, 64, ...

Examples

			The 4th and 5th prime powers are 5 and 7, with interval (5,6,7) containing two primes, so 4 is not in the sequence.
The 13th and 14th prime powers are 23 and 25, with interval (23,24,25) containing only one prime, so 13 is in the sequence.
The 18th and 19th prime powers are 32 and 37, with interval (32,33,34,35,36,37) containing just one prime 37, so 18 is in the sequence.
		

Crossrefs

These are the positions of 1 in A366835, for perfect powers A080769.
For perfect powers instead of prime powers we have A378368.
For no primes we have A379156, for perfect powers A274605.
The prime powers themselves are A379157, for previous A175106.
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.

Programs

  • Maple
    N:= 1000: # for terms k where A246655(k+1) <+ N
    P:= select(isprime,[2,seq(i,i=3..N,2)]):
    S:= convert(P,set):
    for p in P while p^2 <= N do
      S:= S union {seq(p^j,j=2..ilog[p](N))}
    od:
    PP:= sort(convert(S,list)):
    state:= 1: Res:= NULL:
    ip:= 2:
    for i from 2 to nops(PP) do
      if PP[i] = P[ip] then
        if state = 0 then Res:= Res,i-1 fi;
        state:= 1;
        ip:= ip+1;
      else
        if state = 1 then Res:= Res,i-1 fi;
        state:= 0;
      fi
    od:
    Res; # Robert Israel, Jan 22 2025
  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],Length[Select[Range[v[[#]],v[[#+1]]],PrimeQ]]==1&]

Formula

A246655(a(n)) = A379157(n).

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

A379156 Positions in A246655 (prime powers) of terms q such that there is no prime between q and the next prime power.

Original entry on oeis.org

6, 14, 41, 359, 3589
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2024

Keywords

Comments

The powers of primes themselves are 8, 25, 121, 2187, 32761, ... (A068315).

Crossrefs

The prime powers themselves are A068315, for just one prime A379157.
For perfect powers instead of prime powers we have A274605.
Positions of 0 in A366835.
For just one prime we have A379155, for perfect powers A378368.
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.
A131605 finds perfect powers that are not prime powers.
A246655 lists the prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],FreeQ[Range[v[[#]],v[[#+1]]],_?PrimeQ]&]

Formula

A246655(a(n)) = A068315(n).

A379158 Numbers m such that the consecutive prime powers A246655(m) and A246655(m+1) are both prime.

Original entry on oeis.org

1, 4, 8, 11, 12, 16, 19, 20, 21, 24, 25, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 71, 72, 73, 74, 75, 76, 79, 80, 81, 82, 83, 84, 87, 88, 89, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Gus Wiseman, Dec 23 2024

Keywords

Comments

Also positions of 2 in A366835.

Examples

			The 4th and 5th prime powers are 5 and 7, which are both prime, so 4 is in the sequence.
The 12th and 13th prime powers are 19 and 23, which are both prime, so 12 is in the sequence.
		

Crossrefs

Positions of adjacent primes in A246655 (prime powers).
Positions of 2 in A366835.
For just one prime we have A379155, positions of prime powers in A379157.
For no primes we have A379156, positions of prime powers in A068315.
The primes powers themselves are A379541.
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.
A131605 finds perfect powers that are not prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],PrimeQ[v[[#]]]&&PrimeQ[v[[#+1]]]&]

Formula

A246655(a(n)) = A379541(n).

A379541 Prime numbers such that the next greatest prime power is also prime.

Original entry on oeis.org

2, 5, 11, 17, 19, 29, 37, 41, 43, 53, 59, 67, 71, 73, 83, 89, 97, 101, 103, 107, 109, 131, 137, 139, 149, 151, 157, 163, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 257, 263, 269, 271, 277, 281, 293, 307, 311, 313, 317, 331, 347, 349, 353
Offset: 1

Views

Author

Gus Wiseman, Dec 24 2024

Keywords

Examples

			After 13 the next prime power is 16, which is not prime, so 13 is not in the sequence.
After 19 the next prime power is 23, which is prime, so 19 is in the sequence.
		

Crossrefs

For no primes we have A068315, positions A379156.
Lesser of adjacent primes in A246655 (prime powers).
The indices of these primes are A377286.
For just one prime we have A379157, positions A379155.
Positions in the prime powers are A379158 = positions of 2 in A366835.
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.
A131605 finds perfect powers that are not prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

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

Formula

a(n) = A246655(A379158(n)).
Showing 1-7 of 7 results.