cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A244799 Number of moduli m such that (prime(n) mod m) is odd, where 1 <= m < prime(n).

Original entry on oeis.org

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, 64, 68, 66, 70, 74, 83, 86, 86, 90, 93, 99, 103, 108, 106, 111, 113, 119, 123, 125, 124, 130, 139, 147, 144, 148, 148, 156, 160, 163, 164, 168, 174, 182, 180, 182
Offset: 1

Views

Author

Clark Kimberling, Jul 06 2014

Keywords

Comments

a(n) + A244800(n) = A000040(n) = prime(n).

Examples

			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 A244799 = (0,1,2,4,...) and A244800 = (2,2,3,3,...).
		

Crossrefs

Programs

  • 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 *)