OFFSET
1,3
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
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,
MATHEMATICA
z = 1000; f[n_, m_] := If[OddQ[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}] (* A244799 *)
Table[With[{p=Prime[n]}, Count[Mod[p, Range[p-1]], _?OddQ]], {n, 60}] (* Harvey P. Dale, Jul 24 2022 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 06 2014
STATUS
approved