login
A123635
Residue mod 3 of average of n-th and (n+1)st odd primes.
0
1, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 2, 0, 1, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 2, 2, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 2, 0, 0, 2, 2, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 1, 1, 0, 2, 2, 0, 1, 0
OFFSET
1,8
FORMULA
a(n) = (p(n)+p(n+1))/2 mod 3, where p(n) = n-th odd prime.
EXAMPLE
Odd primes: 3,5,7,11,13,17,23,...
Averages: (3+5)/2, (5+7)/2, (7+11)/2, ...
Residues mod 3: 1, 0, 0, 0, 0, 0, 0, 2, ...
MATHEMATICA
f[n_] := Mod[Prime[n + 1] + Prime[n + 2], 6]/2; Array[f, 105}] (* Robert G. Wilson v Oct 07 2006 *)
CROSSREFS
Cf. A065091.
Sequence in context: A318875 A187143 A187144 * A376505 A124304 A165408
KEYWORD
easy,nonn
AUTHOR
Clark Kimberling, Oct 03 2006
STATUS
approved