A093535 Duplicate of A081093.
3, 7, 31, 127, 3583, 8191, 131071, 524287, 14680063, 1073479679, 2147483647
Offset: 1
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.
15th prime = 47 = '101111' with five 1's, therefore 47 is in the sequence.
a081092 n = a081092_list !! (n-1) a081092_list = filter ((== 1) . a010051') a052294_list -- Reinhard Zumkeller, Nov 16 2012
q:= n-> isprime(n) and isprime(add(i,i=Bits[Split](n))): select(q, [$1..500])[]; # Alois P. Heinz, Sep 28 2023
Clear[BinSumOddQ];BinSumPrimeQ[a_]:=Module[{i,s=0},s=0;For[i=1,i<=Length[IntegerDigits[a,2]],s+=Extract[IntegerDigits[a,2],i];i++ ];PrimeQ[s]]; lst={};Do[p=Prime[n];If[BinSumPrimeQ[p],AppendTo[lst,p]],{n,4!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 06 2009 *) Select[Prime[Range[100]], PrimeQ[Apply[Plus, IntegerDigits[#, 2]]] &] (* Jonathan Sondow, Jun 09 2012 *)
lista(nn) = {forprime(p=2, nn, if (isprime(hammingweight(p)), print1(p, ", ")););} \\ Michel Marcus, Jan 16 2015
from sympy import isprime def ok(n): return isprime(n.bit_count()) and isprime(n) print([k for k in range(444) if ok(k)]) # Michael S. Branicky, Dec 27 2023
a(1) = 4 because the first semiprime A001358(1) is 4 (base 10) which is written 100 in binary, the latter representation having exactly 1 one. a(2) = 6 since A001358(2) = 6 = 110 (base 2) has exactly 2 ones. a(4) = 15 since A001358(6) = 15 = 1111 (base 2) has exactly 4 ones and, as it also has no zeros, is the smallest of the Mersenne semiprimes.
Join[{4},Table[SelectFirst[Sort[FromDigits[#,2]&/@Permutations[ Join[ PadRight[{}, n,1],{0}]]],PrimeOmega[#]==2&],{n,2,40}]] (* Harvey P. Dale, Feb 06 2015 *)
Comments