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.

Showing 1-10 of 24 results. Next

A181565 a(n) = 3*2^n + 1.

Original entry on oeis.org

4, 7, 13, 25, 49, 97, 193, 385, 769, 1537, 3073, 6145, 12289, 24577, 49153, 98305, 196609, 393217, 786433, 1572865, 3145729, 6291457, 12582913, 25165825, 50331649, 100663297, 201326593, 402653185, 805306369, 1610612737, 3221225473
Offset: 0

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

From Peter Bala, Oct 28 2013: (Start)
Let x and b be positive real numbers. We define an Engel expansion of x to the base b to be a (possibly infinite) nondecreasing sequence of positive integers [a(1), a(2), a(3), ...] such that we have the series representation x = b/a(1) + b^2/(a(1)*a(2)) + b^3/(a(1)*a(2)*a(3)) + .... Depending on the values of x and b such an expansion may not exist, and if it does exist it may not be unique. When b = 1 we recover the ordinary Engel expansion of x.
This sequence gives an Engel expansion of 2/3 to the base 2, with the associated series expansion 2/3 = 2/4 + 2^2/(4*7) + 2^3/(4*7*13) + 2^4/(4*7*13*25) + ....
More generally, for n and m positive integers, the sequence [m + 1, n*m + 1, n^2*m + 1, ...] gives an Engel expansion of the rational number n/m to the base n. See the cross references for several examples. (End)
The only squares in this sequence are 4, 25, 49. - Antti Karttunen, Sep 24 2023

Crossrefs

Essentially a duplicate of A004119.
A002253 and A039687 give the primes in this sequence, and A181492 is the subsequence of twin primes.

Programs

Formula

a(n) = A004119(n+1) = A103204(n+1) for all n >= 0.
From Ilya Gutkovskiy, Jun 01 2016: (Start)
O.g.f.: (4 - 5*x)/((1 - x)*(1 - 2*x)).
E.g.f.: (1 + 3*exp(x))*exp(x).
a(n) = 3*a(n-1) - 2*a(n-2). (End)
a(n) = 2*a(n-1) - 1. - Miquel Cerda, Aug 16 2016
For n >= 0, A005940(a(n)) = A001248(1+n). - Antti Karttunen, Sep 24 2023

A004119 a(0) = 1; thereafter a(n) = 3*2^(n-1) + 1.

Original entry on oeis.org

1, 4, 7, 13, 25, 49, 97, 193, 385, 769, 1537, 3073, 6145, 12289, 24577, 49153, 98305, 196609, 393217, 786433, 1572865, 3145729, 6291457, 12582913, 25165825, 50331649, 100663297, 201326593, 402653185, 805306369, 1610612737, 3221225473, 6442450945, 12884901889
Offset: 0

Views

Author

Keywords

Comments

Also Pisot sequence L(4,7) (cf. A008776).
Alternatively, define the sequence S(a(1),a(2)) by: a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n > 0. This is S(4,7).
a(n) = number of terms of the arithmetic progression with first term 2^(2n-1) and last term 2^(2n+1). So common difference is 2^n. E.g., a(2)=7 corresponds to (8,12,16,20,24,28,32). - Augustine O. Munagi, Feb 21 2007
Equals binomial transform of [1, 3, 0, 3, 0, 3, 0, 3, ...]. - Gary W. Adamson, Aug 27 2010

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A181565 is an essentially identical sequence.
For primes see A002253 and A039687.

Programs

  • Magma
    [1] cat [n le 1 select 4 else 2*Self(n-1)-1: n in [1..40]]; // Vincenzo Librandi, Dec 16 2015
  • Maple
    A004119:=-(-1-z+3*z**2)/(2*z-1)/(z-1); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    s=4;lst={1,s};Do[s=s+(s-1);AppendTo[lst,s],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Nov 30 2009 *)
    Prepend[Table[3*2^n + 1, {n, 0, 32}], 1] (* or *)
    {1}~Join~LinearRecurrence[{3, -2}, {4, 7}, 33] (* Michael De Vlieger, Dec 16 2015 *)
  • PARI
    a(n)=3<Charles R Greathouse IV, Sep 28 2015
    

Formula

a(n) = 3a(n-1) - 2a(n-2).
For n>3, a(3)=13, a(n)= a(n-1)+2*floor(a(n-1)/2). - Benoit Cloitre, Aug 14 2002
For n>=1, a(n) = A049775(n+1)/2^(n-2). For n>=2, a(n) = 2a(n-1)-1; see also A000051. - Philippe Deléham, Feb 20 2004
O.g.f.: -(-1-x+3*x^2)/((2*x-1)*(x-1)). - R. J. Mathar, Nov 23 2007
For n>0, a(n) = 2*a(n-1)-1. - Vincenzo Librandi, Dec 16 2015
E.g.f.: exp(x)*(1 + 3*sinh(x)). - Stefano Spezia, May 06 2023

Extensions

