OFFSET
1,4
COMMENTS
The maximum value of terms in the sequence, through the (10^5)th term, is 2. - Harvey P. Dale, Aug 24 2014
This is conjectured to be the maximum, see also A366833. - Gus Wiseman, Nov 06 2024
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = A366833(n) - 1. - Gus Wiseman, Nov 06 2024
EXAMPLE
MAPLE
a := proc(n) local c, k, p: c, p := 0, ithprime(n): for k from p+1 to nextprime(p)-1 do if nops(numtheory:-factorset(k)) = 1 then c := c+1: fi: od: c: end:
seq(a(n), n = 1 .. 105); # Lorenzo Sauras Altuzarra, Jul 08 2022
MATHEMATICA
prpwQ[n_]:=Module[{fi=FactorInteger[n]}, Length[fi]==1&&fi[[1, 2]]>1]; nn=600; With[{pwrs=Table[If[prpwQ[n], 1, 0], {n, nn}]}, Table[Total[ Take[ pwrs, {Prime[n], Prime[n+1]}]], {n, PrimePi[nn]-1}]] (* Harvey P. Dale, Aug 24 2014 *)
Table[Length[Select[Range[Prime[n]+1, Prime[n+1]-1], PrimePowerQ]], {n, 30}] (* Gus Wiseman, Nov 06 2024 *)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Reinhard Zumkeller, Jan 28 2003
STATUS
approved