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

A001047 a(n) = 3^n - 2^n.

Original entry on oeis.org

0, 1, 5, 19, 65, 211, 665, 2059, 6305, 19171, 58025, 175099, 527345, 1586131, 4766585, 14316139, 42981185, 129009091, 387158345, 1161737179, 3485735825, 10458256051, 31376865305, 94134790219, 282412759265, 847255055011, 2541798719465, 7625463267259, 22876524019505
Offset: 0

Views

Author

Keywords

Comments

a(n+1) is the sum of the elements in the n-th row of triangle pertaining to A036561. - Amarnath Murthy, Jan 02 2002
Number of 2 X n binary arrays with a path of adjacent 1's and no path of adjacent 0's from top row to bottom row. - R. H. Hardin, Mar 21 2002
With offset 1, partial sums of A027649. - Paul Barry, Jun 24 2003
Number of distinct lines through the origin in the n-dimensional lattice of side length 2. A049691 has the values for the 2-dimensional lattice of side length n. - Joshua Zucker, Nov 19 2003
a(n+1)/(n+1)=(3*3^n-2*2^n)/(n+1) is the second binomial transform of the harmonic sequence 1/(n+1). - Paul Barry, Apr 19 2005
a(n+1) is the sum of n-th row of A036561. - Reinhard Zumkeller, May 14 2006
The sequence gives the sum of the lengths of the segments in Cantor's dust generating sequence up to the i-th step. Measurement unit = length of the segment of i-th step. - Giorgio Balzarotti, Nov 18 2006
Let T be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xTy if x is a proper subset of y. Then a(n) = |T|. - Ross La Haye, Dec 22 2006
From Alexander Adamchuk, Jan 04 2007: (Start)
a(n) is prime for n in A057468.
p divides a(p) - 1 for prime p.
Quotients (3^p - 2^p - 1)/p, where p = prime(n), are listed in A127071.
Numbers k such that k divides 3^k - 2^k - 1 are listed in A127072.
Pseudoprimes in A127072(n) include all powers of primes {2,3,7} and some composite numbers that are listed in A127073, which includes all Carmichael numbers A002997.
Numbers n such that n^2 divides 3^n - 2^n - 1 are listed in A127074.
5 divides a(2n).
5^2 divides a(2*5n).
5^3 divides a(2*5^2n).
5^4 divides a(2*5^3n).
7^2 divides a(6*7n).
13 divides a(4n).
13^2 divides a(4*13n).
19 divides a(3n).
19^2 divides a(3*19n).
23^2 divides a(11n).
23^3 divides a(11*23n).
23^4 divides a(11*23^2n).
29 divides a(7n).
p divides a((p-1)n) for prime p>3.
p divides a((p-1)/2) for prime p in A097934. Also primes p such that 6 is a square mod p, except {2,3}, A038876(n).
p^(k+1) divides a(p^k*(p-1)/2*n) for prime p in A097934.
p^(k+1) divides a(p^k*(p-1)*n) for prime p>3.
Note the exception that for p = 23, p^(k+2) divides a(p^k*(p-1)/2*n).
There are no more such exceptions for primes p up to 600000. (End)
a(n) divides a(q*(n+1)-1), for all q integer. Leonardo Sarasua, Apr 15 2024
Final digits of terms follow sequence 1,5,9,5. - Enoch Haga, Nov 26 2007
This is also the second column sequence of the Sheffer triangle A143494 (2-restricted Stirling2 numbers). See the e.g.f. given below. - Wolfdieter Lang, Oct 08 2011
Partial sums give A000392. - Jon Perry, Apr 05 2014
For n >= 1, this is also row 2 of A281890: when consecutive positive integers are written as a product of primes in nondecreasing order, "3" occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 17 2017
a(n) is the number of ternary sequences of length n which include the digit 2. For example, a(2)=5 since the sequences are 02,20,12,21,22. - Enrique Navarrete, Apr 05 2021
a(n-1) is the number of ways we can form disjoint unions of two nonempty subsets of [n] such that the union contains n. For example, for n = 3, a(2) = 5 since the disjoint unions are {1}U{3}, {1}U{2,3}, {2}U{3}, {2}U{1,3}, and {1,2}U{3}. Cf. A000392 if we drop the requirement that the union contains n. - Enrique Navarrete, Aug 24 2021
Configures as a composite Koch Snowflake Fractal (see illustration in links) based on the five-fold division of the Cantor Square/Cantor Dust Fractal of (9^n-4^n)/5 see my illustration in (A016153). - John Elias, Oct 13 2021
Number of pairs (A,B) where B is a subset of {1,2,...,n} and A is a proper subset of B. - Jianing Song, Jun 18 2022
From Manfred Boergens, Mar 29 2023: (Start)
With regard to the comments by Ross La Haye and Jianing Song: Omitting "proper" gives A000244.
Number of pairs (A,B) where B is a nonempty subset of {1,2,...,n} and A is a nonempty subset of B. For nonempty proper subsets see a(n+1) in A028243. (End)
a(n) is the number of n-digit numbers whose smallest decimal digit is 7. - Stefano Spezia, Nov 15 2023
a(n-1) is the number of all possible player-reduced binary games observed by each player in an nx2 game assuming the individual strategies of k < n - 1 players are fixed and the remaining n - k - 1 player will play as one, either maintaining their status quo strategies or jointly adopting an alternative strategy. - Ambrosio Valencia-Romero, Apr 11 2024

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 86-87.
  • 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

