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.

Previous Showing 11-20 of 30 results. Next

A072405 Triangle T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 4, 3, 1, 1, 4, 7, 7, 4, 1, 1, 5, 11, 14, 11, 5, 1, 1, 6, 16, 25, 25, 16, 6, 1, 1, 7, 22, 41, 50, 41, 22, 7, 1, 1, 8, 29, 63, 91, 91, 63, 29, 8, 1, 1, 9, 37, 92, 154, 182, 154, 92, 37, 9, 1, 1, 10, 46, 129, 246, 336, 336, 246, 129, 46, 10, 1, 1, 11, 56, 175, 375, 582, 672, 582, 375, 175, 56, 11, 1
Offset: 0

Views

Author

Henry Bottomley, Jun 16 2002

Keywords

Comments

Starting 1,0,1,1,1,... this is the Riordan array ((1-x+x^2)/(1-x), x/(1-x)). Its diagonal sums are A006355. Its inverse is A106509. - Paul Barry, May 04 2005

Examples

			Rows start as:
  1;
  1, 1;
  1, 1,  1; (key row for starting the recurrence)
  1, 2,  2,  1;
  1, 3,  4,  3,  1;
  1, 4,  7,  7,  4, 1;
  1, 5, 11, 14, 11, 5, 1;
		

Crossrefs

Row sums give essentially A003945, A007283, or A042950.
Cf. A072406 for number of odd terms in each row.
Cf. A051597, A096646, A122218 (identical for n > 1).
Cf. A007318 (q=0), A072405 (q= -1), A173117 (q=1), A173118 (q=2), A173119 (q=3), A173120 (q=-4).

