A109711 Numbers n such that the sum of the binary digits of n! is divisible by n.
1, 12, 78, 87, 292, 362, 1375, 1387, 1408, 1430, 1445, 88664, 355390, 356630, 1420936, 1423614, 1428922
Offset: 1
Examples
The binary digits of 1445! sum to 5780 and 5780 is divisible by 1445, so 1445 is in the sequence.
Programs
-
Mathematica
Do[k = n!; s = Plus @@ IntegerDigits[k, 2]; If[Mod[s, n] == 0, Print[n]], {n, 1, 10^4}]
-
PARI
is(n)=my(v=binary(n!)); sum(i=1, #v, v[i])%n==0 \\ Charles R Greathouse IV, Jun 24 2011
-
PARI
is(n)=hammingweight(n!)%n==0 \\ Charles R Greathouse IV, Mar 28 2013
Extensions
a(12)-a(17) from Lars Blomberg, Jun 24 2011
Comments