Edited by N. J. A. Sloane, Dec 16 2015 at the suggestion of Bruno Berselli

A039687 Primes of the form 3*2^k + 1.

Original entry on oeis.org

7, 13, 97, 193, 769, 12289, 786433, 3221225473, 206158430209, 6597069766657, 221360928884514619393, 2353913150770005286438421033702874906038383291674012942337
Offset: 1

Views

Author

Keywords

Comments

Primes of the form 6m+1 (A002476) of A074781. - Bernard Schott, Dec 14 2020

Crossrefs

For more terms see A002253. These are the primes in A004119 (or A181565).
Subsequence of A081091.

Programs

Formula

a(n) = 3*2^A002253(n) + 1. - M. F. Hasler, Mar 03 2023

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

Original entry on oeis.org

7, 11, 13, 19, 37, 41, 67, 73, 97, 131, 137, 193, 521, 577, 641, 769, 1033, 1153, 2053, 2081, 2113, 4099, 4129, 8209, 12289, 16417, 18433, 32771, 32801, 32833, 40961, 65539, 133121, 147457, 163841, 262147, 262153, 262657, 270337, 524353, 524801
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 05 2003

Keywords

Comments

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
Primes in A014311. - Reinhard Zumkeller, May 03 2012

Examples

			    7 = 2^2 + 2^1 + 1
   11 = 2^3 + 2^1 + 1
   13 = 2^3 + 2^2 + 1
   19 = 2^4 + 2^1 + 1
   37 = 2^5 + 2^2 + 1
   41 = 2^5 + 2^3 + 1
   67 = 2^6 + 2^1 + 1
   73 = 2^6 + 2^3 + 1
   97 = 2^6 + 2^5 + 1
  131 = 2^7 + 2^1 + 1
  137 = 2^7 + 2^3 + 1
  193 = 2^7 + 2^6 + 1
  521 = 2^9 + 2^3 + 1
		

Crossrefs

Essentially the same as A070739.
Cf. A095077 (primes with four bits set).
A057733 = 2^A057732 + 3 and A039687 = 3*2^A002253 + 1 are subsequences.

