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

A027649 a(n) = 2*(3^n) - 2^n.

Original entry on oeis.org

1, 4, 14, 46, 146, 454, 1394, 4246, 12866, 38854, 117074, 352246, 1058786, 3180454, 9549554, 28665046, 86027906, 258149254, 774578834, 2323998646, 6972520226, 20918609254, 62757924914, 188277969046, 564842295746, 1694543664454, 5083664547794, 15251060752246
Offset: 0

Views

Author

Keywords

Comments

Poly-Bernoulli numbers B_n^(k) with k=-2.
Binomial transform of A007051, if both sequences start at 0. Binomial transform of A000225(n+1). - Paul Barry, Mar 24 2003
Euler expands (1-z)/(1-5z+6z^2) and finds the general term. Section 226 of the Introductio indicates that he could have written down the recursion relation: a(n) = 5 a(n-1)-6 a(n-2). - V. Frederick Rickey (fred-rickey(AT)usma.edu), Feb 10 2006
Let R 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), xRy if x is a subset of y or y is a subset of x. Then a(n) = |R|. - Ross La Haye, Dec 22 2006
With regard to the comment by Ross La Haye: For proper subsets see A056182. - For nonempty subsets see A091344. - For nonempty proper subsets see a(n+1) in A260217. - Manfred Boergens, Aug 02 2023
If x, y are two n-bit binary strings then a(n) gives the number of pairs (x,y) such that XOR(x, y) = ABS(x - y). - Ramasamy Chandramouli, Feb 15 2009
Equals row sums of the triangular version of A038573. - Gary W. Adamson, Jun 04 2009
Inverse binomial transform of A085350. - Paul Curtz, Nov 14 2009
Related to the number of even a's in a nontrivial cycle (should one exist) in the 3x+1 Problem, where a <= floor(log_2(2*(3^n) - 2^n)). The value n correlates to the number of odds in such a nontrivial cycle. See page 1288 of Crandall's paper. Also, this relation gives another proof that the number of odds divided by the number of evens in a nontrivial cycle is bounded by log 2 / log 3 (this observation does not resolve the finite cycles conjecture as the value could be arbitrarily close to this bound). However, the same argument gives that log 2 / log 3 is less than or equal to the number of odds divided by the number of evens in a divergent sequence (should one exist), as log 2 / log 3 is the limit value for a cycle of an arbitrarily large length, where the length is given by the value n. - Jeffrey R. Goodwin, Aug 04 2011
Row sums of Riordan triangle A106516. - Wolfdieter Lang, Jan 09 2015
Number of restricted barred preferential arrangements having 3 bars in which the sections are all restricted sections such that (for fixed sections i and j) section i or section j is empty. - Sithembele Nkonkobe, Oct 12 2015
This is also row 2 of A281891: for n >= 1, when consecutive positive integers are written as a product of primes in nondecreasing order, a factor of 2 or 3 occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 18 2017
Also row sums of A124929. - Omar E. Pol, Jun 15 2017
This is the sum of A318921(n) for n in the range 2^(k+1) to 2^(k+2)-1. See A318921 for proof. - N. J. A. Sloane, Sep 25 2018
a(n) is also the number of acyclic orientations of the complete bipartite graph K_{2,n}. - Vincent Pilaud, Sep 15 2020
a(n-1) is also the number of n-digit numbers whose largest decimal digit is 2. - Stefano Spezia, Nov 15 2023

References

  • Leonhard Euler, Introductio in analysin infinitorum (1748), section 216.

Crossrefs

Row n = 2 of array A099594.
Also occurs as a row, column, diagonal or as row sums in A038573, A085870, A090888, A106516, A217764, A281891.

