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!)
A077718 Primes which can be expressed as sum of distinct powers of 4. 13

%I #17 Sep 06 2018 19:28:23

%S 5,17,257,277,337,1093,1109,1297,1301,1361,4177,4357,4373,4421,5189,

%T 5381,5393,5441,16453,16657,16661,17477,17489,17669,17681,17729,17749,

%U 20549,20753,21521,21569,21589,21841,65537,65557,65617,65809,66629

%N Primes which can be expressed as sum of distinct powers of 4.

%C Primes whose base 4 representation contains only zeros and 1's.

%C As a subsequence of primes in A000695, these could be called Moser-de Bruijn primes. See also A235461 for those terms whose base 4 representation also represents a prime in base 2. - _M. F. Hasler_, Jan 11 2014

%H Robert Israel, <a href="/A077718/b077718.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n) local L,x;

%p L:= convert(n,base,2);

%p x:= 1+add(L[i]*4^i,i=1..nops(L));

%p if isprime(x) then x fi

%p end proc:

%p map(f, [$1..1000]); # _Robert Israel_, Sep 06 2018

%t Select[Prime[Range[6650]],Max[IntegerDigits[#,4]]<=1&] (* _Jayanta Basu_, May 22 2013 *)

%o (PARI) for(i=1,999,isprime(b=vector(#b=binary(i),j,4^(#b-j))*b~)&&print1(b",")) \\ - _M. F. Hasler_, Jan 12 2014

%Y Cf. A020449, A000695, A077717, A077719, A077720, A077721, A077722.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Nov 19 2002

%E More terms from _Sascha Kurz_, Jan 03 2003

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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)