OFFSET
1,2
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Terence Tao, Biases between consecutive primes, blog entry March 14, 2016
FORMULA
Other identities. For all n >= 1:
a(A270189(n)) = n.
MATHEMATICA
Table[Count[Select[Range@ 125, Mod[Prime[# + 1] - Prime@ #, 3] != 0 &], k_ /; k <= n], {n, 85}] (* Michael De Vlieger, Mar 17 2016 *)
Accumulate[If[Mod[#, 3]==0, 0, 1]&/@Differences[Prime[Range[90]]]] (* Harvey P. Dale, Apr 15 2024 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(PARI) a(n) = sum(k=1, n, ((prime(k+1) - prime(k)) % 3) != 0); \\ Michel Marcus, Mar 18 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved