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 21 results. Next

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

Original entry on oeis.org

1, 3, 7, 16, 35, 75, 158, 329, 679, 1392, 2839, 5767, 11678, 23589, 47555, 95720, 192427, 386451, 775486, 1555153, 3117071, 6245088, 12507887, 25044431, 50135230, 100345485, 200812363, 401821144, 803960099, 1608434427, 3217700894, 6436748057
Offset: 0

Views

Author

Creighton Dement, Feb 24 2005

Keywords

Comments

A floretion-generated sequence relating to Fibonacci numbers and powers of 2. The sequence results from a particular transform of the sequence A000079*(-1)^n (powers of 2).
Floretion Algebra Multiplication Program, FAMP Code: 1jesforseq[ ( 5'i + .5i' + .5'ii' + .5e)*( + .5j' + .5'kk' + .5'ki' + .5e ) ], 1vesforseq = A000079(n+1)*(-1)^(n+1), ForType: 1A. Identity used: jesfor = jesrightfor + jesleftfor

Crossrefs

Programs

  • Magma
    [3*2^n-Fibonacci(n+3): n in [0..40]]; // Vincenzo Librandi, Aug 18 2017
    
  • Maple
    with (combinat):a[0]:=0:a[1]:=1:for n from 2 to 50 do a[n]:=fibonacci(n-1)+2*a[n-1] od: seq(a[n], n=1..26); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    LinearRecurrence[{3, -1, -2}, {1, 3, 7}, 80] (* Vincenzo Librandi, Aug 18 2017 *)
    CoefficientList[Series[(1-x)(1+x)/((2x-1)(x^2+x-1)),{x,0,40}],x] (* Harvey P. Dale, Oct 12 2024 *)
    A104004[n_]:= 3*2^n -Fibonacci[n+3]; (* G. C. Greubel, Jun 05 2025 *)
  • SageMath
    def A104004(n): return 3*2**n - fibonacci(n+3) # G. C. Greubel, Jun 05 2025

Formula

4*a(n) = A008466(n+3) + A027973(n) (FAMP result).
Suggestions made by Superseeker: (Start)
a(n+2) - a(n+1) - a(n) = A042950(n+1).
Coefficients of g.f.*(1-x)/(1+x) match A099036.
Coefficients of g.f./(1+x) match A027934.
Coefficients of g.f./(1-x^2) match A008466. (End)
a(n) = A101220(3, 2, n+1) - A101220(3, 2, n). - Ross La Haye, Aug 05 2005
a(n) = 3*2^n - Fibonacci(n+3) = A221719(n) + 1. - Ralf Stephan, May 20 2007, Hugo Pfoertner, Mar 06 2024
a(n) = (3*2^n - (2^(-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5)))) / sqrt(5)). - Colin Barker, Aug 18 2017
From G. C. Greubel, Jun 05 2025: (Start)
Sum_{k=0..n} A022958(k+1)*a(n-k) = A001911(n+1).
Sum_{k=0..n} (-1)^k*A016777(k)*a(n-k) = A078024(n).
E.g.f.: 3*exp(2*x) - (2/sqrt(5))*exp(x/2)*( 2*sinh(sqrt(5)*x/2) + sqrt(5)*cosh(sqrt(5)*x/2) ). (End)

A175660 Eight bishops and one elephant on a 3 X 3 chessboard. a(n) = 2^(n+2) - 3*F(n+2).

Original entry on oeis.org

1, 2, 7, 17, 40, 89, 193, 410, 859, 1781, 3664, 7493, 15253, 30938, 62575, 126281, 254392, 511745, 1028281, 2064314, 4141171, 8302637, 16638112, 33329357, 66744685, 133628474, 267482023, 535328225, 1071245704, 2143444841
Offset: 0

Views

Author