Programs

  • Haskell
    a027649 n = a027649_list !! n
    a027649_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (1, 1)
    -- Reinhard Zumkeller, Jun 09 2013
    
  • Magma
    [2*(3^n)-2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    a(n, k):= (-1)^n*sum( (-1)^'m'*'m'!*Stirling2(n,'m')/('m'+1)^k,'m'=0..n);
    seq(a(n, -2), n=0..30);
  • Mathematica
    Table[2(3^n)-2^n,{n,0,30}] (* or *) LinearRecurrence[ {5,-6},{1,4},31]  (* Harvey P. Dale, Apr 22 2011 *)
  • PARI
    a(n)=2*(3^n)-2^n \\ Charles R Greathouse IV, Jul 16 2011
    
  • PARI
    Vec((1-x)/((1-2*x)*(1-3*x)) + O(x^50)) \\ Altug Alkan, Oct 12 2015
    
  • SageMath
    [2*(3^n - 2^(n-1)) for n in (0..30)] # G. C. Greubel, Aug 01 2022

Formula

G.f.: (1-x)/((1-2*x)*(1-3*x)).
a(n) = 3*a(n-1) + 2^(n-1), with a(0) = 1.
a(n) = Sum_{k=0..n} binomial(n, k)*(2^(k+1) - 1). - Paul Barry, Mar 24 2003
Partial sums of A053581. - Paul Barry, Jun 26 2003
Main diagonal of array (A085870) defined by T(i, 1) = 2^i - 1, T(1, j) = 2^j - 1, T(i, j) = T(i-1, j) + T(i-1, j-1). - Benoit Cloitre, Aug 05 2003
a(n) = A090888(n, 3). - Ross La Haye, Sep 21 2004
a(n) = Sum_{k=0..n} binomial(n+2, k+1)*Sum_{j=0..floor(k/2)} A001045(k-2j). - Paul Barry, Apr 17 2005
a(n) = Sum_{k=0..n} Sum_{j=0..n} binomial(n,j)*binomial(j+1,k+1). - Paul Barry, Sep 18 2006
a(n) = A166060(n+1)/6. - Philippe Deléham, Oct 21 2009
a(n) = 5*a(n-1) - 6*a(n-2), a(0)=1, a(1)=4. - Harvey P. Dale, Apr 22 2011
a(n) = A217764(n,2). - Ross La Haye, Mar 27 2013
For n>0, a(n) = 3 * a(n-1) + 2^(n-1) = 2 * (a(n-1) + 3^(n-1)). - J. Conrad, Oct 29 2015
for n>0, a(n) = 2 * (1 + 2^(n-2) + Sum_{x=1..n-2} Sum_{k=0..x-1} (binomial(x-1,k)*(2^(k+1) + 2^(n-x+k)))). - J. Conrad, Dec 10 2015
E.g.f.: exp(2*x)*(2*exp(x) - 1). - Stefano Spezia, May 18 2024

Extensions

Better formulas from David W. Wilson and Michael Somos
Incorrect formula removed by Charles R Greathouse IV, Mar 18 2010
Duplications (due to corrections to A numbers) removed by Peter Munn, Jun 15 2017

A217764 Array defined by a(n,k) = floor((k+2)/2)*3^n - floor((k+1)/2)*2^n, read by antidiagonals.

Original entry on oeis.org

1, 3, 0, 9, 1, 1, 27, 5, 4, 0, 81, 19, 14, 2, 1, 243, 65, 46, 10, 5, 0, 729, 211, 146, 38, 19, 3, 1, 2187, 665, 454, 130, 65, 15, 6, 0, 6561, 2059, 1394, 422, 211, 57, 24, 4, 1, 19683, 6305, 4246, 1330, 665, 195, 84, 20, 7, 0, 59049, 19171, 12866, 4118, 2059, 633, 276, 76, 29, 5, 1
Offset: 0

Views

Author

Ross La Haye, Mar 23 2013

Keywords

Comments

Columns 0,1,2,3 respectively correspond to relations R_3, R_4, R_0, R_1 defined in La Haye paper listed below.

Examples

			a(4,4) = 211 because floor((4+2)/2)*3^4 - floor((4+1)/2)*2^4 = 3*3^4 - 2*2^4 = 243 - 32 = 211.
		

Crossrefs

Cf. a(1,k) = A084964(k+2); a(n,0) = A000244(n); a(n,1) = A001047(n); a(n,2) = A027649(n); a(n,3) = A056182(n); a(n,4) = A001047(n+1); a(n,5) = A210448(n); a(n,6) = A166060(n); a(n,7) = A145563(n); a(n,8) = A102485(n).

Formula

a(n,k) = floor((k+2)/2)*3^n - floor((k+1)/2)*2^n. a(n,k) = 5*a(n-1,k) - 6*a(n-2,k); a(0,k) = floor((k+2)/2) - floor((k+1)/2), a(1,k) = floor((k+2)/2)*3 - floor((k+1)/2)*2.

A180032 Eight white queens and one red queen on a 3 X 3 chessboard. G.f.: (1+x)/(1-5*x-7*x^2).

Original entry on oeis.org

1, 6, 37, 227, 1394, 8559, 52553, 322678, 1981261, 12165051, 74694082, 458625767, 2815987409, 17290317414, 106163498933, 651849716563, 4002393075346, 24574913392671, 150891318490777, 926480986202582, 5688644160448349
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner or side square (m = 1, 3, 7, 9; 2, 4, 6, 8) on a 3 X 3 chessboard. This fairy chess piece behaves like a white chess queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen.
On a 3 X 3 chessboard there are 2^9 = 512 ways to explode with fury on the central square (we assume here that a red queen might behave like a white queen). The red queen is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program. For the corner and side squares the 512 red queens lead to 17 red queen sequences, see the cross-references for the complete set.
The sequence above corresponds to 8 red queen vectors, i.e., A[5] vectors, with decimal values 239, 367, 431, 463, 487, 491, 493 and 494. The central square leads for these vectors to A152240.
This sequence belongs to a family of sequences with g.f. (1+x)/(1 - 5*x - k*x^2). The members of this family that are red queen sequences are A180030 (k=8), A180032 (k=7; this sequence), A000400 (k=6), A180033 (k=5), A126501 (k=4), A180035 (k=3), A180037 (k=2) A015449 (k=1) and A003948 (k=0). Other members of this family are A030221 (k=-1), A109114 (k=-3), A020989 (k=-4), A166060 (k=-6).
Inverse binomial transform of A054413.

Crossrefs

Cf. A180028 (Central square).
Cf. Red queen sequences corner and side squares [decimal value A[5]]: A090018 [511], A135030 [255], A180030 [495], A005668 [127], A180032 [239], A000400 [63], A180033 [47], A001109 [31], A126501 [15], A154244 [23], A180035 [7], A138395 [19], A180037 [3], A084326 [17], A015449 [1], A003463 [16], A003948 [0].

Programs

  • Magma
    I:=[1,6]; [n le 2 select I[n] else 5*Self(n-1)+7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=20; m:=1; A[5]:= [1,1,1,1,0,1,1,1,0]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    LinearRecurrence[{5,7},{1,6},40] (* Vincenzo Librandi, Nov 15 2011 *)
    CoefficientList[Series[(1+x)/(1-5x-7x^2),{x,0,30}],x] (* Harvey P. Dale, Apr 04 2024 *)

Formula

G.f.: (1+x)/(1 - 5*x - 7*x^2).
a(n) = 5*a(n-1) + 7*a(n-2) with a(0) = 1 and a(1) = 6.
a(n) = ((7+9*A)*A^(-n-1) + (7+9*B)*B^(-n-1))/53 with A = (-5+sqrt(53))/14 and B = (-5-sqrt(53))/14.

A227075 A triangle formed like Pascal's triangle, but with 3^n on the borders instead of 1.

Original entry on oeis.org

1, 3, 3, 9, 6, 9, 27, 15, 15, 27, 81, 42, 30, 42, 81, 243, 123, 72, 72, 123, 243, 729, 366, 195, 144, 195, 366, 729, 2187, 1095, 561, 339, 339, 561, 1095, 2187, 6561, 3282, 1656, 900, 678, 900, 1656, 3282, 6561, 19683, 9843, 4938, 2556, 1578, 1578, 2556, 4938
Offset: 0

Views

Author

T. D. Noe, Aug 01 2013

Keywords

Comments

All rows except the zeroth are divisible by 3. Is there a closed-form formula for these numbers, like for binomial coefficients?
Let b=3 and T(n,k) = A(n-k,k) be the associated reading of the symmetric array A by antidiagonals, then A(n,k) = sum_{r=1..n} b^r*A178300(n-r,k) + sum_{c=1..k} b^c*A178300(k-c,n). Similarly with b=4 and b=5 for A227074 and A227076. - R. J. Mathar, Aug 10 2013

Examples

			Triangle:
1,
3, 3,
9, 6, 9,
27, 15, 15, 27,
81, 42, 30, 42, 81,
243, 123, 72, 72, 123, 243,
729, 366, 195, 144, 195, 366, 729,
2187, 1095, 561, 339, 339, 561, 1095, 2187,
6561, 3282, 1656, 900, 678, 900, 1656, 3282, 6561
		

Crossrefs

Cf. A007318 (Pascal's triangle), A228053 ((-1)^n on the borders).
Cf. A051601 (n on the borders), A137688 (2^n on borders).
Cf. A166060 (row sums: 4*3^n - 3*2^n), A227074 (4^n edges), A227076 (5^n edges).

Programs

  • Mathematica
    t = {}; Do[r = {}; Do[If[k == 0 || k == n, m = 3^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 10}]; t = Flatten[t]

A082560 a(1)=1, a(n)=2*a(n-1) if n is odd, or a(n)=a(n/2)+1 if n is even.

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 10, 4, 8, 7, 14, 6, 12, 11, 22, 5, 10, 9, 18, 8, 16, 15, 30, 7, 14, 13, 26, 12, 24, 23, 46, 6, 12, 11, 22, 10, 20, 19, 38, 9, 18, 17, 34, 16, 32, 31, 62, 8, 16, 15, 30, 14, 28, 27, 54, 13, 26, 25, 50, 24, 48, 47, 94, 7, 14, 13, 26, 12, 24, 23, 46, 11, 22, 21, 42, 20
Offset: 1

Views

Author

Benoit Cloitre, May 04 2003

Keywords

Comments

b(1)=1, b(n)=2*b(n/2) if n is even, or b(n)=b(n-1)+1 if n is odd produces the sequence of natural numbers.
Seen as a triangle read by rows: T(1,1) = 1; T(n+1,2*k-1) = T(n,k)+1 and T(n+1,2*k) = 2*T(n,k)+2, 1 <= k <= 2^n. - Reinhard Zumkeller, May 13 2015

Examples

			.  1:                                 1
.  2:                 2                                4
.  3:        3               6                5                10
.  4:    4       8       7       14       6       12       11       22
.  5:  5  10   9  18   8  16  15   30   7  14  13   26  12   24  23   46
		

Crossrefs

Cf. A000079 (row lengths), A033484 (right edges), A166060 (row sums), A232642 (duplicates removed).

Programs

  • Haskell
    a082560 n k = a082560_tabf !! (n-1) !! (k-1)
    a082560_row n = a082560_tabf !! (n-1)
    a082560_tabf = iterate (concatMap (\x -> [x + 1, 2 * x + 2])) [1]
    a082560_list = concat a082560_tabf
    -- Reinhard Zumkeller, May 13 2015
  • PARI
    a(n)=if(n<2,1,if(n%2,2*a(n-1),1+a(n/2)))
    

Formula

if n is in A010737 : a(n)=n-1

A180031 Number of n-move paths on a 3 X 3 chessboard of a queen starting or ending in the central square.

Original entry on oeis.org

1, 8, 48, 304, 1904, 11952, 74992, 470576, 2952816, 18528688, 116265968, 729559344, 4577924464, 28726097072, 180253881072, 1131078181936, 7097421958256, 44535735246768, 279458051899888, 1753576141473584
Offset: 0

Views

Author

Johannes W. Meijer, Aug 09 2010

Keywords

Comments

The a(n) represent the number of n-move paths of a chess queen starting or ending in the central square (m = 5) on a 3 X 3 chessboard. The other squares lead to A180030.
To determine the a(n) we can either sum the components of the column vector A^n[k,m], with A the adjacency matrix of the queen's graph, or we can sum the components of the row vector A^n[m,k], see the Maple program.
Closely related with this sequence are the red queen sequences, see A180028 and A180032.
This sequence belongs to a family of sequences with g.f. (1+k*x)/(1 - 5*x - (k+5)*x^2). The members of this family that are red queen sequences are A180031 (k=3; this sequence), A152240 (k=2), A000400 (k=1), A057088 (k=0), A122690 (k=-1), A180036 (k=-2), A180038 (k=-3), A015449 (k=-4) and A000007 (k=-5). Other members of this family are A030221 (k= -6), 3*A109114 (k=-8), 4*A020989 (k=-9), 6*A166060 (k=-11).

Programs

  • Magma
    I:=[1,8]; [n le 2 select I[n] else 5*Self(n-1)+8*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
  • Maple
    with(LinearAlgebra): nmax:=19; m:=5; A[5]:= [1,1,1,1,0,1,1,1,1]: A:=Matrix([[0,1,1,1,1,0,1,0,1], [1,0,1,1,1,1,0,1,0], [1,1,0,0,1,1,1,0,1], [1,1,0,0,1,1,1,1,0], A[5], [0,1,1,1,1,0,0,1,1], [1,0,1,1,1,0,0,1,1], [0,1,0,1,1,1,1,0,1], [1,0,1,0,1,1,1,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    LinearRecurrence[{5,8},{1,8},50] (* Vincenzo Librandi, Nov 15 2011 *)

Formula

G.f.: (1+3*x)/(1 - 5*x - 8*x^2).
a(n) = 5*a(n-1) + 8*a(n-2) with a(0) = 1 and a(1) = 8.
a(n) = ((A+11)*A^(-n-1) + (B+11)*B^(-n-1))/57 with A = (-5+sqrt(57))/16 and B = (-5-sqrt(57))/16.

A257956 Row sums of A232642, when seen as a triangle read by rows.

Original entry on oeis.org

1, 6, 24, 74, 220, 626, 1754, 4860, 13390, 36762, 100728, 275666, 753898, 2060924, 5632550, 15391650, 42056008, 114907626, 313947186, 857741852, 2343430222
Offset: 1

Views

Author

Reinhard Zumkeller, May 14 2015

Keywords

Comments

a(n) <= A166060(n).

Crossrefs

Programs

  • Haskell
    a257956 = sum . a232642_row

Formula

Conjectures from Colin Barker, May 29 2015: (Start)
a(n) = 3*a(n-1)+a(n-2)-4*a(n-3)-2*a(n-4) for n>4.
G.f.: x*(5*x^2+3*x+1) / ((x^2+x-1)*(2*x^2+2*x-1)).
(End)

A166065 Triangle, read by rows, given by [0,1,1,0,0,0,0,0,0,0,...] DELTA [2,-1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 0, 2, 0, 2, 2, 0, 4, 2, 2, 0, 8, 4, 2, 2, 0, 16, 8, 4, 2, 2, 0, 32, 16, 8, 4, 2, 2, 0, 64, 32, 16, 8, 4, 2, 2, 0, 128, 64, 32, 16, 8, 4, 2, 2, 0, 256, 128, 64, 32, 16, 8, 4, 2, 2, 0, 512, 256, 128, 64, 32, 16, 8, 4, 2, 2, 0, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 2, 0, 2048, 1024
Offset: 0

Views

Author

Philippe Deléham, Oct 05 2009

Keywords

Examples

			Triangle begins :
1,
0,2,
0,2,2,
0,4,2,2,
0,8,4,2,2,
0,16,8,4,2,2,
0,32,16,8,4,2,2,
0,64,32,16,8,4,2,2,
0,128,64,32,16,8,4,2,2,
0,256,128,64,32,16,8,4,2,2,
0,512,256,128,64,32,16,8,4,2,2,
		

Formula

Sum_{k, 0<=k<=n} T(n,k)*x^k = (-1)^n*A084247(n), A000007(n), A000079(n), A001787(n+1), A166060(n), A165665(n), A083585(n) for x= -1, 0, 1, 2, 3, 4, 5 respectively. Sum_{k, 0<=k<=n} T(n,k)*x^(n-k) = A040000(n), A000079(n), A095121(n), A047851(n), A047853(n), A047855(n) for x = 0, 1, 2, 3, 4, 5 respectively.
G.f.: (1-2*x+x*y)/((-1+2*x)*(x*y-1)). - R. J. Mathar, Aug 11 2015
Showing 1-8 of 8 results.