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.

A015521 a(n) = 3*a(n-1) + 4*a(n-2), a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 3, 13, 51, 205, 819, 3277, 13107, 52429, 209715, 838861, 3355443, 13421773, 53687091, 214748365, 858993459, 3435973837, 13743895347, 54975581389, 219902325555, 879609302221, 3518437208883, 14073748835533
Offset: 0

Views

Author

Keywords

Comments

Inverse binomial transform of powers of 5 (A000351) preceded by 0. - Paul Barry, Apr 02 2003
Number of walks of length n between any two distinct vertices of the complete graph K_5. Example: a(2)=3 because the walks of length 2 between the vertices A and B of the complete graph ABCDE are: ACB, ADB, AEB. - Emeric Deutsch, Apr 01 2004
The terms of the sequence are the number of segments (sides) per iteration of the space-filling Peano-Hilbert curve. - Giorgio Balzarotti, Mar 16 2006
General form: k=4^n-k. Also: A001045, A078008, A097073, A115341, A015518, A054878. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008
A further inverse binomial transform generates A015441. - Paul Curtz, Nov 01 2009
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 3's along the central diagonal, and 2's along the subdiagonal and the superdiagonal. - John M. Campbell, Jul 19 2011
Pisano period lengths: 1, 1, 2, 2, 10, 2, 6, 2, 6, 10, 10, 2, 6, 6, 10, 2, 4, 6, 18, 10, ... - R. J. Mathar, Aug 10 2012
Sum_{i=0..m} (-1)^(m+i)*4^i, for m >= 0, gives the terms after 0. - Bruno Berselli, Aug 28 2013
The ratio a(n+1)/a(n) converges to 4 as n approaches infinity. - Felix P. Muga II, Mar 09 2014
This is the Lucas sequence U(P=3,Q=-4), and hence for n>=0, a(n+2)/a(n+1) equals the continued fraction 3 + 4/(3 + 4/(3 + 4/(3 + ... + 4/3))) with n 4's. - Greg Dresden, Oct 07 2019
For n > 0, gcd(a(n), a(n+1)) = 1. - Kengbo Lu, Jul 27 2020

Examples

			G.f. = x + 3*x^2 + 13*x^3 + 51*x^4 + 205*x^5 + 819*x^6 + 3277*x^7 + 13107*x^8 + ...
		

Crossrefs

