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-10 of 22 results. Next

A182780 Twice A024537.

Original entry on oeis.org

2, 4, 8, 18, 42, 100, 240, 578, 1394, 3364, 8120, 19602, 47322, 114244, 275808, 665858, 1607522, 3880900, 9369320, 22619538, 54608394, 131836324, 318281040, 768398402, 1855077842, 4478554084, 10812186008, 26102926098, 63018038202, 152139002500, 367296043200, 886731088898, 2140758220994, 5168247530884
Offset: 0

Views

Author

N. J. A. Sloane, Dec 23 2012

Keywords

Comments

a(n) = A078057(n) + 1 (see A288213). - Michel Dekking, Sep 29 2019

Crossrefs

Cf. A024537.

Programs

  • Magma
    a:=[2,4,8]; [n le 3 select a[n] else 3*Self(n-1) - Self(n-2) - Self(n-3):n in [1..35]]; // Marius A. Burtea, Sep 29 2019
  • PARI
    Vec(2*(1 - x - x^2) / ((1 - x)*(1 - 2*x - x^2)) + O(x^40)) \\ Colin Barker, May 26 2018
    

Formula

From Colin Barker, May 26 2018: (Start)
G.f.: 2*(1 - x - x^2) / ((1 - x)*(1 - 2*x - x^2)).
a(n) = (2 + (1-sqrt(2))^(1+n) + (1+sqrt(2))^(1+n)) / 2.
a(n) = 3*a(n-1) - a(n-2) - a(n-3) for n>2.
(End)

A018905 Duplicate of A024537.

Original entry on oeis.org

2, 4, 9, 21, 50, 120, 289, 697, 1682, 4060, 9801, 23661, 57122, 137904, 332929
Offset: 0

Views

Author

Keywords

A158780 a(2n) = A131577(n), a(2n+1) = A011782(n).

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 4, 4, 8, 8, 16, 16, 32, 32, 64, 64, 128, 128, 256, 256, 512, 512, 1024, 1024, 2048, 2048, 4096, 4096, 8192, 8192, 16384, 16384, 32768, 32768, 65536, 65536, 131072, 131072, 262144, 262144, 524288, 524288, 1048576, 1048576, 2097152, 2097152, 4194304
Offset: 0

Views

Author

Paul Curtz, Mar 26 2009

Keywords

Comments

This construction combines the 2 basic sequences which equal their first differences in the same way as A138635 does for sequences which equal their 3rd differences and A137171 does for sequences which equal their fourth differences.
Essentially the same as A016116, A060546, and A131572. - R. J. Mathar, Apr 08 2009
Dropping a(0), this is the inverse binomial transform of A024537. - R. J. Mathar, Apr 08 2009

Crossrefs

