login
A366835
In the pair (A246655(n), A246655(n+1)), how many primes are there?
9
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,1
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
LINKS
Michael De Vlieger, 1038 X 1038 raster of a(n), n = 1..1077444, read left to right in rows, then top to bottom, showing a(n) = 0 in white, a(n) = 1 in red, and a(n) = 2 in dark blue.
EXAMPLE
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.
MATHEMATICA
With[{upto=500}, Map[Count[#, _?PrimeQ]&, Partition[Select[Range[upto], PrimePowerQ], 2, 1]]] (* Considers prime powers up to 500 *)
PROG
(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
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.
Sequence in context: A185018 A333289 A099075 * A364312 A307016 A375383
KEYWORD
nonn
AUTHOR
Paolo Xausa, Oct 25 2023
STATUS
approved