A342481 Prime numbers whose binary expansion involves powers of 2 with only composite (or zero) exponents.
Examples
17 = 2^4 + 2^0 is a term. 337 = 2^8 + 2^6 + +2^4 + 2^0 is a term.
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.
Vassilis Papadimitriou's wiki page.
Vassilis Papadimitriou has authored 12 sequences. Here are the ten most recent ones:
17 = 2^4 + 2^0 is a term. 337 = 2^8 + 2^6 + +2^4 + 2^0 is a term.
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.
Select[Array[1 + Total@ MapIndexed[#1*2^Prime[#2] & @@ {#1, First[#2]} &, Reverse@ IntegerDigits[#, 2]] &, 140], PrimeQ] (* Michael De Vlieger, Mar 13 2021 *)
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
First few terms of A094593 are 1, 1, 2, 4, 1, 1, 2, 1, 1, 2, 5, 1, 2, 1, 2, 6, 3, 2, 6, 1, 2, 1, 2, 1, 3, 2, 4, 1, 1, 2, 1, 1, 1, 3, 2, 1, 2, 1, 2, 4, 2, 12, so a(1) to a(6) are 1, 2, 4, 5, 6, 12.
isok(n) = {if ((bigomega(n) == 2) && (omega(n) == 2), my(p = factor(n)[1, 1], q = factor(n)[2, 1]); (q-1) % (p-1) == 0;);} \\ Michel Marcus, Sep 18 2018
For n = 1, a(1) = 4 is the multiplicative order of 2 mod 15 (15 is the first odd squarefree semiprime).
MultiplicativeOrder[2, #] & /@ Select[Range[1, 350, 2], PrimeOmega[#] == 2 && PrimeNu[#] == 2 &] (* Amiram Eldar, Feb 24 2021 *)
lista(nn) = {forstep(n=1, nn, 2, if ((bigomega(n) == 2) && (omega(n)==2), print1(znorder(Mod(2, n)), ", ")););} \\ Michel Marcus, Feb 05 2015
For n=1 the a(1)= 1, as the first odd squarefree semiprime is 15, lambda(15)=4 and ord(2,15)=4
(CarmichaelLambda[#]/MultiplicativeOrder[2, #]) & /@ Select[Range[1, 530, 2], PrimeOmega[#] == 2 && PrimeNu[#] == 2 &] (* Amiram Eldar, Feb 24 2021 *)
For p = 2 and k = 2 we have 2*(2*2-1) = 6, so 6 is a term. For p = 3 and k = 6 we have 3*(6*3-1) = 51, so 51 is a term.
m:=170; { s: p, q in PrimesUpTo(m) | s le 2*m and exists(t){ k: k in [2..p*q div 2] | q eq p*k-1 } where s is p*q };
First terms of A174435 are: 1,1,1,1,1,2,1,1,1,1,1,2,1,1,3,1,1,1,2,2,3,1,1,1,1,3,1,2,1,1,1,2,1,1,2,1,1,3,2,4,2,1,1,1,1,1,1,1,4,2,2,1,1,1,1,1,1,1,1,2,3,2,1,4,3,1,2,1,1,9, so a(1)=1, a(2)=2, a(3)=3, a(4)=4, a(5)=9.
For n = 1, a(1) = ((2^prime(1+2)-2)/prime(1+2))/3 = ((2^prime(3)-2)/prime(3))/3 = ((2^5-2)/5)/3 = 30/5/3 = 2
a(12)=30 because 37 (the 12th prime) can be expressed as 2*(1 - 2) + 3*13 OR 2*(1 - 11) + 3*19 OR 2*(1 - 17) + 3*23 OR 2*(1 - 29) + 3*31 OR 2*(2 - 3) + 3*13 OR 2*(3 - 1) + 3*11 OR 2*(3 - 13) + 3*19 OR 2*(3 - 19) + 3*23 OR 2*(3 - 31) + 3*31 OR 2*(5 - 3) + 3*11 OR 2*(7 - 5) + 3*11 OR 2*(7 - 17) + 3*19 OR 2*(7 - 23) + 3*23 OR 2*(11 - 3) + 3*7 OR 2*(13 - 2) + 3*5 OR 2*(13 - 5) + 3*7 OR 2*(13 - 11) + 3*11 OR 2*(13 - 23) + 3*19 OR 2*(13 - 29) + 3*23 OR 2*(17 - 3) + 3*3 OR 2*(19 - 2) + 3*1 OR 2*(19 - 5) + 3*3 OR 2*(19 - 11) + 3*7 OR 2*(19 - 17) + 3*11 OR 2*(19 - 29) + 3*19 OR 2*(31 - 17) + 3*3 OR 2*(31 - 23) + 3*7 OR 2*(31 - 29) + 3*11 OR 2*(37 - 23) + 3*3 OR 2*(37 - 29) + 3*7.
a(n) = {my(vp = concat(1, primes(n)), nb=0, p=prime(n), p1, p2, p3); for (i=1, #vp, p1 = vp[i]; for (j=1, #vp, p2 = vp[j]; for (k=1, #vp, p3 = vp[k]; if (2*(p1-p2) + 3*p3 == p, nb++);););); nb;} \\ Michel Marcus, Jan 26 2021
Comments