|
|
A371971
|
|
a(n) is the least exponent m minimizing the percentage of set bits in the binary representation of prime(n)^m.
|
|
1
|
|
|
24, 25, 12, 6, 16, 2, 10, 2, 7, 22, 16, 8, 15, 2, 14, 3, 20, 2, 4, 7, 21, 4, 19, 6, 13, 6, 7, 7, 3, 10, 2, 1, 9, 5, 2, 2, 6, 10, 36, 11, 13, 2, 2, 10, 9, 5, 2, 34, 5, 2, 4, 4, 8, 2, 9, 4, 6, 9, 3, 14, 38, 9, 14, 16, 2, 7, 4, 16, 3, 9, 6, 2, 4, 2, 10, 15, 10, 14, 6, 71, 31, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
PROG
|
(PARI) a371971(n, limit=10000) = {my(p=prime(n), q=1, m=1); for (k=1, limit, my (pp=p^k, h=hammingweight(pp), g=#binary(pp), qq=h/g); if (qq<q, q=qq; m=k)); m};
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|