Programs

  • Haskell
    a081091 n = a081091_list !! (n-1)
    a081091_list = filter ((== 1) . a010051') a014311_list
    -- Reinhard Zumkeller, May 03 2012
    
  • Maple
    N:= 20: # to get all terms < 2^N
    select(isprime, [seq(seq(2^i+2^j+1,j=1..i-1),i=1..N-1)]); # Robert Israel, May 17 2016
  • Mathematica
    Select[Flatten[Table[2^i + 2^j + 1, {i, 21}, {j, i-1}]], PrimeQ] (* Alonso del Arte, Jan 11 2011 *)
  • 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
    
  • PARI
    is(n)=hammingweight(n)==3 && isprime(n) \\ Charles R Greathouse IV, Aug 28 2017
    
  • 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
    A081091(n)={for(k=#A81091, n-1, A81091=concat(A81091, next_A081091(A81091[k]))); A81091[n]} \\ M. F. Hasler, Mar 03 2023
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    from sympy.utilities.iterables import multiset_permutations
    def A081091_gen(): # generator of terms
        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'))))
    A081091_list = list(islice(A081091_gen(),30)) # Chai Wah Wu, Jul 19 2022

Formula

A000120(a(n)) = 3.

A204620 Numbers k such that 3*2^k + 1 is a prime factor of a Fermat number 2^(2^m) + 1 for some m.

Original entry on oeis.org

41, 209, 157169, 213321, 303093, 382449, 2145353, 2478785
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 17 2012

Keywords

Comments

Terms are odd: by Morehead's theorem, 3*2^(2*n) + 1 can never divide a Fermat number.
No other terms below 7516000.
Is this sequence the same as "Numbers k such that 3*2^k + 1 is a factor of a Fermat number 2^(2^m) + 1 for some m"? - Arkadiusz Wesolowski, Nov 13 2018
The last sentence of Morehead's paper is: "It is easy to show that composite numbers of the forms 2^kappa * 3 + 1, 2^kappa * 5 + 1 can not be factors of Fermat's numbers." [a proof is needed]. - Jeppe Stig Nielsen, Jul 23 2019
Any factor of a Fermat number 2^(2^m) + 1 of the form 3*2^k + 1 is prime if k < 2*m + 6. - Arkadiusz Wesolowski, Jun 12 2021
If, for any m >= 0, F(m) = 2^(2^m) + 1 has a prime factor p of the form 3*2^k + 1, then F(m)/p is congruent to 11 mod 30. - Arkadiusz Wesolowski, Jun 13 2021
A number k belongs to this sequence if and only if the order of 2 modulo p is not divisible by 3, where p is a prime of the form 3*2^k + 1 (see Golomb paper). - Arkadiusz Wesolowski, Jun 14 2021

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[p = 3*2^n + 1; If[PrimeQ[p] && IntegerQ@Log[2, MultiplicativeOrder[2, p]], AppendTo[lst, n]], {n, 7, 209, 2}]; lst
  • PARI
    isok(n) = my(p = 3*2^n + 1, z = znorder(Mod(2, p))); isprime(p) && ((z >> valuation(z, 2)) == 1); \\ Michel Marcus, Nov 10 2018

A002254 Numbers k such that 5*2^k + 1 is prime.

Original entry on oeis.org

1, 3, 7, 13, 15, 25, 39, 55, 75, 85, 127, 1947, 3313, 4687, 5947, 13165, 23473, 26607, 125413, 209787, 240937, 819739, 1282755, 1320487, 1777515
Offset: 1

Views

Author

Keywords

References

  • H. Riesel, "Prime numbers and computer methods for factorization," Progress in Mathematics, Vol. 57, Birkhauser, Boston, 1985, Chap. 4, see pp. 381-384.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A050526.

Programs

Extensions

Corrected (removed incorrect term 40937) and added more terms (from http://web.archive.org/web/20161028080239/http://www.prothsearch.net/riesel.html), Joerg Arndt, Apr 07 2013

A181490 Numbers k such that 3*2^k-1 and 3*2^k+1 are twin primes (A001097).

Original entry on oeis.org

1, 2, 6, 18
Offset: 1

Views

Author

M. F. Hasler, Oct 30 2010

Keywords

Comments

Sequences A181491 and A181492 list the corresponding primes.
No more terms below three million. - Charles R Greathouse IV, Mar 14 2011
Intersection of A002235 and A002253. - Jeppe Stig Nielsen, Mar 05 2018

Crossrefs

Programs

  • GAP
    Filtered([1..300],k->IsPrime(3*2^k-1) and IsPrime(3*2^k+1)); # Muniru A Asiru, Mar 11 2018
  • Maple
    a:=k->`if`(isprime(3*2^k-1) and isprime(3*2^k+1),k,NULL); seq(a(k),k=1..1000); # Muniru A Asiru, Mar 11 2018
  • Mathematica
    fQ[n_] := PrimeQ[3*2^n - 1] && PrimeQ[3*2^n + 1]; k = 1; lst= {}; While[k < 15001, If[fQ@k, AppendTo[lst, k]; Print@k]; k++ ] (* Robert G. Wilson v, Nov 05 2010 *)
    Select[Range[20],AllTrue[3*2^#+{1,-1},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 24 2014 *)
  • PARI
    for( k=1,999, ispseudoprime(3<
    				

Formula

Equals { k | A007283(k) in A014574 } = { k | A153893(k) in A001359 }.

Extensions

Pari program repaired by Charles R Greathouse IV, Mar 14 2011

A268657 Numbers k such that 3*2^k + 1 is a prime factor of a generalized Fermat number 3^(2^m) + 1 for some m.

Original entry on oeis.org

6, 12, 18, 30, 36, 41, 66, 189, 201, 209, 276, 408, 438, 534, 2208, 3168, 3189, 3912, 34350, 42294, 44685, 48150, 54792, 55182, 59973, 80190, 157169, 213321, 303093, 382449, 709968, 801978, 916773, 1832496, 2145353, 2291610, 2478785, 5082306, 7033641, 10829346
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 10 2016

Keywords

References

  • Wilfrid Keller, private communication, 2008.

Crossrefs

Programs

  • PARI
    for(k=1,+oo,p=3*2^k+1;if(ispseudoprime(p),t=znorder(Mod(3,p));bitand(t,t-1)==0&&print1(k,", "))) \\ Jeppe Stig Nielsen, Oct 30 2020

A268658 Numbers k such that 3*2^k + 1 is a prime factor of a generalized Fermat number 5^(2^m) + 1 for some m.

Original entry on oeis.org

2, 8, 18, 66, 189, 209, 408, 2208, 2816, 3168, 3912, 20909, 54792, 59973, 157169, 303093, 709968, 801978, 1832496, 2145353, 2291610, 5082306, 10829346, 16408818
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 10 2016

Keywords

References

  • Wilfrid Keller, private communication, 2008.

Crossrefs

Programs

  • PARI
    for(k=1,+oo,p=3*2^k+1;if(ispseudoprime(p),t=znorder(Mod(5,p));bitand(t,t-1)==0&&print1(k,", "))) \\ Jeppe Stig Nielsen, Oct 30 2020

Extensions

a(24) from Jeppe Stig Nielsen, Oct 30 2020

A268660 Numbers n such that 3*2^n + 1 is a prime factor of a generalized Fermat number 12^(2^m) + 1 for some m.

Original entry on oeis.org

2, 5, 8, 41, 209, 353, 2816, 20909, 42665, 157169, 213321, 303093, 362765, 382449, 2145353, 2478785
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 10 2016

Keywords

References

  • Wilfrid Keller, private communication, 2008.

Crossrefs

Showing 1-10 of 24 results. Next