|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|