login
A366835
In the pair (A246655(n), A246655(n+1)), how many primes are there?
4
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).
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
KEYWORD
nonn
AUTHOR
Paolo Xausa, Oct 25 2023
STATUS
approved