Johannes W. Meijer, Aug 06 2010, Aug 10 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in a given corner square (m = 1, 3, 7, 9) on a 3 X 3 chessboard. This fairy chess piece behaves like a bishop on the eight side and corner squares but on the central square the bishop turns into a raging elephant, see A175654.
The sequence above corresponds to four A[5] vectors with decimal values 171, 174, 234 and 426. These vectors lead for the side squares to A000079 and for the central square to A175661 (a(n) = 2^(n+2) - 3*F(n+1)).

Crossrefs

Cf. A008466 (2^n-F(n+2)), A027934 (2^n-F(n+1)), A027974 (2^(n+3)-F(n+5)-F(n+3)), A074878 (3*2^n-2*F(n+2)), A142585 ((-1)^(n+1)*(2^(n-1)-F(n+1)-F(n-1))), A175661 (2^(n+2)-3*F(n+1)), A179610 (convolution of (-4)^n and F(n+1)).

Programs

  • Maple
    nmax:=29; m:=1; A[5]:= [0,1,0,1,0,1,0,1,1]: A:=Matrix([[0,0,0,0,1,0,0,0,1], [0,0,0,1,0,1,0,0,0], [0,0,0,0,1,0,1,0,0], [0,1,0,0,0,0,0,1,0], A[5], [0,1,0,0,0,0,0,1,0], [0,0,1,0,1,0,0,0,0], [0,0,0,1,0,1,0,0,0], [1,0,0,0,1,0,0,0,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
    Table[2^(n+2)-3Fibonacci[n+2],{n,0,30}] (* or *) LinearRecurrence[ {3,-1,-2},{1,2,7},30] (* Harvey P. Dale, Dec 28 2012 *)

Formula

G.f.: (1 - x + 2*x^2)/(1 - 3*x + x^2 + 2*x^3).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3) with a(0)=1, a(1)=2 and a(2)=7.
a(n) = 2^(n+2) - 3*F(n+2) with F(n)=A000045(n).

A104730 Triangle read by rows: T(n,k)=C(n+1,k)-C(k,n-k+1).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 5, 1, 1, 5, 10, 7, 1, 1, 6, 15, 19, 9, 1, 1, 7, 21, 35, 31, 11, 1, 1, 8, 28, 56, 69, 46, 13, 1, 1, 9, 36, 84, 126, 121, 64, 15, 1, 1, 10, 45, 120, 210, 251, 195, 85, 17, 1, 1, 11, 55, 165, 330, 462, 456, 295, 109, 19, 1, 1, 12, 66
Offset: 1

Views

Author

Gary W. Adamson, Mar 20 2005

Keywords

Comments

Row sums are A027934: 1, 2, 5, 11, 24, 51, 107... Diagonal sums are A131298.

Examples

			The first few rows of the triangle are:
1;
1, 1;
1, 3, 1;
1, 4, 5, 1;
1, 5, 10, 7, 1;
1, 6, 15, 19, 9, 1;
1, 7, 31, 35, 31, 11, 1;
...
		

Crossrefs

Programs

  • Mathematica
    Table[Binomial[n+1,k]-Binomial[k,n-k+1],{n,0,20},{k,0,n}]//Flatten (* Harvey P. Dale, Jan 16 2024 *)

Formula

Perform the operation A - B; then extract the triangle after deleting all zeros. P = infinite lower triangular Pascal's triangle matrix (A007318); B = A026729, as an infinite lower triangular matrix: [1; 0, 1;, 0, 1, 1; 0, 0, 2, 1; 0, 0, 1, 3, 1;...].

Extensions

Better definition from Paul Barry, Jun 26 2007
More terms from Harvey P. Dale, Jan 16 2024

A109433 Triangle read by rows: T(n,m) = number of binary numbers n+1 digits long which have m 1's as a substring.

Original entry on oeis.org

1, 2, 1, 4, 2, 1, 8, 5, 2, 1, 16, 11, 5, 2, 1, 32, 24, 12, 5, 2, 1, 64, 51, 27, 12, 5, 2, 1, 128, 107, 60, 28, 12, 5, 2, 1, 256, 222, 131, 63, 28, 12, 5, 2, 1, 512, 457, 282, 140, 64, 28, 12, 5, 2, 1, 1024, 935, 601, 307, 143, 64, 28, 12, 5, 2, 1, 2048, 1904, 1270, 666, 316, 144
Offset: 0

Views

Author

Robert G. Wilson v, Jun 27 2005

Keywords

Examples

			T(4,2)=11 because of the sixteen binary digits which are 5 long, {10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111}, 11 have "11" as a substring.
Triangle begins:
n\m
0 1 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0 0 0 0 0
2 4 2 1 0 0 0 0 0 0 0
3 8 5 2 1 0 0 0 0 0 0
4 16 11 5 2 1 0 0 0 0 0
5 32 24 12 5 2 1 0 0 0 0
		

Crossrefs

First column = A000079 = Powers of 2, the second column = A027934 = number of compositions of n with at least one even part and the last column = A045623 = number of 1's in all compositions of n+1.

Programs

  • Mathematica
    T[n_, m_] := Length[ Select[ StringPosition[ #, ToString[(10^m - 1)/9]] & /@ Table[ ToString[ FromDigits[ IntegerDigits[i, 2]]], {i, 2^n, 2^(n + 1) - 1}], # != {} &]]; Flatten[ Table[ T[n, m], {n, 0, 11}, {m, n + 1}]]

A131238 Triangle read by rows: T(n,k) = 2*binomial(n,k) - binomial(floor((n+k)/2), k) (0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 5, 1, 1, 6, 9, 7, 1, 1, 7, 17, 16, 9, 1, 1, 9, 24, 36, 25, 11, 1, 1, 10, 36, 60, 65, 36, 13, 1, 1, 12, 46, 102, 125, 106, 49, 15, 1, 1, 13, 62, 148, 237, 231, 161, 64, 17, 1, 1, 15, 75, 220, 385, 483, 392, 232, 81, 19, 1, 1, 16, 95, 295, 625, 868, 896, 624, 321, 100, 21, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 21 2007

Keywords

Comments

Row sums = A027934: (1, 2, 5, 11, 24, 51, 107, ...).

Examples

			First few rows of the triangle:
  1;
  1,  1;
  1,  3,  1;
  1,  4,  5,  1;
  1,  6,  9,  7,  1;
  1,  7, 17, 16,  9,  1;
  1,  9, 24, 36, 25, 11,  1;
  1, 10, 36, 60, 65, 36, 13, 1;
  ...
		

Crossrefs

Programs

  • GAP
    B:=Binomial;; Flat(List([0..12], n-> List([0..n], k-> 2*B(n,k) - B(Int((n+k)/2), k) ))); # G. C. Greubel, Jul 12 2019
  • Magma
    B:=Binomial; [2*B(n,k) - B(Floor((n+k)/2), k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2019
    
  • Maple
    T := proc (n, k) options operator, arrow; 2*binomial(n, k)-binomial(floor((1/2)*n+(1/2)*k), k) end proc: for n from 0 to 9 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jul 09 2007
  • Mathematica
    With[{B = Binomial}, Table[2*B[n, k] - B[Floor[(n+k)/2], k], {n,0,12}, {k,0,n}]]//Flatten (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    b=binomial; T(n,k) = 2*b(n,k) - b((n+k)\2, k);
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jul 12 2019
    
  • Sage
    b=binomial; [[2*b(n,k) - b(floor((n+k)/2), k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 12 2019
    

Formula

T(n,k) = 2*A007318(n,k) - A046854(n,k) as infinite lower triangular matrices, where A007318 = Pascal's triangle and A046854 = Pascal's triangle with repeats, by columns.

Extensions

More terms added by G. C. Greubel, Jul 12 2019

A104487 a(n+3) = 6a(n+2) - 10a(n+1) + 3a(n); a(0) = 1, a(1) = 4, a(2) = 14.

Original entry on oeis.org

1, 4, 14, 47, 154, 496, 1577, 4964, 15502, 48103, 148490, 456416, 1397905, 4268740, 13002638, 39522143, 119912698, 363262672, 1099015481, 3321204260, 10026858766, 30246156439, 91171963754, 274650794432, 826923598369
Offset: 0

Views

Author

Creighton Dement, Apr 19 2005

Keywords

Comments

Binomial transform of A104004.
If another a(0)=0 is added in front, also the binomial transform of A027934.

Programs

  • Magma
    [3^(n+1) - Fibonacci(2*n+3): n in [0..30]]; // Vincenzo Librandi, Apr 21 2011
  • Mathematica
    LinearRecurrence[{6,-10,3},{1,4,14},30] (* Harvey P. Dale, May 07 2017 *)

Formula

G.f.: (2*x-1)/((3*x-1)*(x^2-3*x+1)). Define c = (3+sqrt(5))/2 and d = (3-sqrt(5))/2. Then a(n) = 3^(n+1) - ((2*sqrt(5)/5)+1)*c^n + ((2*sqrt(5)/5)-1)*d^n = 3^(n+1) - Fibonacci(2n+3). - Ralf Stephan, May 20 2007

Extensions

Comment concerning the binomial transforms corrected by R. J. Mathar, Oct 26 2009

A119587 2^n + 1 - 2*Fibonacci(n+1).

Original entry on oeis.org

0, 1, 1, 3, 7, 17, 39, 87, 189, 403, 847, 1761, 3631, 7439, 15165, 30795, 62343, 125905, 253783, 510759, 1026685, 2061731, 4136991, 8295873, 16627167, 33311647, 66716029, 133582107, 267406999, 535206833, 1071049287
Offset: 0

Views

Author

Ross La Haye, May 31 2006, Jun 27 2007

Keywords

Crossrefs

Programs

  • Mathematica
    Table[2^n + 1 - 2 Fibonacci[n + 1], {n, 0, 30}]

Formula

a(n) = 2^n + 1 - 2*Fibonacci(n+1) = 2^n + 1 + Fibonacci(n) - Fibonacci(n+3) = 2^n + 1 - Fibonacci(n) - Lucas(n). a(n) = 2(2^(n-1) - Fibonacci(n+1)) + 1, for n > 0. a(n) = A000051(n) - A006355(n+2) = A000051(n) - A000045(n) - A000032(n). a(n) = A101220(2,2,n-1) - A101220(1,1,n-3), for n > 2. a(n) = A008466(n) - A000071(n-1), for n > 0. a(n) = 2*A008466(n-1) + 1, for n > 0.
a(n) = 2*A101220(2,2,n-2) + 1, for n > 1. a(n) = Sum[2^(n-k)Fibonacci(k) - Fibonacci(k-2),{k,0,n}] = antidiagonal sums of A118654. a(n+1) - a(n) = 2(2^(n-1) - Fibonacci(n)), for n > 0. a(n+1) - a(n) = 2*A027934(n-2), for n > 1. a(n+1) - a(n) = 2*A101220(1,2,n-1), for n > 0. a(0) = 0; a(1) = 1; a(n) = a(n-1) + a(n-2) + 2^(n-2) - 1, for n > 1. a(0) = 0; a(1) = 1; a(2) = 1; a(3) = 3; a(n) = 4*a(n-1) - 4*a(n-2) - a(n-3) + 2*a(n-4), for n > 3.
O.g.f. = x(1-3x+3x^2)/((1-x)(1-2x)(1-x-x^2)).

A131767 2*A007318 - A065941.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 4, 1, 1, 7, 9, 6, 1, 1, 9, 16, 17, 7, 1, 1, 11, 25, 36, 24, 9, 1, 1, 13, 36, 65, 60, 36, 10, 1, 1, 15, 49, 106, 125, 102, 46, 12, 1, 1, 17, 64, 161, 231, 237, 148, 62, 13, 1
Offset: 0

Views

Author

Gary W. Adamson, Jul 13 2007

Keywords

Examples

			First few rows of the triangle are:
1;
1, 1;
1, 3, 1;
1, 5, 4, 1;
1, 7, 9, 6, 1;
1, 9, 16, 17, 7, 1;
1, 11, 25, 36, 24, 9, 1;
...
		

Crossrefs

Cf. A007318, A065941, A027934 (row sums).

Formula

2*A007318 - A065941 as infinite lower triangular matrices.

A103316 Riordan array (1/(1+2x), x/(1+x)).

Original entry on oeis.org

1, -2, 1, 4, -3, 1, -8, 7, -4, 1, 16, -15, 11, -5, 1, -32, 31, -26, 16, -6, 1, 64, -63, 57, -42, 22, -7, 1, -128, 127, -120, 99, -64, 29, -8, 1, 256, -255, 247, -219, 163, -93, 37, -9, 1, -512, 511, -502, 466, -382, 256, -130, 46, -10, 1, 1024, -1023, 1013, -968, 848, -638, 386, -176, 56, -11, 1, -2048, 2047, -2036, 1981
Offset: 0

Views

Author

Paul Barry, Jan 30 2005

Keywords

Comments

Inverse array of A029653. Signed version of A055248. Row sums are (-1)^n*A011782(n), with g.f. (1+x)/(1+2x). Diagonal sums are (-1)^n*A027934(n), with g.f. (1+x)/((1+2x)(1+x-x^2)).

Examples

			Rows start {1}, {-2,1}, {4,-3,1}, {-8,7,-4,1},...
		

Formula

Number triangle T(n, k)=(-1)^(n-k)*sum{j=0..n, binomial(n, k+j)}
T(n,k)=T(n-1,k-1)-3*T(n-1,k)+2*T(n-2,k-1)-2*T(n-2,k), T(0,0)=1, T(1,0)=-2, T(1,1)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Jan 12 2014

A213945 Triangle by rows, generated from aerated sequences of 1's.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 11, 1, 1, 1, 1, 4, 24, 1, 1, 1, 1, 2, 7, 51, 1, 1, 1, 1, 1, 4, 12, 107, 1, 1, 1, 1, 1, 2, 6, 21, 222, 1, 1, 1, 1, 1, 1, 4, 9, 36, 457, 1, 1, 1, 1, 1, 1, 2, 6, 14, 61, 935, 1, 1, 1, 1, 1, 1, 1, 4, 8, 22, 103, 1904, 1, 1, 1, 1, 1, 1, 1, 2, 6, 11, 34, 173, 3863
Offset: 0

Views

Author

Gary W. Adamson, Jun 25 2012

Keywords

Comments

Row sums are powers of 2. The right border is a variant of A027934 in which the 0 of the latter is replaced by a 1.

Examples

			First few rows of the array are:
1, 2, 4, 8, 16, 32, 64, 128, 256,...
1, 1, 2, 3,..5,..8,.13,..21,..34,...
1, 1, 1, 2,..3,..4,..6,...9,..13,...
1, 1, 1, 1,  2,..3,..4,...5,...7,...
... Then, take finite differences from the top -> down, getting the triangle:
1;
1, 1;
1, 1, 2;
1, 1, 1, 5;
1, 1, 1, 2, 11;
1, 1, 1, 1, 4, 24;
1, 1, 1, 1, 2, 7, 51;
1, 1, 1, 1, 1, 4, 12, 107;
1, 1, 1, 1, 1, 2, 6, 21, 222;
1, 1, 1, 1, 1, 1, 4, 9, 36, 457;
...
		

Crossrefs

Cf. A027934.

Formula

Form an array in which rows are INVERT transforms of sequences of 1's starting (1,1,1,...) with row 0; then the INVERT transforms of 1's aerated with one zero (row 1); with two zeros, (row 2); three zeros, (row 3); and so on.
Previous Showing 11-20 of 21 results. Next