[go: up one dir, main page]

login
A068067
Number of integers m, 0 < m <= n, such that n divides m(m+1)/2.
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,3
COMMENTS
Least n with a(n) = 2^k is prime(k+1)#/2 = A002110(A000040(k+1))/2. Least n with a(n) = 2^k-1 != 1 is p(k+1)#.
LINKS
FORMULA
a(n) = 0 iff n = 2^k with k >= 1.
If n is even, a(n) = 2^(omega(n)-1) - 1; if n is odd, a(n) = 2^omega(n). Here omega(n) = A001221(n) is the number of distinct prime divisors of n.
A068068(n) - a(n) = 0 if n is odd, 1 if n is even.
MATHEMATICA
a[n_] := Length[Select[Range[n], Mod[ #(#+1)/2, n]==0&]]
PROG
(PARI) a(n) = {my(c = 0); for(k = 1, n, c += !((k*(k+1)/2) % n)); c; } \\ Amiram Eldar, Sep 15 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 18 2002
EXTENSIONS
Edited by David W. Wilson and Dean Hickerson, Jun 08 2002
STATUS
approved