login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A278477 Primes that set a new record for the Hamming weight. 1

%I #15 Nov 24 2016 09:03:55

%S 2,3,7,23,31,127,383,991,2039,3583,6143,8191,63487,129023,131071,

%T 522239,524287,1966079,4128767,14680063,33546239,67108351,201064447,

%U 260046847,536739839,1073479679,2147483647,8581545983,16911433727

%N Primes that set a new record for the Hamming weight.

%C The Mersenne primes (A000668) are a subsequence.

%H Robert Israel, <a href="/A278477/b278477.txt">Table of n, a(n) for n = 1..3301</a>

%p M:= 40: # to use A061712(1..M)

%p A061712:= proc(n) local d,c,cands;

%p for d from 0 do

%p cands:= map(t -> 2^(n+d)-1 - add(2^(n-1+d-j), j=t),

%p combinat:-choose([$1..n-2+d], d));

%p for c in cands do if isprime(c) then return c fi od

%p od

%p end proc:

%p A061712(1):= 2:

%p R:= map(A061712, [$1..M]):

%p 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

%o (PARI) {my(h=0);forprime(p=2,10^11,my(t=hammingweight(p));if(t>h,print1(p,", ");h=t));}

%Y Cf. A000668, A061712, A211997.

%K nonn,base

%O 1,1

%A _Joerg Arndt_, Nov 23 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)