OFFSET
1,1
COMMENTS
The numbers m = 2^e(0) + 2^e(1) + 2^e(2) + ... where all e(i) are either 0 or prime are 1, 4, 5, 8, 9, 12, 13, 32, 33, 36, 37, 40, 41, 44, 45, 128, 129, 132, 133, 136, 137, 140, 141, 160, 161, 164, ... The sequence contains the m which are primes. - R. J. Mathar, Apr 21 2021
EXAMPLE
5 = 2^2 + 2^0 is a term.
7 = 2^2 + 2^1 + 2^0 is not a term, because the exponent 1 is not a prime.
11 = 2^3 + 2^1 + 2^0 is not a term, because the exponent 1 is not a prime.
13 = 2^3 + 2^2 + 2^0 is a term.
MATHEMATICA
Select[Array[1 + Total@ MapIndexed[#1*2^Prime[#2] & @@ {#1, First[#2]} &, Reverse@ IntegerDigits[#, 2]] &, 140], PrimeQ] (* Michael De Vlieger, Mar 13 2021 *)
PROG
(PARI) isok(p) = if (isprime(p), my(b=Vecrev(binary(p))); sum(i=1, #b, b[i]*((i!=1) && !isprime(i-1))) == 0); \\ Michel Marcus, Apr 22 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vassilis Papadimitriou, Mar 13 2021
STATUS
approved