Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Jul 24 2022 15:31:38
%S 0,1,2,4,6,8,9,12,14,17,21,23,25,29,29,33,37,41,42,46,49,51,52,56,62,
%T 64,68,66,70,74,83,86,86,90,93,99,103,108,106,111,113,119,123,125,124,
%U 130,139,147,144,148,148,156,160,163,164,168,174,182,180,182
%N Number of moduli m such that (prime(n) mod m) is odd, where 1 <= m < prime(n).
%C a(n) + A244800(n) = A000040(n) = prime(n).
%H Clark Kimberling, <a href="/A244799/b244799.txt">Table of n, a(n) for n = 1..1000</a>
%e In the following table, mh abbreviates mod(h) and p(n) = prime(n).
%e n . p(n) . m2 . m3 . m4 . m5 . m6 . m7 . m8 . m9 . m10 . m11 #odd #even
%e 1 . 2 .... 0 .. 0 ........................................... 0 .. 2
%e 2 . 3 .... 0 .. 1 .. 0 ...................................... 1 .. 2
%e 3 . 5 .... 0 .. 1 .. 2 .. 1 .. 0 ............................ 2 .. 3
%e 4 . 7 .... 0 .. 1 .. 1 .. 3 .. 2 .. 1 .. 0 .................. 4 .. 3,
%e so that A244799 = (0,1,2,4,...) and A244800 = (2,2,3,3,...).
%t z = 1000; f[n_, m_] := If[OddQ[Mod[Prime[n], m]], 1, 0]
%t t = Table[f[n, m], {n, 1, z}, {m, 1, Prime[n]}];
%t Table[Count[t[[k]], 1], {k, 1, z}] (* A244799 *)
%t Table[With[{p=Prime[n]},Count[Mod[p,Range[p-1]],_?OddQ]],{n,60}] (* _Harvey P. Dale_, Jul 24 2022 *)
%Y Cf. A244800, A000040.
%K nonn,easy
%O 1,3
%A _Clark Kimberling_, Jul 06 2014