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

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

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

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

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

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