cp's OEIS Frontend

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.

A081091 Primes of the form 2^i + 2^j + 1, i > j > 0.

This page as a plain text file.
%I A081091 #59 Dec 31 2024 15:39:55
%S A081091 7,11,13,19,37,41,67,73,97,131,137,193,521,577,641,769,1033,1153,2053,
%T A081091 2081,2113,4099,4129,8209,12289,16417,18433,32771,32801,32833,40961,
%U A081091 65539,133121,147457,163841,262147,262153,262657,270337,524353,524801
%N A081091 Primes of the form 2^i + 2^j + 1, i > j > 0.
%C A081091 This is sequence A070739 without the Fermat primes, A000215. Sequence A081504 lists the i for which there are no primes. - _T. D. Noe_, Jun 22 2007
%C A081091 Primes in A014311. - _Reinhard Zumkeller_, May 03 2012
%H A081091 T. D. Noe and Robert Israel, <a href="/A081091/b081091.txt">Table of n, a(n) for n = 1..7800</a> (n = 1..1000 from T. D. Noe)
%H A081091 Richard Ehrenborg and N. Bradley Fox, <a href="http://arxiv.org/abs/1408.6858">The Descent Set Polynomial Revisited</a>, arXiv:1408.6858 [math.CO], 2014.
%H A081091 Norman B. Fox, <a href="http://uknowledge.uky.edu/math_etds/25">Combinatorial Potpourri: Permutations, Products, Posets, and Pfaffians</a>, University of Kentucky, Theses and Dissertations, Mathematics, Paper 25.
%F A081091 A000120(a(n)) = 3.
%e A081091     7 = 2^2 + 2^1 + 1
%e A081091    11 = 2^3 + 2^1 + 1
%e A081091    13 = 2^3 + 2^2 + 1
%e A081091    19 = 2^4 + 2^1 + 1
%e A081091    37 = 2^5 + 2^2 + 1
%e A081091    41 = 2^5 + 2^3 + 1
%e A081091    67 = 2^6 + 2^1 + 1
%e A081091    73 = 2^6 + 2^3 + 1
%e A081091    97 = 2^6 + 2^5 + 1
%e A081091   131 = 2^7 + 2^1 + 1
%e A081091   137 = 2^7 + 2^3 + 1
%e A081091   193 = 2^7 + 2^6 + 1
%e A081091   521 = 2^9 + 2^3 + 1
%p A081091 N:= 20: # to get all terms < 2^N
%p A081091 select(isprime, [seq(seq(2^i+2^j+1,j=1..i-1),i=1..N-1)]); # _Robert Israel_, May 17 2016
%t A081091 Select[Flatten[Table[2^i + 2^j + 1, {i, 21}, {j, i-1}]], PrimeQ] (* _Alonso del Arte_, Jan 11 2011 *)
%o A081091 (PARI) do(mx)=my(v=List(),t); for(i=2,mx,for(j=1,i-1,if(ispseudoprime(t=2^i+2^j+1), listput(v,t)))); Vec(v) \\ _Charles R Greathouse IV_, Jan 02 2014
%o A081091 (PARI) is(n)=hammingweight(n)==3 && isprime(n) \\ _Charles R Greathouse IV_, Aug 28 2017
%o A081091 (PARI) A81091=[7]; next_A081091(p, i=exponent(p), j=exponent(p-2^i))=!until(isprime(2^i+2^j+1), j++>=i && i++ && j=1)+2^i+2^j
%o A081091 A081091(n)={for(k=#A81091, n-1, A81091=concat(A81091, next_A081091(A81091[k]))); A81091[n]} \\ _M. F. Hasler_, Mar 03 2023
%o A081091 (Haskell)
%o A081091 a081091 n = a081091_list !! (n-1)
%o A081091 a081091_list = filter ((== 1) . a010051') a014311_list
%o A081091 -- _Reinhard Zumkeller_, May 03 2012
%o A081091 (Python)
%o A081091 from itertools import count, islice
%o A081091 from sympy import isprime
%o A081091 from sympy.utilities.iterables import multiset_permutations
%o A081091 def A081091_gen(): # generator of terms
%o A081091     return filter(isprime,map(lambda s:int('1'+''.join(s)+'1',2),(s for l in count(1) for s in multiset_permutations('0'*(l-1)+'1'))))
%o A081091 A081091_list = list(islice(A081091_gen(),30)) # _Chai Wah Wu_, Jul 19 2022
%Y A081091 Essentially the same as A070739.
%Y A081091 Cf. A000040, A000215, A081092, A010051.
%Y A081091 Cf. A095077 (primes with four bits set).
%Y A081091 A057733 = 2^A057732 + 3 and A039687 = 3*2^A002253 + 1 are subsequences.
%K A081091 nonn,easy
%O A081091 1,1
%A A081091 _Reinhard Zumkeller_, Mar 05 2003