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-2 of 2 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

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).
Showing 1-2 of 2 results.