A278477 Primes that set a new record for the Hamming weight.
2, 3, 7, 23, 31, 127, 383, 991, 2039, 3583, 6143, 8191, 63487, 129023, 131071, 522239, 524287, 1966079, 4128767, 14680063, 33546239, 67108351, 201064447, 260046847, 536739839, 1073479679, 2147483647, 8581545983, 16911433727
Offset: 1
Links
- Robert Israel, Table of n, a(n) for n = 1..3301
Programs
-
Maple
M:= 40: # to use A061712(1..M) A061712:= proc(n) local d,c,cands; for d from 0 do cands:= map(t -> 2^(n+d)-1 - add(2^(n-1+d-j), j=t), combinat:-choose([$1..n-2+d], d)); for c in cands do if isprime(c) then return c fi od od end proc: A061712(1):= 2: R:= map(A061712, [$1..M]): R[select(t -> R[t] < `if`(isprime(2^(M+1)-1), 2^(M+1)-1, 2^(M+2)+2^M-1) and R[t] = min(R[t..-1]), [$1..nops(R)])]; # Robert Israel, Nov 23 2016
-
PARI
{my(h=0);forprime(p=2,10^11,my(t=hammingweight(p));if(t>h,print1(p,", ");h=t));}
Comments