a(n) = row sums of A091913, row 2 of A047969, column 1 of A090888 and column 1 of A038719.
Cf. partitions: A241766, A241759.
A diagonal of A262307.

Programs

  • Haskell
    a001047 n = a001047_list !! n
    a001047_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (0, 1)
    -- Reinhard Zumkeller, Jun 09 2013
  • Magma
    [3^n - 2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    seq(3^n - 2^n, n=0..40); # Giorgio Balzarotti, Nov 18 2006
    A001047:=1/(3*z-1)/(2*z-1); # Simon Plouffe in his 1992 dissertation, dropping the initial zero
  • Mathematica
    Table[ 3^n - 2^n, {n, 0, 25} ]
    LinearRecurrence[{5, -6}, {0, 1}, 25] (* Harvey P. Dale, Aug 18 2011 *)
    Numerator@NestList[(3#+1)/2&,1/2,100] (* Zak Seidov, Oct 03 2011 *)
  • PARI
    {a(n) = 3^n - 2^n};
    
  • Python
    [3**n - 2**n for n in range(25)] # Ross La Haye, Aug 19 2005; corrected by David Radcliffe, Jun 26 2016
    
  • Sage
    [lucas_number1(n, 5, 6) for n in range(26)]  # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1-2*x)*(1-3*x)).
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 3*a(n-1) + 2^(n-1). - Jon Perry, Aug 23 2002
Starting 0, 0, 1, 5, 19, ... this is 3^n/3 - 2^n/2 + 0^n/6, the binomial transform of A086218. - Paul Barry, Aug 18 2003
a(n) = A083323(n)-1 = A056182(n)/2 = (A002783(n)-1)/2 = (A003063(n+2)-A003063(n+1))/2. - Ralf Stephan, Jan 12 2004
Binomial transform of A000225. - Ross La Haye, Feb 07 2005
a(n) = Sum_{k=0..n-1} binomial(n, k)*2^k. - Ross La Haye, Aug 20 2005
a(n) = 2^(2n) - A083324(n). - Ross La Haye, Sep 10 2005
a(n) = A112626(n, 1). - Ross La Haye, Jan 11 2006
E.g.f.: exp(3*x) - exp(2*x). - Mohammad K. Azarian, Jan 14 2009
a(n) = A217764(n,1). - Ross La Haye, Mar 27 2013
a(n) = 2*a(n-1) + 3^(n-1). - Toby Gottfried, Mar 28 2013
a(n) = A000244(n) - A000079(n). - Omar E. Pol, Mar 28 2013
a(n) = Sum_{k=0..2} Stirling1(2,k)*(k+1)^n = c_2^{(-n)}, poly-Cauchy numbers. - Takao Komatsu, Mar 28 2013
a(n) = A227048(n,A098294(n)). - Reinhard Zumkeller, Jun 30 2013
a(n+1) = Sum_{k=0..n} 2^k*3^(n-k). - J. M. Bergot, Mar 27 2018
Sum_{n>=1} 1/a(n) = A329064. - Amiram Eldar, Nov 20 2020
a(n) = (1/2)*Sum_{k=0..n} binomial(n, k)*(2^(n-k) + 2^k - 2).
a(n) = A001117(n) + 2*A000918(n) + 1. - Ambrosio Valencia-Romero, Mar 08 2022
a(n) = A000225(n) + A028243(n+1). - Ambrosio Valencia-Romero, Mar 09 2022
From Peter Bala, Jun 27 2025: (Start)
exp(Sum_{n >=1} a(2*n)/a(n)*x^n/n) = Sum_{n >= 0} a(n+1)*x^n.
exp(Sum_{n >=1} a(3*n)/a(n)*x^n/n) = 1 + 19*x + 247*x^2 + ... is the g.f. of A019443.
exp(Sum_{n >=1} a(4*n)/a(n)*x^n/n) = 1 + 65*x + 2743*x^2 + ... is the g.f. of A383754.
The following are all examples of telescoping series:
Sum_{n >= 1} 6^n/(a(n)*a(n+1)) = 2, since 6^n/(a(n)*a(n+1)) = b(n) - b(n+1), where b(n) = 2^n/a(n);
Sum_{n >= 1} 18^n/(a(n)*a(n+1)*a(n+2)) = 22/75, since 18^n/(a(n)*a(n+1)*a(n+2)) = c(n) - c(n+1), where c(n) = (5*6^n - 2*4^n)/(15*a(n)*a(n+1));
Sum_{n >= 1} 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = 634/48735 since 54^n/(a(n)*a(n+1)*a(n+2)*a(n+3)) = d(n) - d(n+1), where d(n) = (57*18^n - 38*12^n + 8*8^n)/(513*a(n)*a(n+1)*a(n+2)).
Sum_{n >= 1} 6^n/(a(n)*a(n+2)) = 14/25; Sum_{n >= 1} (-6)^n/(a(n)*a(n+2)) = -6/25.
Sum_{n >= 1} 6^n/(a(n)*a(n+3)) = 306/1805.
Sum_{n >= 1} 6^n/(a(n)*a(n+4)) = 4282/80275; Sum_{n >= 1} (-6)^n/(a(n)*a(n+4)) = -1698/80275. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 24 2010

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

Original entry on oeis.org

1, 2, 6, 14, 30, 62, 126, 254, 510, 1022, 2046, 4094, 8190, 16382, 32766, 65534, 131070, 262142, 524286, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 67108862, 134217726, 268435454, 536870910, 1073741822, 2147483646, 4294967294, 8589934590
Offset: 0

Views

Author

Paul Barry, May 28 2004

Keywords

Comments

a(n+1)/2 = A000225(n). Binomial transform is A002783. Binomial transform of 2 - 2*0^n + (-1)^n or 1,1,3,1,3,1,3,1,...
From Peter C. Heinig (algorithms(AT)gmx.de), Apr 17 2007: (Start)
Number of n-tuples where each entry is chosen from the subsets of {1,2} such that the intersection of all n entries contains exactly one element.
There is the following general formula: The number T(n,k,r) of n-tuples where each entry is chosen from the subsets of {1,2,..,k} such that the intersection of all n entries contains exactly r elements is: T(n,k,r) = binomial(k,r) * (2^n - 1)^(k-r). This may be shown by exhibiting a bijection to a set whose cardinality is obviously binomial(k,r) * (2^n - 1)^(k-r), namely the set of all k-tuples where each entry is chosen from subsets of {1,..,n} in the following way: Exactly r entries must be {1,..,n} itself (there are binomial(k,r) ways to choose them) and the remaining (k-r) entries must be chosen from the 2^n-1 proper subsets of {1,..,n}, i.e., for each of the (k-r) entries, {1,..,n} is forbidden (there are, independent of the choice of the full entries, (2^n - 1)^(k-r) possibilities to do that, hence the formula). The bijection into this set is given by (X_1,..,X_n) |-> (Y_1,..,Y_k) where for each j in {1,..,k} and each i in {1,..,n}, i is in Y_j if and only if j is in X_i.
Examples: a(1)=2 because the two tuples of length one are: ({1}) and ({2}).
a(3)=14 because the fourteen tuples of length three are: ({1},{1},{1}), ({2},{2},{2}), ({1,2},{1},{1}), ({1},{1,2},{1}), ({1},{1},{1,2}), ({1,2},{2},{2}), ({2},{1,2},{2}), ({2},{2},{1,2}), ({1,2},{1,2},{1}), ({1,2},{1},{1,2}), ({1},{1,2},{1,2}), ({1,2}{1,2}{2}), ({1,2}{2}{1,2}), ({2}{1,2}{1,2}).
The image of this set of tuples under the bijection described in the comment is: ({1,2,3},{}), ({},{1,2,3}), ({1,2,3},{1}), ({1,2,3},{2}), ({1,2,3},{3}), ({1},{1,2,3}), ({2},{1,2,3}), ({3},{1,2,3}), ({1,2,3},{1,2}), ({1,2,3},{1,3}), ({1,2,3},{2,3}), ({1,2},{1,2,3}), ({1,3},{1,2,3}), ({2,3},{1,2,3}). Here exactly one entry is {1,..,n}={1,2,3} and the other is a proper subset. (End)
An elephant sequence, see A175654. For the corner squares just one A[5] vector, with decimal value 170, leads to this sequence. For the central square this vector leads to the companion sequence A151821. - Johannes W. Meijer, Aug 15 2010
Conjecture: a(n) is the least m>0 such that A007814(A000108(m)) = n, where A000108 gives the Catalan numbers and A007814(x) is the 2-adic valuation of x (cf. A048881). - L. Edson Jeffery, Nov 26 2015
Also, the decimal representation of the diagonal from the corner to the origin of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 645", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 19 2017

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 170.

Crossrefs

Programs

  • Magma
    [-2+4*2^(n-1)+(Binomial(2*n,n) mod 2): n in [0..40]]; // Vincenzo Librandi, Aug 14 2015
    
  • Maple
    ZL := [S, {S=Prod(B,B), B=Set(Z, 1 <= card)}, labeled]: seq(combstruct[ count](ZL, size=n), n=1..31); # Zerinvary Lajos, Mar 13 2007
    for k from 1 to 31 do 2*(2^k-1); od;
  • Mathematica
    Join[{1}, LinearRecurrence[{3, -2}, {2, 6}, 50]] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
    Join[{1},NestList[2#+2&,2,40]] (* Harvey P. Dale, Dec 25 2013 *)
  • PARI
    Vec((1-x+2*x^2)/((1-x)*(1-2*x)) + O(x^40)) \\ Michel Marcus, Aug 14 2015
    
  • PARI
    vector(100, n, n--; if(n==0, 1, 2*2^n-2)) \\ Altug Alkan, Nov 26 2015

Formula

G.f.: (1-x+2*x^2)/((1-x)*(1-2*x)).
a(n) = A000918(n+1), n >= 1.
a(n) = 2*2^n - 2 + 0^n; a(n) = 3*a(n-1) - 2*a(n-2).
a(0)=1, a(1)=2, a(n) = 2*a(n-1) + 2 for n>1. - Philippe Deléham, Sep 28 2006
a(n) = Sum_{k=0..n} 2^k*A123110(n,k). - Philippe Deléham, Feb 09 2007
a(n) = 5*a(n-2) - 4*a(n-4) for n>4 [Because x(n)=f*x(n-1)+g*x(n-2) => x(n)=(f^2+2*g)*x(n-2)-g^2*x(n-4), here with f=3 and g=-2]. - Hermann Stamm-Wilbrandt, Aug 13 2015
E.g.f.: 1 + 2*exp(x)*(exp(x) - 1). - Stefano Spezia, Feb 25 2022

Extensions

Edited by N. J. A. Sloane, Apr 25 2007

A056182 First differences of A003063.

Original entry on oeis.org

0, 2, 10, 38, 130, 422, 1330, 4118, 12610, 38342, 116050, 350198, 1054690, 3172262, 9533170, 28632278, 85962370, 258018182, 774316690, 2323474358, 6971471650, 20916512102, 62753730610, 188269580438, 564825518530, 1694510110022, 5083597438930, 15250926534518, 45753048039010
Offset: 0

Views

Author

N. J. A. Sloane, Aug 05 2000

Keywords

Comments

Let V be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xVy if x is a proper subset of y or y is a proper subset of x. Then a(n) = |V|. - Ross La Haye, Dec 22 2006
With regard to the comment by Ross La Haye: For nonempty subsets see a(n+1) in A260217. - If "proper" is omitted see A027649. - For nonempty subsets with "proper" omitted see A091344. - Manfred Boergens, Sep 04 2023
It appears that a(n) is the number of permutations p of 1,..,(n+2) such that max[p(i+1)-p(i)] is 2. For example, for n=1, the permutations (1,3,2) and (2,1,3) and no others have the desired property, so a(1)=2. This approach gives values in agreement with all listed terms. [John W. Layman, Nov 09 2011]
In the terdragon curve, a(n-1) is the number of enclosed unit triangles in expansion level n. - Kevin Ryde, Oct 20 2020

Crossrefs

3rd column of A056151. Cf. A028243 (partial sums).
A002783(n) - 1.
a(n) = A293181(n+1,3).

Programs

  • Maple
    A056182:=n->2 * (3^n - 2^n); seq(A056182(n), n=0..30); # Wesley Ivan Hurt, Feb 10 2014
  • Mathematica
    Table[ -((-1 + k)^(1-k+n)*(-1+k)!)+k^(-k+n)*k! /. k -> 3, {n, 3, 36} ]
    Table[2 (3^n - 2^n), {n, 0, 30}] (* Wesley Ivan Hurt, Feb 10 2014 *)
    CoefficientList[Series[2 x/((2 x - 1) (3 x - 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 12 2014 *)
    LinearRecurrence[{5,-6},{0,2},30] (* Harvey P. Dale, Sep 22 2015 *)

Formula

a(n) = 2 * (3^n - 2^n).
a(n) = 5*a(n-1)-6*a(n-2). G.f.: 2*x/((2*x-1)*(3*x-1)). [Colin Barker, Dec 10 2012]
a(n) = A217764(n,3). - Ross La Haye, Mar 27 2013
a(n) = sum_{i=1..n} binomial(n, i) * 2^(n - i + 1). - Wesley Ivan Hurt, Feb 10 2014
a(n) = 2 * A001047(n). - Wesley Ivan Hurt, Feb 10 2014
E.g.f.: 2*exp(2*x)*(exp(x) - 1). - Stefano Spezia, May 18 2024

Extensions

More terms from Wouter Meeussen, Aug 05 2000

A050169 Triangle read by rows: T(n,k) = gcd(C(n,k), C(n,k-1)), n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 5, 10, 5, 1, 1, 3, 5, 5, 3, 1, 1, 7, 7, 35, 7, 7, 1, 1, 4, 28, 14, 14, 28, 4, 1, 1, 9, 12, 42, 126, 42, 12, 9, 1, 1, 5, 15, 30, 42, 42, 30, 15, 5, 1, 1, 11, 55, 165, 66, 462, 66, 165, 55, 11, 1, 1, 6, 22, 55, 99, 132, 132, 99, 55, 22, 6, 1
Offset: 1

Views

Author

Keywords

Comments

Equivalently, table T(n,k) = gcd(n,k)*(n+k-1)!/(n!*k!) read by antidiagonals. - Michael Somos, Jul 19 2002
Apparently, T(n,k)*gcd(C(n+1,k),n+1) = C(n+1,k). - Thomas Anton, Oct 24 2018

Examples

			Triangle starts:
  1;
  1,  1;
  1,  3,  1;
  1,  2,  2,  1;
  1,  5, 10,  5,  1;
  1,  3,  5,  5,  3,  1;
  ...
		

References

  • H. Gupta, On a problem in parity, Indian J. Math., 11 (1969), 157-163. MR0260659

Crossrefs

Programs

  • GAP
    Flat(List([1..12],n->List([1..n],k->Gcd(Binomial(n,k),Binomial(n,k-1))))); # Muniru A Asiru, Oct 24 2018
    
  • Magma
    /* As triangle */ [[Gcd(Binomial(n,k), Binomial(n,k-1)): k in [1..n]]: n in [1.. 15]]; // Vincenzo Librandi, Oct 25 2018
  • Maple
    a:=(n,k)->gcd(binomial(n,k),binomial(n,k-1)): seq(seq(a(n,k),k=1..n),n=1..12); # Muniru A Asiru, Oct 24 2018
  • Mathematica
    Table[GCD@@{Binomial[n,k],Binomial[n,k-1]},{n,20},{k,n}]//Flatten (* Harvey P. Dale, Aug 06 2017 *)
  • PARI
    T(n,k)=if(n<1 || k<1,0,gcd(n,k)*(n+k-1)!/n!/k!)
    
  • PARI
    T(n,k)=if(k<1 || k>n,0,gcd(n+1,k)*binomial(n,k-1)/k) /* Michael Somos, Mar 03 2004 */
    

Formula

a(2n, n) = n-th Catalan number; see A000108.
Also T(n, k) = gcd(C(n, k), C(n+1, k)).

Extensions

Offset set to 1 by R. J. Mathar, Dec 21 2010

A002784 A problem in parity.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 1, 4, 5, 1, 3, 1, 3, 1, 1, 8, 15, 3, 7, 4, 5, 2, 3, 3, 6, 2, 3, 2, 3, 1, 1, 16, 19, 7, 10, 5, 15, 4, 5, 7, 15, 3, 7, 4, 5, 2, 3, 5, 13, 3, 5, 4, 7, 1, 3, 3, 5, 2, 3, 1, 3, 1, 1, 32, 47, 11, 31, 14, 21, 6, 15, 11, 31, 7, 9, 7, 12, 3, 7, 12, 21, 7, 15, 4, 11, 4, 5, 7, 15, 2, 7, 4, 5
Offset: 1

Views

Author

Keywords

References

  • H. Gupta, On a problem in parity, Indian J. Math., 11 (1969), 157-163. MR0260659
  • 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

Programs

  • PARI
    a(n)=if(n<1,0,sum(k=1,n,if(gcd(n,k) == 1,((n+k-1)!/(n!*k!))%2))) /* Michael Somos, Jul 19 2002 */

Extensions

More terms from Michael Somos, Jul 19 2002

A263622 a(n) = (3^(n+1)-2^(n+2)+2*n+1)/4.

Original entry on oeis.org

0, 1, 4, 14, 47, 153, 486, 1516, 4669, 14255, 43268, 130818, 394491, 1187557, 3570850, 10728920, 32219513, 96724059, 290303232, 871171822, 2614039735, 7843167761, 23531600414, 70598995524, 211805375157, 635432902663, 1906332262396, 5719063896026, 17157325905779, 51472246152765
Offset: 0

Views

Author

N. J. A. Sloane, Oct 23 2015

Keywords

Programs

  • PARI
    a(n) = (3^(n+1)-2^(n+2)+2*n+1)/4 \\ Colin Barker, Oct 26 2015
    
  • PARI
    concat(0, Vec(x*(3*x^2-3*x+1)/((x-1)^2*(2*x-1)*(3*x-1)) + O(x^40))) \\ Colin Barker, Oct 26 2015

Formula

From Colin Barker, Oct 26 2015: (Start)
a(n) = 7*a(n-1)-17*a(n-2)+17*a(n-3)-6*a(n-4) for n>3.
G.f.: x*(3*x^2-3*x+1) / ((x-1)^2*(2*x-1)*(3*x-1)).
(End)

Extensions

Typo in last term fixed by Colin Barker, Oct 26 2015
Showing 1-6 of 6 results.