login
A244800
Number of moduli m such that (prime(n) mod m) is even, where 1 <= m < prime(n).
4
2, 2, 3, 3, 5, 5, 8, 7, 9, 12, 10, 14, 16, 14, 18, 20, 22, 20, 25, 25, 24, 28, 31, 33, 35, 37, 35, 41, 39, 39, 44, 45, 51, 49, 56, 52, 54, 55, 61, 62, 66, 62, 68, 68, 73, 69, 72, 76, 83, 81, 85, 83, 81, 88, 93, 95, 95, 89, 97, 99, 97, 103, 107, 105, 103, 113
OFFSET
1,1
COMMENTS
a(n) + A244799(n) = A000040(n) = prime(n).
LINKS
EXAMPLE
In the following table, mh abbreviates mod(h) and p(n) = prime(n).
n . p(n) . m2 . m3 . m4 . m5 . m6 . m7 . m8 . m9 . m10 . m11 #odd #even
1 . 2 .... 0 .. 0 ........................................... 0 .. 2
2 . 3 .... 0 .. 1 .. 0 ...................................... 1 .. 2
3 . 5 .... 0 .. 1 .. 2 .. 1 .. 0 ............................ 2 .. 3
4 . 7 .... 0 .. 1 .. 1 .. 3 .. 2 .. 1 .. 0 .................. 4 .. 3,
so that A244800 = (2,2,3,3,...) and A244799 = (0,1,2,4,...).
MATHEMATICA
z = 1000; f[n_, m_] := If[EvenQ[Mod[Prime[n], m]], 1, 0]
t = Table[f[n, m], {n, 1, z}, {m, 1, Prime[n]}];
Table[Count[t[[k]], 1], {k, 1, z}] (* A244800 *)
CROSSREFS
Sequence in context: A184324 A274168 A116575 * A275972 A364349 A364533
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 06 2014
STATUS
approved