OFFSET
1,1
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
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