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.

This page as a plain text file.
%I A332801 #13 Aug 09 2021 18:17:45
%S A332801 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,
%T A332801 8,21,11,21,13,22,12,24,14,24,14,28,12,30,16,28,16,30,17,32,18,32,18,
%U A332801 36,18,36,20,36,20,40,18,42,22,39,25,41,23,43,25,45,23,48,22,50
%N A332801 a(n) is the number of even results of n mod k, for 1 < k < n.
%H A332801 Harvey P. Dale, <a href="/A332801/b332801.txt">Table of n, a(n) for n = 1..1000</a>
%e A332801 n(7) = 1 because only 7 mod 5 = 2 is even.
%t A332801 Table[Total[Boole[EvenQ/@Mod[n,Range[2,n-1]]]],{n,80}] (* _Harvey P. Dale_, Aug 09 2021 *)
%o A332801 (PARI) a(n) = sum(k=2, n-1, ((n % k) % 2)== 0); \\ _Michel Marcus_, Feb 24 2020
%K A332801 nonn
%O A332801 1,6
%A A332801 _Thomas Kerscher_, Feb 24 2020