This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A278477 #15 Nov 24 2016 09:03:55 %S A278477 2,3,7,23,31,127,383,991,2039,3583,6143,8191,63487,129023,131071, %T A278477 522239,524287,1966079,4128767,14680063,33546239,67108351,201064447, %U A278477 260046847,536739839,1073479679,2147483647,8581545983,16911433727 %N A278477 Primes that set a new record for the Hamming weight. %C A278477 The Mersenne primes (A000668) are a subsequence. %H A278477 Robert Israel, <a href="/A278477/b278477.txt">Table of n, a(n) for n = 1..3301</a> %p A278477 M:= 40: # to use A061712(1..M) %p A278477 A061712:= proc(n) local d,c,cands; %p A278477 for d from 0 do %p A278477 cands:= map(t -> 2^(n+d)-1 - add(2^(n-1+d-j), j=t), %p A278477 combinat:-choose([$1..n-2+d], d)); %p A278477 for c in cands do if isprime(c) then return c fi od %p A278477 od %p A278477 end proc: %p A278477 A061712(1):= 2: %p A278477 R:= map(A061712, [$1..M]): %p A278477 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 A278477 (PARI) {my(h=0);forprime(p=2,10^11,my(t=hammingweight(p));if(t>h,print1(p,", ");h=t));} %Y A278477 Cf. A000668, A061712, A211997. %K A278477 nonn,base %O A278477 1,1 %A A278477 _Joerg Arndt_, Nov 23 2016