Programs

  • Magma
    [Floor(4^n/5-(-1)^n/5): n in [0..30]]; // Vincenzo Librandi, Jun 24 2011
    
  • Maple
    seq(round(4^n/5),n=0..25) # Mircea Merca, Dec 28 2010
  • Mathematica
    k=0;lst={k};Do[k=4^n-k;AppendTo[lst, k], {n, 0, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
    LinearRecurrence[{3,4}, {0,1}, 30] (* Harvey P. Dale, Jun 26 2012 *)
    CoefficientList[Series[x/((1 - 4 x) (1 + x)), {x, 0, 50}], x] (* Vincenzo Librandi, Mar 26 2014 *)
  • PARI
    a(n) = 4^n/5-(-1)^n/5; \\ Altug Alkan, Jan 08 2016
    
  • PARI
    first(n) = Vec(x/(1 - 3*x - 4*x^2) + O(x^n), -n) \\ Iain Fox, Dec 30 2017
    
  • Python
    def A015521(n): return ((1<<(n<<1))|1)//5 # Chai Wah Wu, Jun 28 2023
  • Sage
    [lucas_number1(n,3,-4) for n in range(0, 24)] # Zerinvary Lajos, Apr 22 2009
    

Formula

From Paul Barry, Apr 02 2003: (Start)
a(n) = (4^n - (-1)^n)/5.
E.g.f.: (exp(4*x) - exp(-x))/5. (End)
a(n) = Sum_{k=1..n} binomial(n, k)*(-1)^(n+k)*5^(k-1). - Paul Barry, May 13 2003
a(2*n) = 4*a(2*n-1) - 1, a(2*n+1) = 4*a(2*n) + 1. In general this is true for all sequences of the type a(n) + a(n+1) = q^(n): i.e., a(2*n) = q*a(2n-1) - 1 and a(2*n+1) = q*a(2*n) + 1. - Amarnath Murthy, Jul 15 2003
From Emeric Deutsch, Apr 01 2004: (Start)
a(n) = 4^(n-1) - a(n-1).
G.f.: x/(1-3*x - 4*x^2). (End)
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*3^(n-2k)*4^k. - Paul Barry, Jul 29 2004
a(n) = 4*a(n-1) - (-1)^n, n > 0, a(0)=0. - Paul Barry, Aug 25 2004
a(n) = Sum_{k=0..n} A155161(n,k)*2^(n-k), n >= 1. - Philippe Deléham, Jan 27 2009
a(n) = round(4^n/5). - Mircea Merca, Dec 28 2010
The logarithmic generating function 1/5*log((1+x)/(1-4*x)) = x + 3*x^2/2 + 13*x^3/3 + 51*x^4/4 + ... has compositional inverse 5/(4+exp(-5*x)) - 1, the e.g.f. for a signed version of A213127. - Peter Bala, Jun 24 2012
a(n) = (-1)^(n-1)*Sum_{k=0..n-1} A135278(n-1,k)*(-5)^k = (4^n - (-1)^n)/5 = (-1)^(n-1)*Sum_{k=0..n-1} (-4)^k. Equals (-1)^(n-1)*Phi(n,-4), where Phi is the cyclotomic polynomial when n is an odd prime. (For n > 0.) - Tom Copeland, Apr 14 2014
a(n+1) = 2^(2*n) - a(n), a(0) = 0. - Ben Paul Thurston, Dec 25 2015
a(n) = A247281(n)/5. - Altug Alkan, Jan 08 2016
From Kengbo Lu, Jul 27 2020: (Start)
a(n) = 3*Sum_{k=0..n-1} a(k) + 1 if n odd; a(n) = 3*Sum_{k=0..n-1} a(k) if n even.
a(n) = A030195(n) + Sum_{k=0..n-2} a(k)*A030195(n-k-1).
a(n) = A085449(n) + Sum_{k=0..n-1} a(k)*A085449(n-k).
a(n) = F(n) + 2*Sum_{k=0..n-1} a(k)*F(n-k) + 3*Sum_{k=0..n-2} a(k)*F(n-k-1), where F(n) denotes the Fibonacci numbers.
a(n) = F(n) + Sum_{k=0..n-1} a(k)*(L(n-k) + F(n-k+1)), where F(n) denotes the Fibonacci numbers and L(n) denotes the Lucas numbers.
a(n) = 3^(n-1) + 4*Sum_{k=0..n-2} 3^(n-k-2)*a(k).
a(m+n) = a(m)*a(n+1) + 4*a(m-1)*a(n).
a(2*n) = Sum_{i>=0, j>=0} binomial(n-j-1,i)*binomial(n-i-1,j)*3^(2n-2i-2j-1)*4^(i+j). (End)

A274073 a(n) = 6^n-(-1)^n.

Original entry on oeis.org

0, 7, 35, 217, 1295, 7777, 46655, 279937, 1679615, 10077697, 60466175, 362797057, 2176782335, 13060694017, 78364164095, 470184984577, 2821109907455, 16926659444737, 101559956668415, 609359740010497, 3656158440062975, 21936950640377857, 131621703842267135
Offset: 0

Views

Author

Colin Barker, Jun 09 2016

Keywords

Crossrefs

Cf. A015540.
Sequences of the type k^n-(-1)^n: A062157 (k=0), A010673 (k=1), A062510 (k=2), A105723 (k=3), A247281 (k=4), A274072 (k=5), this sequence (k=6).

Programs

  • PARI
    concat(0, Vec(7*x/((1+x)*(1-6*x)) + O(x^30)))

Formula

O.g.f.: 7*x/((1+x)*(1-6*x)).
E.g.f.: exp(6*x) - exp(-x).
a(n) = 5*a(n-1) + 6*a(n-2) for n>1.
a(n) = 7*A015540(n).

A230368 A strong divisibility sequence associated with the algebraic integer 1 + i.

Original entry on oeis.org

1, 1, 1, 5, 1, 1, 1, 15, 1, 1, 1, 65, 1, 1, 1, 255, 1, 1, 1, 1025, 1, 1, 1, 4095, 1, 1, 1, 16385, 1, 1, 1, 65535, 1, 1, 1, 262145, 1, 1, 1, 1048575, 1, 1, 1, 4194305, 1, 1, 1, 16777215, 1, 1, 1, 67108865, 1, 1, 1, 268435455, 1, 1, 1, 1073741825
Offset: 1

Views

Author

Peter Bala, Jan 10 2014

Keywords

Comments

Let alpha be an algebraic integer and define a sequence of integers a(n) by the condition a(n) = max { integer d : alpha^n == 1 (mod d)}. Silverman shows that a(n) is a strong divisibility sequence, that is gcd(a(n), a(m)) = a(gcd(n, m)) for all n and m in N; in particular, if n divides m then a(n) divides a(m). For the present sequence we take alpha = 1 + i. For other examples see A230369, A235450 and (conjecturally) A082630.

Crossrefs

Programs

  • Maple
    seq( gcd( 1/2*((1 - I)^n + (1 + I)^n - 2), I/2*((1 + I)^n - (1 - I )^n ) ), n = 1..80);

Formula

a(4*n) = |(-4)^n - 1| otherwise a(n) = 1.
a(4*n) = 5*A015521(n).
O.g.f.: 1/(1 - 4*x^4) - 1/(1 + x^4) + 1/(1 - x) - 1/(1 - x^4) = x*(-1 -x -x^2 -5*x^3 +3*x^4 +3*x^5 +3*x^6 +5*x^7 +4*x^8 +4*x^9 +4*x^10) / ( (1-x) *(1+x) *(2*x^2+1) *(2*x^2-1) *(x^2+1) *(x^4+1) ).
Recurrence equation: a(n) = 4*a(n-4) + a(n-8) - 4*a(n-12).

A274072 a(n) = 5^n-(-1)^n.

Original entry on oeis.org

0, 6, 24, 126, 624, 3126, 15624, 78126, 390624, 1953126, 9765624, 48828126, 244140624, 1220703126, 6103515624, 30517578126, 152587890624, 762939453126, 3814697265624, 19073486328126, 95367431640624, 476837158203126, 2384185791015624, 11920928955078126
Offset: 0

Views

Author

Colin Barker, Jun 09 2016

Keywords

Crossrefs

Cf. A015531.
Sequences of the type k^n-(-1)^n: A062157 (k=0), A010673 (k=1), A062510 (k=2), A105723 (k=3), A247281 (k=4), this sequence (k=5), A274073 (k=6).

Programs

  • Mathematica
    LinearRecurrence[{4, 5}, {0, 6}, 30] (* Paolo Xausa, Oct 21 2024 *)
  • PARI
    concat(0, Vec(6*x/((1+x)*(1-5*x)) + O(x^30)))

Formula

O.g.f.: 6*x/((1+x)*(1-5*x)).
E.g.f.: exp(5*x) - exp(-x).
a(n) = 4*a(n-1) + 5*a(n-2) for n>1.
a(n) = 6*A015531(n).

A321632 Expansion of e.g.f. (1 + sin(x))/exp(x).

Original entry on oeis.org

1, 0, -1, 1, 1, -5, 9, -9, 1, 15, -31, 31, 1, -65, 129, -129, 1, 255, -511, 511, 1, -1025, 2049, -2049, 1, 4095, -8191, 8191, 1, -16385, 32769, -32769, 1, 65535, -131071, 131071, 1, -262145, 524289, -524289, 1, 1048575, -2097151, 2097151, 1, -4194305, 8388609, -8388609
Offset: 0

Views

Author

Paolo P. Lava, Nov 16 2018

Keywords

Comments

A140323(n) = |a(4*n-1)| = |a(4*n-2)|, A247281(n) = |a(4*n+1)|.
The absolute values of the coefficients of the expansion of the reciprocal of this function are listed in A186364.

Crossrefs

Programs

  • Maple
    seq(factorial(n)*coeff(series((1+sin(x))/exp(x),x=0,48),x,n),n=0..47);
  • Mathematica
    With[{nn=50},CoefficientList[Series[(1+Sin[x])/Exp[x],{x,0,nn}],x] Range[ 0,nn]!] (* or *) LinearRecurrence[{-3,-4,-2},{1,0,-1},50] (* Harvey P. Dale, Jul 21 2021 *)
  • PARI
    Vec((1 + 3*x + 3*x^2) / ((1 + x)*(1 + 2*x + 2*x^2)) + O(x^40)) \\ Colin Barker, Nov 16 2018

Formula

a(4*k) = 1;
a(4*k+1) = (-4)^k - 1;
a(4*k+2) = -2*a(4*k+1) - 1 = -2*(-4)^k + 1;
a(4*k+3) = 2*a(4*k+1) + 1 = 2*(-4)^k - 1.
From Colin Barker, Nov 16 2018: (Start)
G.f.: (1 + 3*x + 3*x^2) / ((1 + x)*(1 + 2*x + 2*x^2)).
a(n) = (-1)^n + i/2*((-1-i)^n - (-1+i)^n), where i=sqrt(-1).
a(n) = -3*a(n-1) - 4*a(n-2) - 2*a(n-3) for n>2. (End)
Showing 1-5 of 5 results.