login
A078610
Least m such that B(n!) = B(n!+m), where B(n) is the sum of binary digits of n.
0
1, 2, 3, 9, 15, 16, 17, 129, 129, 271, 256, 1055, 1025, 2048, 2049, 32769, 32769, 65537, 65536, 262144, 262144, 524289, 524288, 4194307, 4194311, 8388609, 8388608, 33554435, 33554433, 67108864, 67108865, 2147483649, 2147483649, 4294967297
OFFSET
1,2
EXAMPLE
a(6)=16 because 6! = [1, 0, 1, 1, 0, 1, 0, 0, 0, 0] and 6!+16 = [1, 0, 1, 1, 1, 0, 0, 0, 0, 0].
PROG
(PARI) a(n) = {s = norml2(binary(n!)); m = 1; while (norml2(binary(m+n!)) != s, m++); return (m); } \\ Michel Marcus, Jun 28 2013
(PARI) a(n)=my(N=n!, h=hammingweight(N), m); while(hammingweight(N+m++)!=h, ); m \\ Charles R Greathouse IV, Jun 28 2013
CROSSREFS
Cf. A000120.
Sequence in context: A368567 A083303 A245594 * A108825 A109663 A056702
KEYWORD
nonn,base
AUTHOR
Jason Earls, Dec 09 2002
EXTENSIONS
More terms from Sascha Kurz, Jan 04 2003
STATUS
approved