Programs

  • Magma
    T:= func< n,k | n lt 3 select 1 else Binomial(n,k) - Binomial(n-2,k-1) >;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 28 2021
    
  • Mathematica
    t[2, 1] = 1; t[n_, n_] = t[, 0] = 1; t[n, k_] := t[n, k] = t[n-1, k-1] + t[n-1, k]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Nov 28 2013, after Ralf Stephan *)
  • PARI
    A072405(n, k) = if(n>2, binomial(n, k)-binomial(n-2, k-1), 1) \\ M. F. Hasler, Jan 06 2024
  • Sage
    def T(n,k): return 1 if n<3 else binomial(n,k) - binomial(n-2,k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 28 2021
    

Formula

T(n, k) = C(n,k) - C(n-2,k-1) for n >= 3 and T(n, k) = 1 otherwise.
T(n, k) = T(n-1, k-1) + T(n-1, k) starting with T(2, 0) = T(2, 1) = T(2, 2) = 1 and T(n, 0) = T(n, n) = 1.
G.f.: (1-x^2*y) / (1 - x*(1+y)). - Ralf Stephan, Jan 31 2005
From G. C. Greubel, Apr 28 2021: (Start)
Sum_{k=0..n} T(n, k) = (n+1)*[n<3] + 3*2^(n-2)*[n>=3].
T(n, k, q) = q*[n=2] + Sum_{j=0..5} q^j*binomial(n-2*j, k-j)*[n>2*j] with T(n,0) = T(n,n) = 1 for q = -1. (End)

A091629 Product of digits associated with A091628(n). Essentially the same as A007283.

Original entry on oeis.org

6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472
Offset: 1

Views

Author

Enoch Haga, Jan 24 2004

Keywords

Comments

Sequence arising in Farideh Firoozbakht's solution to Prime Puzzle 251 - 23 is the only pointer prime (A089823) not containing digit "1".
The monotonic increasing value of successive product of digits strongly suggests that in successive n the digit 1 must be present.

Crossrefs

Sequences of the form (2*m+1)*2^n: A000079 (m=0), A007283 (m=1), A020714 (m=2), A005009 (m=3), A005010 (m=4), A005015 (m=5), A005029 (m=6), A110286 (m=7), A110287 (m=8), A110288 (m=9), A175805 (m=10), A248646 (m=11), A164161 (m=12), A175806 (m=13), A257548 (m=15).

Programs

Formula

a(n) = 3 * 2^n = product of digits of A091628(n).
From Philippe Deléham, Nov 23 2008: (Start)
a(n) = 6*2^(n-1).
a(n) = 2*a(n-1), with a(1) = 6.
G.f.: 6*x/(1-2*x). (End)
E.g.f.: 3*(exp(2*x) - 1). - G. C. Greubel, Jan 05 2023

Extensions

Edited and extended by Ray Chandler, Feb 07 2004

A058764 Smallest number x such that cototient(x) = 2^n.

Original entry on oeis.org

2, 4, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472
Offset: 0

Views

Author

Labos Elemer, Jan 02 2001

Keywords

Comments

Since the cototient of 3*2^n is 2^(n+1), upper bounds are given by A007283(n-1). - R. J. Mathar, Oct 13 2008
A058764(n+1) is the number of different walks with n steps in the graph G = ({1,2,3,4}, {{1,2}, {2,3}, {3,4}}). - Aldo González Lorenzo, Feb 27 2012

Examples

			a(5) = 48, cototient(48) = 48-Phi(48) = 48-16 = 32. For n>2, a(n) = 3*2^(n-1); largest solutions = 2^(n+1). Prime factors of solutions: 2 and Mersenne-primes were found only.
		

Crossrefs

Cf. A042950. - R. J. Mathar, Jan 30 2009
Cf. A007283.

Programs

  • Mathematica
    Function[s, Flatten@ Map[First@ Position[s, #] &, 2^Range[0, Floor@ Log2@ Max@ s]]]@ Table[n - EulerPhi@ n, {n, 10^7}] (* Michael De Vlieger, Dec 17 2016 *)
  • PARI
    a(n) = {x = 1; while(x - eulerphi(x) != 2^n, x++); x;} \\ Michel Marcus, Dec 11 2013
    
  • PARI
    a(n) = if(n>1,3,4)<<(n-1) \\ M. F. Hasler, Nov 10 2016

Formula

a(n) = min { x | A051953(x) = 2^n }.
a(n) = (if n>1 then 3 else 4)*2^(n-1) = A007283(n-1) for n>1. (Conjectured.) - M. F. Hasler, Nov 10 2016

Extensions

Edited by M. F. Hasler, Nov 10 2016
a(27)-a(31) from Jud McCranie, Jul 13 2017

A110164 Expansion of (1-x^2)/(1+2x).

Original entry on oeis.org

1, -2, 3, -6, 12, -24, 48, -96, 192, -384, 768, -1536, 3072, -6144, 12288, -24576, 49152, -98304, 196608, -393216, 786432, -1572864, 3145728, -6291456, 12582912, -25165824, 50331648, -100663296, 201326592, -402653184, 805306368, -1610612736, 3221225472
Offset: 0

Views

Author

Paul Barry, Jul 14 2005

Keywords

Comments

Diagonal sums of Riordan array ((1-x)/(1+x),x/(1+x)^2), A110162.
The positive sequence with g.f. (1-x^2)/(1-2x) gives the row sums of the Riordan array (1+x,x/(1-x)). - Paul Barry, Jul 18 2005
The inverse g.f. is (1 + 2*x + x^2 + 2*x^3 + x^4 + 2*x^5 + x^6 + ...). - Gary W. Adamson, Jan 07 2011
In absolute value, essentially the same as A007283(n) = A003945(n+1) = A042950(n+1) = A082505(n+1) = A087009(n+3) = A091629(n) = A098011(n+4) = A111286(n+2). - M. F. Hasler, Apr 19 2015

Crossrefs

Programs

Formula

a(n) = 3*(-2)^(n-2) = 3*A122803(n-2) for n >= 2. a(n) = -2 a(n-1) for n >= 3. - M. F. Hasler, Apr 19 2015
E.g.f.: (1/4) - (x/2) + (3/4)*exp(-2*x). - Alejandro J. Becerra Jr., Jan 29 2021

A111286 Number of permutations avoiding the patterns {1342, 1432, 2341, 2431, 3142, 3241, 3412, 3421, 4132, 4231, 4312, 4321}; number of strong sorting class based on 1342.

Original entry on oeis.org

1, 1, 2, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472
Offset: 0

Views

Author

Len Smiley, Nov 01 2005

Keywords

Crossrefs

Cf. A003945, A007283, A042950, A098011, A110164 - differs from each by one initial term.

Programs

  • Mathematica
    Table[If[n == 1, 1, If[n == 2, 2, 3*2^(n - 2)]], {n, 32}] (* Robert G. Wilson v *)
    LinearRecurrence[{2},{1,2,6},40] (* Harvey P. Dale, Jul 14 2019 *)

Formula

a(n) = 3*2^(n-2), n>=3.
a(n) = 2*a(n-1) for n=3. G.f.: (1-x+2*x^3)/(1-2*x). - Colin Barker, Nov 29 2012

Extensions

a(0)=1 prepended by Alois P. Heinz, Mar 12 2024

A191302 Denominators in triangle that leads to the Bernoulli numbers.

Original entry on oeis.org

1, 2, 2, 3, 2, 2, 2, 3, 15, 2, 6, 3, 2, 1, 5, 105, 2, 6, 15, 15, 2, 3, 3, 105, 105, 2, 2, 5, 7, 35, 2, 3, 3, 21, 21, 231, 2, 6, 15, 15, 21, 21, 2, 1, 5, 15, 1, 77, 15015, 2, 6, 3, 35, 15, 33, 1155
Offset: 0

Views

Author

Paul Curtz, May 30 2011

Keywords

Comments

For the definition of the ASPEC array coefficients see the formulas; see also A029635 (Lucas triangle), A097207 and A191662 (k-dimensional square pyramidal numbers).
The antidiagonal row sums of the ASPEC array equal A042950(n) and A098011(n+3).
The coefficients of the T(n,m) array are defined in A190339. We define the coefficients of the SBD array with the aid of the T(n,n+1), see the formulas and the examples.
Multiplication of the coefficients in the rows of the ASPEC array with the coefficients in the columns of the SBD array leads to the coefficients of the BSPEC triangle, see the formulas. The BSPEC triangle can be looked upon as a spectrum for the Bernoulli numbers.
The row sums of the BSPEC triangle give the Bernoulli numbers A164555(n)/A027642(n).
For the numerators of the BSPEC triangle coefficients see A192456.

Examples

			The first few rows of the array ASPEC array:
  2, 1,  1,  1,   1,   1,    1,
  2, 3,  4,  5,   6,   7,    8,
  2, 5,  9, 14,  20,  27,   35,
  2, 7, 16, 30,  50,  77,  112,
  2, 9, 25, 55, 105, 182,  294,
The first few T(n,n+1) = T(n,n)/2 coefficients:
1/2, -1/6, 1/15, -4/105, 4/105, -16/231, 3056/15015, ...
The first few rows of the SBD array:
  1/2,   0,   0,     0
  1/2,   0,   0,     0
  1/2, -1/6,  0,     0
  1/2, -1/6,  0,     0
  1/2, -1/6, 1/15,   0
  1/2, -1/6, 1/15,   0
  1/2, -1/6, 1/15, -4/105
  1/2, -1/6, 1/15, -4/105
The first few rows of the BSPEC triangle:
  B(0) =   1   = 1/1
  B(1) =  1/2  = 1/2
  B(2) =  1/6  = 1/2 - 1/3
  B(3) =   0   = 1/2 - 1/2
  B(4) = -1/30 = 1/2 - 2/3 +  2/15
  B(5) =   0   = 1/2 - 5/6 +  1/3
  B(6) =  1/42 = 1/2 - 1/1 +  3/5  - 8/105
  B(7) =   0   = 1/2 - 7/6 + 14/15 - 4/15
		

Crossrefs

Cf. A028246 (Worpitzky), A085737/A085738 (Conway-Sloane) and A051714/A051715 (Akiyama-Tanigawa) for other triangles that lead to the Bernoulli numbers. - Johannes W. Meijer, Jul 02 2011

Programs

  • Maple
    nmax:=13: mmax:=nmax:
    A164555:=proc(n): if n=1 then 1 else numer(bernoulli(n)) fi: end:
    A027642:=proc(n): if n=1 then 2 else denom(bernoulli(n)) fi: end:
    for m from 0 to 2*mmax do T(0,m):=A164555(m)/A027642(m) od:
    for n from 1 to nmax do for m from 0 to 2*mmax do T(n,m):=T(n-1,m+1)-T(n-1,m) od: od:
    seq(T(n,n+1),n=0..nmax):
    for n from 0 to nmax do ASPEC(n,0):=2: for m from 1 to mmax do ASPEC(n,m):= (2*n+m)*binomial(n+m-1,m-1)/m od: od:
    for n from 0 to nmax do seq(ASPEC(n,m),m=0..mmax) od:
    for n from 0 to nmax do for m from 0 to 2*mmax do SBD(n,m):=0 od: od:
    for m from 0 to mmax do for n from 2*m to nmax do SBD(n,m):= T(m,m+1) od: od:
    for n from 0 to nmax do seq(SBD(n,m), m= 0..mmax/2) od:
    for n from 0 to nmax do BSPEC(n,2) := SBD(n,2)*ASPEC(2,n-4) od:
    for m from 0 to mmax do for n from 0 to nmax do BSPEC(n,m) := SBD(n,m)*ASPEC(m,n-2*m) od: od:
    for n from 0 to nmax do seq(BSPEC(n,m), m=0..mmax/2) od:
    seq(add(BSPEC(n, k), k=0..floor(n/2)) ,n=0..nmax):
    Tx:=0:
    for n from 0 to nmax do for m from 0 to floor(n/2) do a(Tx):= denom(BSPEC(n,m)): Tx:=Tx+1: od: od:
    seq(a(n),n=0..Tx-1); # Johannes W. Meijer, Jul 02 2011
  • Mathematica
    (* a=ASPEC, b=BSPEC *) nmax = 13; a[n_, 0] = 2; a[n_, m_] := (2n+m)*Binomial[n+m-1, m-1]/m; b[n_] := BernoulliB[n]; b[1]=1/2; bb = Table[b[n], {n, 0, nmax}]; diff = Table[ Differences[bb, n], {n, 1, nmax}]; dd = Diagonal[diff]; sbd[n_, m_] := If[n >= 2m, -dd[[m+1]], 0]; b[n_, m_] := sbd[n, m]*a[m, n-2m]; Table[b[n, m], {n, 0, nmax}, {m, 0, Floor[n/2]}] // Flatten // Denominator (* Jean-François Alcover_, Aug 09 2012 *)

Formula

ASPEC(n, 0) = 2 and ASPEC(n, m) = (2*n+m)*binomial(n+m-1, m-1)/m, n >= 0, m >= 1.
ASPEC(n, m) = ASPEC(n-1, m) + ASPEC(n, m-1), n >= 1, m >= 1, with ASPEC(n, 0) = 2, n >= 0, and ASPEC(0,m) = 1, m >= 1.
SBD(n, m) = T(m, m+1), n >= 2*m; see A190339 for the definition of the T(n, m).
BSPEC(n, m) = SBD(n, m)*ASPEC(m, n-2*m)
Sum_{k=0..floor(n/2)} BSPEC(n, k) = A164555(n)/A027642(n).

Extensions

Edited, Maple program and crossrefs added by Johannes W. Meijer, Jul 02 2011

A286586 a(n) = A006047(A048673(n)).

Original entry on oeis.org

2, 3, 2, 6, 4, 9, 3, 12, 8, 6, 6, 18, 2, 18, 3, 24, 4, 12, 4, 12, 4, 9, 6, 36, 18, 27, 6, 36, 12, 54, 6, 48, 6, 6, 8, 24, 6, 18, 24, 24, 12, 6, 9, 18, 12, 36, 2, 72, 18, 27, 12, 54, 4, 81, 12, 72, 12, 18, 8, 108, 12, 9, 12, 96, 9, 36, 4, 12, 18, 36, 8, 48, 16, 27, 24, 36, 9, 36, 12, 48, 72, 18, 6, 12, 24, 54, 27, 36, 24, 18, 16, 72, 8, 81, 2
Offset: 1

Views

Author

Antti Karttunen, May 31 2017

Keywords

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import factorint, nextprime
    from operator import mul
    from functools import reduce
    def a006047(n):
        d=digits(n, 3)
        return n + 1 if n<3 else reduce(mul, [1 + d[i] for i in range(1, len(d))])
    def a048673(n):
        f = factorint(n)
        return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))//2
    def a(n): return a006047(a048673(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 12 2017
  • Scheme
    (define (A286586 n) (A006047 (A048673 n)))
    

Formula

a(n) = A006047(A048673(n)).
For n >= 0, a(A000079(n)) = A042950(n).

A168361 Period 2: repeat 2, -1.

Original entry on oeis.org

2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1
Offset: 1

Views

Author

Klaus Brockhaus, Nov 23 2009

Keywords

Comments

Interleaving of A007395 and -A000012.
Binomial transform of 2 followed by a signed version of A007283; also binomial transform of a signed version of A042950.
Second binomial transform of a signed version of A007051 without initial term 1.
Inverse binomial transform of 2 followed by A000079.
A028242 without first two terms gives partial sums.

Crossrefs

Cf. A168330 (repeat 3, -2), A007395 (all 2's sequence), A000012 (all 1's sequence), (A007283 3*2^n), A042950, A007051 ((3^n+1)/2), A000079 (powers of 2), A028242 (follow n+1 by n).

Programs

  • Magma
    &cat[ [2, -1]: n in [1..42] ];
    [ n eq 1 select 2 else -Self(n-1)+1: n in [1..84] ];
    
  • Magma
    &cat[[2,-1]^^40]; // Vincenzo Librandi, Jul 20 2016
  • Mathematica
    PadRight[{},120,{2,-1}] (* Harvey P. Dale, Jan 04 2015 *)
    Table[(1 - 3 (-1)^n)/2, {n, 120}] (* or *)
    Rest@ CoefficientList[Series[x (2 - x)/((1 - x) (1 + x)), {x, 0, 120}], x] (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    a(n)=2-n%2*3 \\ Charles R Greathouse IV, Jul 13 2016
    

Formula

a(n) = (1 - 3*(-1)^n)/2.
a(n) = -a(n-1) + 1 for n > 1; a(1) = 2.
a(n) = a(n-2) for n > 2; a(1) = 2, a(2) = -1.
a(n+1) - a(n) = 3*(-1)^n.
G.f.: x*(2 - x)/((1-x)*(1+x)).
E.g.f.: (1/2)*(-1 + exp(x))*(3 + exp(x))*exp(-x). - G. C. Greubel, Jul 19 2016

Extensions

G.f. adapted to the offset by Bruno Berselli, Apr 01 2011

A077802 Sum of products of parts increased by 1 in hook partitions of n, where hook partitions are of the form h*1^(n-h).

Original entry on oeis.org

1, 2, 7, 18, 41, 88, 183, 374, 757, 1524, 3059, 6130, 12273, 24560, 49135, 98286, 196589, 393196, 786411, 1572842, 3145705, 6291432, 12582887, 25165798, 50331621, 100663268, 201326563, 402653154, 805306337, 1610612704
Offset: 0

Views

Author

Alford Arnold, Dec 02 2002

Keywords

Comments

It is not clear whether a(0) should be 1 or 0; this depends on whether the empty partition is a hook partition. By strict interpretation of the definition above, it is not; and except for n=0, there are exactly n hook partitions for each n. On the other hand, if defined as "a partition in whose Ferrers diagram every point is on the first row or column", the empty partition is a hook partition. - Franklin T. Adams-Watters, Jul 11 2009

Examples

			The hook partitions of 4 are 4, 3+1, 2+1+1, 1+1+1+1; the corresponding products when parts are increased by 1 are 5, 8, 12, 16; and their sum is a(4) = 41.
		

Crossrefs

Cf. A074141, A055010 (first differences), A042950 (second differences).
Cf. A132048.
Same as A095151 except for a(0). - Franklin T. Adams-Watters, Jul 11 2009

Programs

Formula

From Vladeta Jovovic, Dec 05 2002: (Start)
a(n) = 3*2^n - n - 3, n > 0.
G.f.: x*(2-x)/(1-2*x)/(1-x)^2.
Recurrence: a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3). (End)
Row sums of triangle A132048. Equals binomial transform of [1, 1, 4, 2, 4, 2, 4, 2, 4, ...]. - Gary W. Adamson, Aug 08 2007
a(n) = A125128(n) + A000225(n), n >= 1. - Miquel Cerda, Aug 07 2016

Extensions

More terms from John W. Layman, Dec 05 2002

A052531 If n is even then 2^n+1 otherwise 2^n.

Original entry on oeis.org

2, 2, 5, 8, 17, 32, 65, 128, 257, 512, 1025, 2048, 4097, 8192, 16385, 32768, 65537, 131072, 262145, 524288, 1048577, 2097152, 4194305, 8388608, 16777217, 33554432, 67108865, 134217728, 268435457, 536870912, 1073741825, 2147483648
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Crossrefs

Programs

  • GAP
    a:=[2,2,5];; for n in [4..40] do a[n]:=2*a[n-1]+a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, May 09 2019
  • Magma
    [2^n + (1+(-1)^n)/2: n in [0..30]]; // G. C. Greubel, May 09 2019
    
  • Maple
    spec:= [S,{S=Union(Sequence(Union(Z,Z)),Sequence(Prod(Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
    seq(2^n + (1+(-1)^n)/2, n=0..30); # G. C. Greubel, Oct 17 2019
  • Mathematica
    2^# + (1 - Mod[#, 2]) & /@ Range[0, 40] (* Peter Pein, Jan 11 2008 *)
    Table[If[EvenQ[n], 2^n + 1, 2^n], {n, 0, 40}] (* Vladimir Joseph Stephan Orlovsky, Feb 07 2010, modified by G. C. Greubel, May 09 2019 *)
    Table[2^n + Boole[EvenQ[n]], {n, 0, 31}] (* Alonso del Arte, May 09 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((2-2*x-x^2)/((1-x^2)*(1-2*x))) \\ G. C. Greubel, May 09 2019
    
  • PARI
    a(n) = 1<David A. Corneth, Oct 18 2019
    
  • Sage
    [2^n + (1+(-1)^n)/2 for n in (0..30)] # G. C. Greubel, May 09 2019
    

Formula

G.f.: (2 - 2*x - x^2)/( (1-x^2)*(1-2*x) ).
a(n) = a(n-1) + 2*a(n-2) - 1, with a(0) = 2, a(1) = 2, a(2) = 5.
a(n) = 2^n + Sum_{alpha = RootOf(-1+x^2)} alpha^(-n)/2.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), with a(0) = 2, a(1) = 2, a(2) = 5. - G. C. Greubel, May 09 2019
a(n) = 2^n + (1 + (-1)^n)/2. - G. C. Greubel, Oct 17 2019
E.g.f.: exp(2*x) + cosh(x). - Stefano Spezia, Oct 18 2019

Extensions

More terms from James Sellers, Jun 05 2000
Better definition from Peter Pein (petsie(AT)dordos.net), Jan 11 2008
Previous Showing 11-20 of 30 results. Next