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-5 of 5 results.

A168607 a(n) = 3^n + 2.

Original entry on oeis.org

3, 5, 11, 29, 83, 245, 731, 2189, 6563, 19685, 59051, 177149, 531443, 1594325, 4782971, 14348909, 43046723, 129140165, 387420491, 1162261469, 3486784403, 10460353205, 31381059611, 94143178829, 282429536483, 847288609445
Offset: 0

Views

Author

Vincenzo Librandi, Dec 01 2009

Keywords

Comments

Second bisection is A134752.
It appears that if s(n) is a first order rational sequence of the form s(1)=5, s(n)= (2*s(n-1)+1)/(s(n-1)+2),n>1, then s(n)= a(n)/(a(n)-4), n>1. - Gary Detlefs, Nov 16 2010
Mahler exhibits this sequence with n>=1 as a proof that there exists an infinite number of x coprime to 3, such that x belongs to A125293 and x^2 belongs to A005836. - Michel Marcus, Nov 12 2012

Crossrefs

Cf. A008776 (2*3^n), A005051 (8*3^n), A034472 (3^n+1), A000244 (powers of 3), A024023 (3^n-1), A168609 (3^n+4), A168610 (3^n+5), A134752 (3^(2*n-1)+2).

Programs

Formula

a(n) = 3*a(n-1) - 4, a(0) = 3.
a(n+1) - a(n) = A008776(n).
a(n+2) - a(n) = A005051(n).
a(n) = A034472(n)+1 = A000244(n)+2 = A024023(n)+3 = A168609(n)-2 = A168610(n)-3.
G.f.: (3 - 7*x)/((1 - x)*(1 - 3*x)).
a(n) = 4*a(n-1) - 3*a(n-2), a(0) = 3, a(1) = 5. - Vincenzo Librandi, Feb 06 2013
E.g.f.: exp(3*x) + 2*exp(x). - Elmo R. Oliveira, Nov 09 2023

Extensions

Edited by Klaus Brockhaus, Apr 13 2010
Further edited by N. J. A. Sloane, Aug 10 2010

A178674 a(n) = 3^n + 3.

Original entry on oeis.org

4, 6, 12, 30, 84, 246, 732, 2190, 6564, 19686, 59052, 177150, 531444, 1594326, 4782972, 14348910, 43046724, 129140166, 387420492, 1162261470, 3486784404, 10460353206, 31381059612, 94143178830, 282429536484, 847288609446, 2541865828332, 7625597484990, 22876792454964
Offset: 0

Views

Author

Vincenzo Librandi, Dec 25 2010

Keywords

Comments

a(n) is the deficiency of 3^n * 5. - Patrick J. McNab, May 27 2017

Crossrefs

Programs

  • GAP
    List([0..40], n -> 3^n+3); # G. C. Greubel, Jan 27 2019
  • Magma
    [3^n+3: n in [0..35]];
    
  • Mathematica
    Table[3^n+3, {n, 0, 40}] (* or *) CoefficientList[Series[(4-10x)/((1-x) (1-3x)), {x, 0, 30}], x] (* Vincenzo Librandi, May 13 2014 *)
  • PARI
    a(n)=3^n+3 \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [3^n+3 for n in range(40)] # G. C. Greubel, Jan 27 2019
    

Formula

a(n) = 3*(a(n-1) - 2), a(0)=4.
From R. J. Mathar, Jan 05 2011: (Start)
G.f.: (4-10*x)/((1-3*x)*(1-x)).
a(n) = 2*A115098(n). (End)
a(n) = 4*a(n-1) - 3*a(n-2) for n > 1. - Vincenzo Librandi, May 13 2014
E.g.f.: exp(x)*(exp(2*x) + 3). - Elmo R. Oliveira, Apr 02 2025

A168613 a(n) = 3^n - 5.

Original entry on oeis.org

-4, -2, 4, 22, 76, 238, 724, 2182, 6556, 19678, 59044, 177142, 531436, 1594318, 4782964, 14348902, 43046716, 129140158, 387420484, 1162261462, 3486784396, 10460353198, 31381059604, 94143178822, 282429536476, 847288609438
Offset: 0

Views

Author

Vincenzo Librandi, Dec 01 2009

Keywords

Crossrefs

Cf. A168610.

