close
login
A267134
a(n) = n minus the number of primes of form 6m + 1 that are less than n-th prime of form 6m - 1.
0
1, 1, 1, 1, 2, 1, 1, 2, 3, 2, 1, 2, 2, 2, 2, 2, 3, 3, 1, 2, 3, 3, 3, 1, 1, 2, 2, 3, 4, 5, 4, 4, 4, 4, 3, 3, 4, 2, 3, 3, 3, 3, 2, 3, 3, 3, 4, 4, 4, 5, 6, 4, 5, 6, 5, 6, 7, 5, 4, 4, 5, 6, 5, 6, 6, 6, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7, 8, 6, 7, 7, 6, 6, 4, 4, 5, 6, 4, 4, 4, 5, 6
OFFSET
1,5
EXAMPLE
a(5) = 2 because the fifth prime of the form 6m - 1 is 29, there are three primes of the form 6m + 1 less than 29 (namely 7, 13, 19) and 5 - 3 = 2.
MATHEMATICA
s = Prime@Range@120 /. p_ /; Mod[p, 6] != 5 -> Nothing; Table[n - Count[Flatten@ Prime@ Range@ PrimePi@ Take[s, {n}], p_ /; Mod[p, 6] == 1], {n, 120}] (* Michael De Vlieger, Feb 10 2016 *)
CROSSREFS
Sequence in context: A165475 A341456 A319420 * A098280 A005793 A183391
KEYWORD
sign
AUTHOR
Gionata Neri, Jan 10 2016
STATUS
approved