A077718 Primes which can be expressed as sum of distinct powers of 4.
5, 17, 257, 277, 337, 1093, 1109, 1297, 1301, 1361, 4177, 4357, 4373, 4421, 5189, 5381, 5393, 5441, 16453, 16657, 16661, 17477, 17489, 17669, 17681, 17729, 17749, 20549, 20753, 21521, 21569, 21589, 21841, 65537, 65557, 65617, 65809, 66629
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
f:= proc(n) local L,x; L:= convert(n,base,2); x:= 1+add(L[i]*4^i,i=1..nops(L)); if isprime(x) then x fi end proc: map(f, [$1..1000]); # Robert Israel, Sep 06 2018
-
Mathematica
Select[Prime[Range[6650]],Max[IntegerDigits[#,4]]<=1&] (* Jayanta Basu, May 22 2013 *)
-
PARI
for(i=1,999,isprime(b=vector(#b=binary(i),j,4^(#b-j))*b~)&&print1(b",")) \\ - M. F. Hasler, Jan 12 2014
Extensions
More terms from Sascha Kurz, Jan 03 2003
Comments