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.

A332801 a(n) is the number of even results of n mod k, for 1 < k < n.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 1, 4, 3, 5, 3, 7, 3, 9, 5, 8, 6, 11, 5, 13, 7, 13, 7, 15, 8, 16, 10, 16, 10, 20, 8, 21, 11, 21, 13, 22, 12, 24, 14, 24, 14, 28, 12, 30, 16, 28, 16, 30, 17, 32, 18, 32, 18, 36, 18, 36, 20, 36, 20, 40, 18, 42, 22, 39, 25, 41, 23, 43, 25, 45, 23, 48, 22, 50
Offset: 1

Views

Author

Thomas Kerscher, Feb 24 2020

Keywords

Examples

			n(7) = 1 because only 7 mod 5 = 2 is even.
		

Programs

  • Mathematica
    Table[Total[Boole[EvenQ/@Mod[n,Range[2,n-1]]]],{n,80}] (* Harvey P. Dale, Aug 09 2021 *)
  • PARI
    a(n) = sum(k=2, n-1, ((n % k) % 2)== 0); \\ Michel Marcus, Feb 24 2020