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.

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