Programs

  • Magma
    I:=[-4, -2]; [n le 2 select I[n] else 4*Self(n-1)-3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 06 2012
  • Mathematica
    CoefficientList[Series[2*(7*x-2)/((1-x)*(1-3*x)),{x,0,40}],x] (* Vincenzo Librandi, Jul 06 2012 *)
    LinearRecurrence[{4,-3}, {-4, -2}, 25] (* G. C. Greubel, Jul 27 2016 *)
    3^Range[0,30]-5 (* Harvey P. Dale, Sep 12 2022 *)

Formula

a(n) = 3*a(n-1) + 10 with a(0)=-4.
G.f.: 2*(7*x - 2)/((1-x)*(1-3*x)). - Vincenzo Librandi, Jul 06 2012
a(n) = 4*a(n-1) - 3*a(n-2). - Vincenzo Librandi, Jul 06 2012
a(n) = 2*A116970(n) + 2 with A116970(0)=-3, A116970(1)=-2. - Bruno Berselli, Jul 06 2012
E.g.f.: exp(3*x) - 5*exp(x). - G. C. Greubel, Jul 27 2016

Extensions

Formula and examples edited to use correct offset by Jon E. Schoenfield, Jun 19 2010

A168609 a(n) = 3^n + 4.

Original entry on oeis.org

5, 7, 13, 31, 85, 247, 733, 2191, 6565, 19687, 59053, 177151, 531445, 1594327, 4782973, 14348911, 43046725, 129140167, 387420493, 1162261471, 3486784405, 10460353207, 31381059613, 94143178831, 282429536485, 847288609447
Offset: 0

Views

Author

Vincenzo Librandi, Dec 01 2009

Keywords

Examples

			a(1)=3*5-8=7; a(2)=3*7-8=13; a(3)=3*13-8=31.
		

Crossrefs

Programs

Formula

a(n) = 3*a(n-1) - 8, with n>0, a(0)=5.
G.f.: (5 - 13*x)/((1-x)*(1-3 x)). - Vincenzo Librandi, May 13 2014
a(n) = 4*a(n-1) - 3*a(n-2) for n>1. - Vincenzo Librandi, May 13 2014
E.g.f.: exp(3*x) + 4*exp(x). - G. C. Greubel, Jul 27 2016

Extensions

Formula and examples edited to use correct offset by Jon E. Schoenfield, Jun 19 2010

A368350 a(n) is the least nonnegative integer k such that the 2-valuation of 3^k+5 is n, or -1 if no such number exists.

Original entry on oeis.org

0, -1, 1, 7, 3, 27, 43, 75, 139, 11, 779, 267, 1291, 3339, 7435, 32011, 48395, 81163, 146699, 277771, 15627, 1588491, 2637067, 539915, 4734219, 13122827, 63454475, 29900043, 231226635, 97008907, 902315275, 365444363, 1439186187, 3586669835, 7881637131
Offset: 1

Views

Author

Yifan Xie, Dec 22 2023

Keywords

Comments

a(n) is the least nonnegative integer k such that 3^k == 2^n-5 (mod 2^(n+1)), or -1 if no such number exists.
Theorem: For n >= 3, a(n+1) is the remainder of a(n) + 2^(n-1) +- 2^(n-2) modulo 2^n.
Proof: (Start)
We first prove that the 2-valuation of 3^(2^(k - 2)) - 1 is k for k >= 3. Using mathematical induction we can know that 3^(2^i) = 1 + 2^(i + 2)*u(i), where u(i)'s are odd positive integers, thus the theorem is the case where i = k - 2.
Then we prove the original theorem. Suppose that 3^a(n) = x*2^(n + 1) + 2^n - 5. Using the theorem proved before, we have 3^(2^(n-2)) = y*2^(n + 1) + 2^n + 1, where x and y are no negative integers. Therefore, 3^(a(n) + 2^(n - 2)) == (x - y)*2^(n + 1) - 5 (mod 2^(n + 2)), 3^(a(n) + 3*2^(n - 2)) == (x - y + 1)*2^(n + 1) - 5 (mod 2^(n + 2)). Since there must be an odd number between x - y and x - y + 1, suppose that 3^(a(n) + 2^(n-1) +- 2^(n-2)) == 2^(n + 1) - 5 (mod 2^(n + 2)). Since the multiplicative order of 3 mod 2^(n + 2) is 2^n, a(n + 1) is the remainder of a(n) + 2^(n-1) +- 2^(n-2) modulo 2^n. (End)

Examples

			a(2) = -1 because if 3^n+5 is divisible by 2^2, n must be odd, so 3^n+5 is divisible by 2^3.
a(10) = 11 because the 2-valuation of 3^11+5 is 10, and it's easy to verify that it is the least one.
Since a(13) = 1291 < 2^11, a(14) = 1291 + 2^12 +- 2^11. Then we can verify that the former is correct, thus a(14) = 3339.
		

Crossrefs

Cf. A006519 (2-valuation of n), A168610.

Programs

  • PARI
    a(n) = my(t=znlog(2^n-5, Mod(3, 2^(n+1)))); if(type(t)=="t_INT", t, -1);

Formula

a(n) < 2^(n-1).
a(n+1) = a(n) + 3*2^(n-2) or a(n) - 2^(n-2) if a(n) > 2^(n-2);
a(n+1) = a(n) + 3*2^(n-2) or a(n) + 2^(n-2) if a(n) < 2^(n-2). (See COMMENTS for proof)
Showing 1-5 of 5 results.