OFFSET
1,4
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
P:= select(isprime, [seq(i, i=5..1000, 2)]):
Delta:= P[2..-1]-P[1..-2]:
f:= t -> (t + 2*(t+1 mod 3) - 2)/3:
1, 1, op(map(f, Delta)); # Robert Israel, Jun 19 2019
MATHEMATICA
s={}; Do[c=0; Do[If[MemberQ[{2, 4}, Mod[i, 6]], c=c+1], {i, Prime[n], Prime[n+1]}]; AppendTo[s, c], {n, 105}]; s (* James C. McMahon, Aug 18 2024 *)
PROG
(Magma) [ #[ k: k in [NthPrime(n)..NthPrime(n+1)] | r eq 2 or r eq 4 where r is k mod 6 ]: n in [1..105] ]; /* Klaus Brockhaus, Apr 15 2007 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Giovanni Teofilatto, Apr 08 2007
EXTENSIONS
Edited, corrected and extended by Klaus Brockhaus, Apr 15 2007
STATUS
approved