The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Magma
    [0,1] cat [2^Floor((n-2)/2): n in [2..50]]; // G. C. Greubel, Apr 19 2023
    
  • Mathematica
    Table[(2^Floor[n/2] +Boole[n==1] -Boole[n==0])/2, {n,0,50}] (* or *) LinearRecurrence[{0,2}, {0,1,1,1}, 51] (* G. C. Greubel, Apr 19 2023 *)
  • PARI
    a(n)=if(n>3,([0,1; 2,0]^n*[1;1])[1,1]/2,n>0) \\ Charles R Greathouse IV, Oct 18 2022
    
  • SageMath
    def A158780(n): return (2^(n//2) + int(n==1) - int(n==0))/2
    [A158780(n) for n in range(51)] # G. C. Greubel, Apr 19 2023

Formula

a(2n) + a(2n+1) = A000079(n).
G.f.: x*(1+x-x^2)/(1-2*x^2). - R. J. Mathar, Apr 08 2009
a(n) = (1/2)*(2^floor(n/2) + [n=1] - [n=0]). - G. C. Greubel, Apr 19 2023
E.g.f.: (2*cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x) + 2*x - 2)/4. - Stefano Spezia, May 13 2023

Extensions

Edited by R. J. Mathar, Apr 08 2009

A214992 Power ceiling-floor sequence of (golden ratio)^4.

Original entry on oeis.org

7, 47, 323, 2213, 15169, 103969, 712615, 4884335, 33477731, 229459781, 1572740737, 10779725377, 73885336903, 506417632943, 3471038093699, 23790849022949, 163064905066945, 1117663486445665, 7660579500052711
Offset: 0

Views

Author

Clark Kimberling, Nov 08 2012, Jan 24 2013

Keywords

Comments

Let f = floor and c = ceiling. For x > 1, define four sequences as functions of x, as follows:
p1(0) = f(x), p1(n) = f(x*p1(n-1));
p2(0) = f(x), p2(n) = c(x*p2(n-1)) if n is odd and p2(n) = f(x*p1(n-1)) if n is even;
p3(0) = c(x), p3(n) = f(x*p3(n-1)) if n is odd and p3(n) = c(x*p3(n-1)) if n is even;
p4(0) = c(x), p4(n) = c(x*p4(n-1)).
The present sequence is given by a(n) = p3(n).
Following the terminology at A214986, call the four sequences power floor, power floor-ceiling, power ceiling-floor, and power ceiling sequences. In the table below, a sequence is identified with an A-numbered sequence if they appear to agree except possibly for initial terms. Notation: S(t)=sqrt(t), r = (1+S(5))/2 = golden ratio, and Limit = limit of p3(n)/p2(n).
x ......p1..... p2..... p3..... p4.......Limit
r^2.....A001519 A001654 A061646 A001906..-1+S(5)
r^3.....A024551 A001076 A015448 A049652..-1+S(5)
r^4.....A049685 A157335 A214992 A004187..-19+9*S(5)
r^5.....A214993 A049666 A015457 A214994...(-9+5*S(5))/2
r^6.....A007805 A156085 A214995 A049660..-151+68*S(5)
2+S(2)..A007052 A214996 A214997 A007070..(1+S(2))/2
1+S(3)..A057960 A002605 A028859 A077846..(1+S(3))/2
2+S(3)..A001835 A109437 A214998 A001353..-4+3*S(3)
S(5)....A214999 A215091 A218982 A218983..1.26879683...
2+S(5)..A024551 A001076 A015448 A049652..-1+S(5)
2+S(6)..A218984 A090017 A123347 A218985..S(3/2)
2+S(7)..A218986 A015530 A126473 A218987..(1+S(7))/3
2+S(8)..A218988 A057087 A086347 A218989..(1+S(2))/2
3+S(8)..A001653 A084158 A218990 A001109..-13+10*S(2)
3+S(10).A218991 A005668 A015451 A218992..-2+S(10)
...
Properties of p1, p2, p3, p4:
(1) If x > 2, the terms of p2 and p3 interlace: p2(0) < p3(0) < p2(1) < p3(1) < p2(2) < p3(2)... Also, p1(n) <= p2(n) <= p3(n) <= p4(n) <= p1(n+1) for all x>0 and n>=0.
(2) If x > 2, the limits L(x) = limit(p/x^n) exist for the four functions p(x), and L1(x) <= L2(x) <= L3(x) <= L4 (x). See the Mathematica programs for plots of the four functions; one of them also occurs in the Odlyzko and Wilf article, along with a discussion of the special case x = 3/2.
(3) Suppose that x = u + sqrt(v) where v is a nonsquare positive integer. If u = f(x) or u = c(x), then p1, p2, p3, p4 are linear recurrence sequences. Is this true for sequences p1, p2, p3, p4 obtained from x = (u + sqrt(v))^q for every positive integer q?
(4) Suppose that x is a Pisot-Vijayaraghavan number. Must p1, p2, p3, p4 then be linearly recurrent? If x is also a quadratic irrational b + c*sqrt(d), must the four limits L(x) be in the field Q(sqrt(d))?
(5) The Odlyzko and Wilf article (page 239) raises three interesting questions about the power ceiling function; it appears that they remain open.

Examples

			a(0) = ceiling(r) = 7, where r = ((1+sqrt(5))/2)^4 = 6.8...; a(1) = floor(7*r) = 47; a(2) = ceiling(47) = 323.
		

Crossrefs

Programs

  • Mathematica
    (* Program 1.  A214992 and related sequences *)
    x = GoldenRatio^4; z = 30; (* z = # terms in sequences *)
    z1 = 100; (* z1 = # digits in approximations *)
    f[x_] := Floor[x]; c[x_] := Ceiling[x];
    p1[0] = f[x]; p2[0] = f[x]; p3[0] = c[x]; p4[0] = c[x];
    p1[n_] := f[x*p1[n - 1]]
    p2[n_] := If[Mod[n, 2] == 1, c[x*p2[n - 1]], f[x*p2[n - 1]]]
    p3[n_] := If[Mod[n, 2] == 1, f[x*p3[n - 1]], c[x*p3[n - 1]]]
    p4[n_] := c[x*p4[n - 1]]
    Table[p1[n], {n, 0, z}]  (* A049685 *)
    Table[p2[n], {n, 0, z}]  (* A157335 *)
    Table[p3[n], {n, 0, z}]  (* A214992 *)
    Table[p4[n], {n, 0, z}]  (* A004187 *)
    Table[p4[n] - p1[n], {n, 0, z}]  (* A004187 *)
    Table[p3[n] - p2[n], {n, 0, z}]  (* A098305 *)
    (* Program 2.  Plot of power floor and power ceiling functions, p1(x) and p4(x) *)
    f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x];
    p1[x_, 0] := f[x]; p1[x_, n_] := f[x*p1[x, n - 1]];
    p4[x_, 0] := c[x]; p4[x_, n_] := c[x*p4[x, n - 1]];
    Plot[Evaluate[{p1[x, 10]/x^10, p4[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]
    (* Program 3. Plot of power floor-ceiling and power ceiling-floor functions, p2(x) and p3(x) *)
    f[x_] := f[x] = Floor[x]; c[x_] := c[x] = Ceiling[x];
    p2[x_, 0] := f[x]; p3[x_, 0] := c[x];
    p2[x_, n_] := If[Mod[n, 2] == 1, c[x*p2[x, n - 1]], f[x*p2[x, n - 1]]]
    p3[x_, n_] := If[Mod[n, 2] == 1, f[x*p3[x, n - 1]], c[x*p3[x, n - 1]]]
    Plot[Evaluate[{p2[x, 10]/x^10, p3[x, 10]/x^10}], {x, 2, 3}, PlotRange -> {0, 4}]

Formula

a(n) = floor(r*a(n-1)) if n is odd and a(n) = ceiling(r*a(n-1)) if n is even, where a(0) = ceiling(r), r = (golden ratio)^4 = (7 + sqrt(5))/2.
a(n) = 6*a(n-1) + 6*a(n-2) - a(n-3).
G.f.: (7 + 5*x - x^2)/((1 + x)*(1 - 7*x + x^2)).
a(n) = (10*(-2)^n+(10+3*sqrt(5))*(7-3*sqrt(5))^(n+2)+(10-3*sqrt(5))*(7+3*sqrt(5))^(n+2))/(90*2^n). - Bruno Berselli, Nov 14 2012
a(n) = 7*A157335(n) + 5*A157335(n-1) - A157335(n-2). - R. J. Mathar, Feb 05 2020
E.g.f.: exp(-x)*(5 + 2*exp(9*x/2)*(155*cosh(3*sqrt(5)*x/2) + 69*sqrt(5)*sinh(3*sqrt(5)*x/2)))/45. - Stefano Spezia, Oct 28 2024

A118801 Triangle T that satisfies the matrix products: C*[T^-1]*C = T and T*[C^-1]*T = C, where C is Pascal's triangle.

Original entry on oeis.org

1, 1, -1, 1, -3, 1, 1, -7, 5, -1, 1, -15, 17, -7, 1, 1, -31, 49, -31, 9, -1, 1, -63, 129, -111, 49, -11, 1, 1, -127, 321, -351, 209, -71, 13, -1, 1, -255, 769, -1023, 769, -351, 97, -15, 1, 1, -511, 1793, -2815, 2561, -1471, 545, -127, 17, -1, 1, -1023, 4097, -7423, 7937, -5503, 2561, -799, 161, -19, 1
Offset: 0

Views

Author

Paul D. Hanna, May 02 2006

Keywords

Comments

Matrix inverse is triangle A118800. Row sums are: (1-n). Unsigned row sums equal A007051(n) = (3^n + 1)/2. Row squared sums equal A118802. Antidiagonal sums equal A080956(n) = (n+1)(2-n)/2. Unsigned antidiagonal sums form A024537 (with offset).
T = C^2*D^-1 where matrix product D = C^-1*T*C = T^-1*C^2 has only 2 nonzero diagonals: D(n,n)=-D(n+1,n)=(-1)^n, with zeros elsewhere. Also, [B^-1]*T*[B^-1] = B*[T^-1]*B forms a self-inverse matrix, where B^2 = C and B(n,k) = C(n,k)/2^(n-k). - Paul D. Hanna, May 04 2006
Riordan array ( 1/(1 - x), -x/(1 - 2*x) ) The matrix square is the Riordan array ( (1 - 2*x)/(1 - x)^2, x ), which belongs to the Appell subgroup of the Riordan group. See the Example section below. - Peter Bala, Jul 17 2013

Examples

			Formulas for initial columns are, for n>=0:
T(n+1,1) = 1 - 2^(n+1);
T(n+2,2) = 1 + 2^(n+1)*n;
T(n+3,3) = 1 - 2^(n+1)*(n*(n+1)/2 + 1);
T(n+4,4) = 1 + 2^(n+1)*(n*(n+1)*(n+2)/6 + n);
T(n+5,5) = 1 - 2^(n+1)*(n*(n+1)*(n+2)*(n+3)/24 + n*(n+1)/2 + 1).
Triangle begins:
1;
1,-1;
1,-3,1;
1,-7,5,-1;
1,-15,17,-7,1;
1,-31,49,-31,9,-1;
1,-63,129,-111,49,-11,1;
1,-127,321,-351,209,-71,13,-1;
1,-255,769,-1023,769,-351,97,-15,1;
1,-511,1793,-2815,2561,-1471,545,-127,17,-1;
1,-1023,4097,-7423,7937,-5503,2561,-799,161,-19,1; ...
The matrix square, T^2, starts:
1;
0,1;
-1,0,1;
-2,-1,0,1;
-3,-2,-1,0,1;
-4,-3,-2,-1,0,1; ...
where all columns are the same.
The matrix product C^-1*T*C = T^-1*C^2 is:
1;
-1,-1;
0, 1, 1;
0, 0,-1,-1;
0, 0, 0, 1, 1; ...
where C(n,k) = n!/(n-k)!/k!.
		

Crossrefs

Cf. A118800 (inverse), A007051 (unsigned row sums), A118802 (Row squared sums), A080956 (antidiagonal sums), A024537 (unsigned antidiagonal sums).
A145661, A119258 and A118801 are all essentially the same (see the Shattuck and Waldhauser paper). - Tamas Waldhauser, Jul 25 2011

Programs

  • Mathematica
    Table[(1 + (-1)^k*2^(n - k + 1)*Sum[ Binomial[n - 2 j - 2, k - 2 j - 1], {j, 0, Floor[k/2]}]) - 4 Boole[And[n == 1, k == 0]], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Nov 24 2016 *)
  • PARI
    {T(n,k)=if(n==0&k==0,1,1+(-1)^k*2^(n-k+1)*sum(j=0,k\2,binomial(n-2*j-2,k-2*j-1)))}

Formula

T(n,k) = 1 + (-1)^k*2^(n-k+1)*Sum_{j=0..[k/2]} C(n-2j-2,k-2j-1) for n>=k>=0 with T(0,0) = 1.
For k>0, T(n,k) = -T(n-1,k-1) + 2*T(n-1,k). - Gerald McGarvey, Aug 05 2006
O.g.f.: (1 - 2*t)/(1 - t) * 1/(1 + t*(x - 2)) = 1 + (1 - x)*t + (1 - 3*x + x^2)*t^2 + (1 - 7*x + 5*x^2 - x^3)*t^3 + .... - Peter Bala, Jul 17 2013
From Tom Copeland, Nov 17 2016: (Start)
Let M = A200139^(-1) = (unsigned A118800)^(-1) and NpdP be the signed padded Pascal matrix defined in A097805. Then T(n,k) = (-1)^n* M(n,k) and T = P*NpdP = (A239473)^(-1)*P^(-1) = P*A167374*P^(-1) = A156644*P^(-1), where P is the Pascal matrix A007318 with inverse A130595. Cf. A112857.
Signed P^2 = signed A032807 = T*A167374. (End)

A181869 a(1) = 2, a(2) = 1. For n >= 3, a(n) is found by concatenating the squares of the first n-1 terms of the sequence in reverse order and then dividing the resulting number by a(n-1).

Original entry on oeis.org

2, 1, 14, 1401, 140100014, 140100014000000001401, 14010001400000000140100000000000000000000140100014
Offset: 1

Views

Author

Peter Bala, Nov 29 2010

Keywords

Comments

The calculations for the first few values of the sequence are
... 2^2 = 4 so a(3) = 14/1 = 14
... 14^2 = 196 so a(4) = 19614/14 = 1401
... 1401^2 = 1962801 so a(5) = 196280119614/1401 = 140100014
For similarly defined sequences see A181754 through A181756 and A181864 through A181870.

Crossrefs

Programs

  • Maple
    #A181869
    M:=7:
    a:=array(1..M):s:=array(1..M):
    a[1]:=2:a[2]:=1:
    s[1]:=convert(a[1]^2,string):
    s[2]:=cat(convert(a[2]^2,string),s[1]):
    for n from 3 to M do
    a[n] := parse(s[n-1])/a[n-1];
    s[n]:= cat(convert(a[n]^2,string),s[n-1]);
    end do:
    seq(a[n],n = 1..M);

Formula

DEFINITION
a(1) = 2, a(2) = 1, and for n >= 3
(1)... a(n) = concatenate (a(n-1)^2,a(n-2)^2,...,a(1)^2)/a(n-1).
RECURRENCE RELATION
For n >= 2,
(2)... a(n+2) = 10^F(n,2)*a(n+1) + a(n) = 10^Pell(n)*a(n+1) + a(n),
where F(n,2) is the n-th Fibonacci polynomial F(n,x) evaluated at
x = 2, and Pell(n) = A000129(n).
a(n) has A024537(n-2) digits.

A215928 a(n) = 2*a(n-1) + a(n-2) for n > 2, a(0) = a(1) = 1, a(2) = 2.

Original entry on oeis.org

1, 1, 2, 5, 12, 29, 70, 169, 408, 985, 2378, 5741, 13860, 33461, 80782, 195025, 470832, 1136689, 2744210, 6625109, 15994428, 38613965, 93222358, 225058681, 543339720, 1311738121, 3166815962, 7645370045, 18457556052, 44560482149, 107578520350, 259717522849
Offset: 0

Views

Author

Michael Somos, Aug 27 2012

Keywords

Comments

Number of 132-avoiding two-stack sortable permutations. See Theorem 2.2 of Egge and Mansour which gives a generating function equation P(x) = 1 + x + 2*x^2 + x*(P(x) - 1 - x) + x^2*(P(x) - 1) + x*(P(x) - 1 - x).
Row sums of triangle A155161. - Philippe Deléham, Aug 31 2012
a(n) is the top left entry of the n-th power of any of the 3 X 3 matrices [1, 1, 1; 1, 1, 1; 0, 1, 0] or [1, 1, 0; 1, 1, 1; 1, 1, 0] or [1, 1, 1; 0, 0, 1; 1, 1, 1] or [1, 0, 1; 1, 0, 1; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
For n > 0, A001333(n)/a(n) = A001333(n)/A000129(n), which converges to sqrt(2). - Karl V. Keller, Jr., May 17 2015

Examples

			G.f. = 1 + x + 2*x^2 + 5*x^3 + 12*x^4 + 29*x^5 + 70*x^6 + 169*x^7 + 408*x^8 + 985*x^9 + ...
		

Crossrefs

Programs

  • Magma
    [1] cat [ n le 2 select (n) else 2*Self(n-1)+Self(n-2): n in [1..35] ]; // Vincenzo Librandi, May 14 2015
  • Maple
    f:= gfun:-rectoproc({a(n)=2*a(n-1)+a(n-2), a(0)=1, a(1)=1, a(2)=2}, a(n), remember):
    map(f, [$0..100]); # Robert Israel, May 29 2015
  • Mathematica
    CoefficientList[Series[(1 - x - x^2)/(1 - 2 x - x^2), {x, 0, 30}], x] (* Vincenzo Librandi, May 14 2015 *)
  • PARI
    {a(n) = if( n<0, 0, polcoeff( 1 / (1 - x / (1 - x / (1 - x / (1 + x)))) + x * O(x^n), n))};
    

Formula

a(n) = 2*a(n-1) + a(n-2) for n > 2, a(0) = a(1) = 1, a(2) = 2.
G.f.: 1 / (1 - x / (1 - x / (1 - x / (1 + x)))) = (1 - x - x^2) / (1 - 2*x - x^2).
a(n) = A000129(n) unless n = 0.
a(n+1) - a(n) = A078057(n-1).
PSUM transform is A024537.
PSUMSIGN transform is A097075.
INVERT transform of A000045(n). [Corrected by Wolfdieter Lang, Dec 07 2020]
G.f.: 1/( 1 - (Sum_{k>=0} x*(x + x^2)^k) ) = 1/( 1 - (Sum_{k>=1} (x/(1 - x^2))^k) ). - Joerg Arndt, Sep 30 2012
G.f.: 1 + Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k + 2 + x)/( x*(4*k + 4 + x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 06 2013
a(n) = A069306(n-1) if n > 1. - Michael Somos, Oct 23 2018
E.g.f.: 1 + exp(x)*sinh(sqrt(2)*x)/sqrt(2). - Franck Maminirina Ramaharo, Nov 29 2018

A243607 T(n,k) = Number of length n+2 0..k arrays with no three elements in a row with pattern aba (with a!=b) and new values 0..k introduced in 0..k order.

Original entry on oeis.org

3, 4, 5, 4, 9, 8, 4, 10, 21, 13, 4, 10, 28, 50, 21, 4, 10, 29, 85, 120, 34, 4, 10, 29, 96, 269, 289, 55, 4, 10, 29, 97, 349, 870, 697, 89, 4, 10, 29, 97, 365, 1350, 2844, 1682, 144, 4, 10, 29, 97, 366, 1511, 5425, 9346, 4060, 233, 4, 10, 29, 97, 366, 1533, 6726, 22297, 30792
Offset: 1

Views

Author

R. H. Hardin, Jun 07 2014

Keywords

Comments

Table starts
...3....4......4......4......4......4.......4.......4.......4.......4.......4
...5....9.....10.....10.....10.....10......10......10......10......10......10
...8...21.....28.....29.....29.....29......29......29......29......29......29
..13...50.....85.....96.....97.....97......97......97......97......97......97
..21..120....269....349....365....366.....366.....366.....366.....366.....366
..34..289....870...1350...1511...1533....1534....1534....1534....1534....1534
..55..697...2844...5425...6726...7020....7049....7050....7050....7050....7050
..89.1682...9346..22297..31544..34631...35129...35166...35167...35167...35167
.144.4060..30792..92841.153328.181391..187993..188788..188834..188835..188835
.233.9801.101577.389456.763187.995139.1069914.1082913.1084123.1084179.1084180

Examples

			Some solutions for n=5, k=4
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..1....1....0....1....0....1....1....0....0....1....1....1....1....1....0....1
..1....1....1....1....1....2....2....0....0....2....2....2....2....2....0....1
..2....0....1....2....2....3....3....0....1....3....2....3....2....2....1....1
..2....2....1....3....3....1....0....1....2....0....3....4....1....1....2....1
..3....3....0....1....3....1....4....1....2....0....3....0....3....3....2....1
..4....1....2....1....0....0....3....0....0....2....3....1....0....3....1....0
		

Crossrefs

Column 1 is A000045(n+3).
Column 2 is A024537(n+1).

Formula

Empirical for column k:
k=1: a(n) = a(n-1) +a(n-2),
k=2: a(n) = 3*a(n-1) -a(n-2) -a(n-3),
k=3: a(n) = 5*a(n-1) -5*a(n-2) -3*a(n-3) +3*a(n-4) +a(n-5),
k=4: a(n) = 8*a(n-1) -18*a(n-2) +5*a(n-3) +17*a(n-4) -4*a(n-5) -6*a(n-6) -a(n-7),
k=5: [order 9],
k=6: [order 11],
k=7: [order 13],
k=8: [order 15],
k=9: [order 17].

A098790 a(n) = 2*a(n-1) + a(n-2) + 1, a(0) = 1, a(1) = 2.

Original entry on oeis.org

1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074, 7422, 17919, 43261, 104442, 252146, 608735, 1469617, 3547970, 8565558, 20679087, 49923733, 120526554, 290976842, 702480239, 1695937321, 4094354882, 9884647086, 23863649055, 57611945197
Offset: 0

Views

Author

Creighton Dement, Oct 30 2004

Keywords

Comments

Previous name was: a(n) = A048739(n) - A000129(n).
Partial sums of Pell numbers A000129 except omit next-to-last Pell number. E.g., 37 = 0+1+2+5+12+29 - 12.

References

  • M. Bicknell-Johnson and G. E. Bergum, The Generalized Fibonacci Numbers {C(n)}, C(n)=C(n-1)+C(n-2)+K, Applications of Fibonacci Numbers, 1986, pp. 193-205.

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 2; a[n_] := a[n] = 2a[n - 1] + a[n - 2] + 1; Table[ a[n], {n, 0, 28}] (* Robert G. Wilson v, Nov 04 2004 *)
    LinearRecurrence[{3,-1,-1},{1,2,6},31] (* Harvey P. Dale, Oct 15 2011 *)
    CoefficientList[Series[(x^2 - x + 1)/((1 - x) (1 - 2 x - x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 14 2014 *)

Formula

a(n) = 2*a(n-1) + a(n-2) + 1, a(0) = 1, a(1) = 2.
G.f.: (x^2-x+1)/((1-x)(1-2x-x^2)).
a(n+1) = - A024537(n+1) + 2*A048739(n+1) - 2*A048739(n).
a(n) = - A024537(n) + A052542(n+1).
Partial sums of A074323. - Paul Barry, Mar 11 2007
a(n) = (sqrt(2)+1)^n*(3/4+sqrt(2)/4)+(sqrt(2)-1)^n*(3/4-sqrt(2)/4)*(-1)^n-1/2; - Paul Barry, Mar 11 2007
a(0)=1, a(1)=2, a(2)=6, a(n)=3*a(n-1)-a(n-2)-a(n-3). [Harvey P. Dale, Oct 15 2011]
a(2*n) = A124124(2*n+1). - Hermann Stamm-Wilbrandt, Aug 03 2014
a(2*n+1) = A006451(2*n+1). - Hermann Stamm-Wilbrandt, Aug 26 2014
a(n) = 7*a(n-2) - 7*a(n-4) + a(n-6), for n>5. - Hermann Stamm-Wilbrandt, Aug 26 2014
2*a(n) = A135532(n+1)-1. - R. J. Mathar, Jan 13 2023

Extensions

More terms from Robert G. Wilson v, Nov 04 2004
Definition edited by N. J. A. Sloane, Aug 03 2014
New name from existing formula by Joerg Arndt, Aug 13 2014

A243641 T(n,k)=Number of length n+2 0..k arrays with no three unequal elements in a row and new values 0..k introduced in 0..k order.

Original entry on oeis.org

4, 4, 8, 4, 9, 16, 4, 9, 21, 32, 4, 9, 21, 50, 64, 4, 9, 21, 51, 120, 128, 4, 9, 21, 51, 127, 289, 256, 4, 9, 21, 51, 127, 323, 697, 512, 4, 9, 21, 51, 127, 324, 835, 1682, 1024, 4, 9, 21, 51, 127, 324, 844, 2187, 4060, 2048, 4, 9, 21, 51, 127, 324, 844, 2242, 5787, 9801, 4096, 4
Offset: 1

Views

Author

R. H. Hardin, Jun 08 2014

Keywords

Comments

Table starts
....4....4.....4.....4.....4.....4.....4.....4.....4.....4.....4.....4.....4
....8....9.....9.....9.....9.....9.....9.....9.....9.....9.....9.....9.....9
...16...21....21....21....21....21....21....21....21....21....21....21....21
...32...50....51....51....51....51....51....51....51....51....51....51....51
...64..120...127...127...127...127...127...127...127...127...127...127...127
..128..289...323...324...324...324...324...324...324...324...324...324...324
..256..697...835...844...844...844...844...844...844...844...844...844...844
..512.1682..2187..2242..2243..2243..2243..2243..2243..2243..2243..2243..2243
.1024.4060..5787..6062..6073..6073..6073..6073..6073..6073..6073..6073..6073
.2048.9801.15435.16655.16736.16737.16737.16737.16737.16737.16737.16737.16737

Examples

			Some solutions for n=6 k=4
..0....0....0....0....0....0....0....0....0....0....0....0....0....0....0....0
..1....0....0....0....1....1....0....0....0....0....1....1....0....1....1....0
..1....1....1....0....1....0....0....0....1....1....1....0....0....1....1....1
..1....1....0....1....1....0....1....0....0....1....2....0....1....2....2....1
..2....2....0....0....0....0....0....0....0....2....1....1....1....2....2....0
..2....1....1....1....1....1....0....0....0....1....1....1....0....1....3....1
..3....1....1....1....0....0....0....0....1....1....1....1....0....1....3....1
..2....2....1....1....1....1....0....1....1....1....0....0....2....2....0....0
		

Crossrefs

Column 1 is A000079(n+1)
Column 2 is A024537(n+1)
Column 3 is A094286(n+2)

Formula

Empirical for column k:
k=1: a(n) = 2*a(n-1)
k=2: a(n) = 3*a(n-1) -a(n-2) -a(n-3)
k=3: a(n) = 5*a(n-1) -6*a(n-2) -2*a(n-3) +4*a(n-4)
k=4: a(n) = 7*a(n-1) -14*a(n-2) +21*a(n-4) -7*a(n-5) -6*a(n-6)
k=5: [order 8]
k=6: [order 10]
k=7: [order 12]
k=8: [order 14]
k=9: [order 16]
Showing 1-10 of 22 results. Next