|
|
A215559
|
|
Smallest n-digit noncomposite number (written in base 2) with maximum base-2 digit sum.
|
|
1
|
|
|
1, 11, 111, 1011, 11111, 101111, 1111111, 10111111, 101111111, 1111011111, 11111110111, 110111111111, 1111111111111, 11101111111111, 100111111111111, 1111011111111111, 11111111111111111, 111011111111111111, 1111111111111111111, 10111111111111111111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
In base 10: 1, 3, 7, 11, 31, 47, 127, 191, 383, 991,...
|
|
LINKS
|
|
|
MAPLE
|
local ds, a, k;
ds := 0 ;
a := 0 ;
for k from 2^(n-1) to 2^n-1 do
if isprime(k) or k = 1 then
end if;
end if;
end do:
a ;
|
|
PROG
|
(PARI) A215559(n)={my(p=2^n-1); !for(d=0, n-2, forvec(v=vector(d, k, [2, n]), isprime(p-sum(i=1, d, 2^(n-v[i])))|next; return(10^n\9-sum(i=1, d, 10^(n-v[i]))), 2))} \\ - M. F. Hasler, Aug 25 2012
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|