|
|
A089226
|
|
Smallest composite number with exactly n 1's in binary representation.
|
|
4
|
|
|
4, 6, 14, 15, 55, 63, 247, 255, 511, 1023, 2047, 4095, 12287, 16383, 32767, 65535, 196607, 262143, 983039, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 3221225471
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
f:= proc(n) local i, t;
for i from n to 0 by -1 do
t:= 2^(n+1) - 2^i - 1;
if not isprime(t) then return t fi
od
end proc:
f(1):= 4:
|
|
MATHEMATICA
|
a[n_] := Module[{i, t},
For[i = n, i >= 0, i--,
t = 2^(n+1) - 2^i - 1;
If[!PrimeQ[t], Return [t]]]];
a[1] = 4;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|