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.

A366833 Number of times n appears in A362965 (number of primes <= the n-th prime power).

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 1, 3, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Paolo Xausa, Oct 25 2023

Keywords

Comments

Conjecture: a(n) can be only 1, 2, or 3 (with the first occurrences of 3 appearing at n = 4, 9, 30, 327 and 3512).
One less than the number of prime powers between prime(n) and prime(n+1), inclusive. - Gus Wiseman, Jan 09 2025

Crossrefs

Run lengths of A362965.
Subtracting one gives A080101.
For non prime powers we have A368748.
Positions of terms > 1 are A377057.
Positions of 1 are A377286.
Positions of 2 are A377287.
For perfect powers we have A377432.
For squarefree we have A373198.
A000015 gives the least prime power >= n, difference A377282.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A024619 and A361102 list the non prime powers, differences A375708 and A375735.
A031218 gives the greatest prime power <= n, difference A276781.
A046933(n) counts the interval from A008864(n) to A006093(n+1).
A246655 lists the prime powers not including 1.
A366835 counts primes between prime powers.

Programs

  • Mathematica
    With[{upto=1000},Map[Length,Most[Split[PrimePi[Select[Range[upto],PrimePowerQ]]]]]] (* Considers prime powers up to 1000 *)

Formula

a(n) = A080101(n) + 1. - Gus Wiseman, Jan 09 2025

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

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

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.