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.

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

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 06 2014

Keywords

Comments

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

Crossrefs

Programs

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