A068067 Number of integers m, 0 < m <= n, such that n divides m(m+1)/2.
1, 0, 2, 0, 2, 1, 2, 0, 2, 1, 2, 1, 2, 1, 4, 0, 2, 1, 2, 1, 4, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 0, 4, 1, 4, 1, 2, 1, 4, 1, 2, 3, 2, 1, 4, 1, 2, 1, 2, 1, 4, 1, 2, 1, 4, 1, 4, 1, 2, 3, 2, 1, 4, 0, 4, 3, 2, 1, 4, 3, 2, 1, 2, 1, 4, 1, 4, 3, 2, 1, 2, 1, 2, 3, 4, 1, 4, 1, 2, 3, 4, 1, 4, 1, 4, 1, 2, 1, 4, 1, 2, 3, 2, 1, 8
Offset: 1
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a[n_] := Length[Select[Range[n], Mod[ #(#+1)/2, n]==0&]]
-
PARI
a(n) = {my(c = 0); for(k = 1, n, c += !((k*(k+1)/2) % n)); c;} \\ Amiram Eldar, Sep 15 2024
Formula
Extensions
Edited by David W. Wilson and Dean Hickerson, Jun 08 2002
Comments