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

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

A193815 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = x^n + x^(n-1) + ... + x+1 and q(n,x)=(x+1)^n.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 4, 6, 3, 1, 5, 10, 10, 4, 1, 6, 15, 20, 15, 5, 1, 7, 21, 35, 35, 21, 6, 1, 8, 28, 56, 70, 56, 28, 7, 1, 9, 36, 84, 126, 126, 84, 36, 8, 1, 10, 45, 120, 210, 252, 210, 120, 45, 9, 1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 10, 1, 12, 66, 220, 495
Offset: 0

Views

Author

Clark Kimberling, Aug 06 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.
Triangle T(n,k), read by rows, given by (1,0,-1,1,0,0,0,0,0,0,0,...) DELTA (1,1,-1,1,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 08 2011
Row sums are A095121. - Philippe Deléham, Nov 24 2011

Examples

			First six rows:
  1;
  1,  1;
  1,  3,  2;
  1,  4,  6,  3;
  1,  5, 10, 10,  4;
  1,  6, 15, 20, 15,  5;
		

Crossrefs

Programs

  • Mathematica
    z = 10; c = 1; d = 1;
    p[0, x_] := 1
    p[n_, x_] := x*p[n - 1, x] + 1; p[n_, 0] := p[n, x] /. x -> 0;
    q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]  (* A193815 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]   (* A153861 *)
    t[0, 0] = t[1, 0] = t[1, 1] = t[2, 0] = 1; t[2, 1] = 3; t[2, 2] = 2; t[n_, k_] /; k<0 || k>n = 0; t[n_, k_] := t[n, k] = t[n-1, k]+2*t[n-1, k-1]-t[n-2, k-1]-t[n-2, k-2]; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 16 2013, after Philippe Deléham *)

Formula

T(n,k) = A153861(n,n-k). - Philippe Deléham, Oct 08 2011
G.f.: (1-y*x+y*(y+1)*x^2)/((1-y*x)*(1-(y+1)*x)). - Philippe Deléham, Nov 24 2011
Sum_{k=0..n} T(n,k)*x^k = (x+1)*((x+1)^n - x^n) + 0^n. - Philippe Deléham, Nov 24 2011
T(n,k) = T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k-1) - T(n-2,k-2), T(0,0)=T(1,0)=T(1,1)=T(2,0)=1, T(2,1)=3, T(2,2)=2, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Dec 15 2013

A153860 Triangle by columns: leftmost column = (1, 0, 1, -1, 1, -1, 1, ...); columns >1 = (1, 1, 0, 0, 0, ...).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, -1, 0, 1, 1, 1, 0, 0, 1, 1, -1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
Offset: 1

Views

Author

Gary W. Adamson, Jan 03 2009

Keywords

Comments

As an infinite lower triangular matrix M; M * [1,2,3,...] = A063210: (1, 2, 6, 6, 10, 10, 14, 14, ...).
M * [1, 3, 5, 7, ...] = A047471, {1,3} mod 8.
Eigensequence of the triangle = A066983 starting (1, 1, 3, 3, 7, 9, 17, 25, ...).
Binomial transform of the triangle = A153861.
Row sums = A153284: (1, 1, 3, 1, 3, 1, 3, 1, ...).

Examples

			First few rows of the triangle:
   1;
   0, 1;
   1, 1, 1;
  -1, 0, 1, 1;
   1, 0, 0, 1, 1;
  -1, 0, 0, 0, 1, 1;
   1, 0, 0, 0, 0, 1, 1;
  -1, 0, 0, 0, 0, 0, 1, 1;
   1, 0, 0, 0, 0, 0, 0, 1, 1;
  ...
		

Crossrefs

Cf. A153861 (binomial transform), A153284 (row sums), A063210, A047471, A066983.

Programs

  • Haskell
    a153860 n k = a153860_tabl !! (n-1) !! (k-1)
    a153860_row n = a153860_tabl !! (n-1)
    a153860_tabl = [1] : [0, 1] : iterate (\(x:xs) -> -x : 0 : xs) [1, 1, 1]
    -- Reinhard Zumkeller, Dec 16 2013

Formula

Triangle by columns: leftmost column = (1, 0, 1, -1, 1, ...); columns > 1 = (1, 1, 0, 0, 0, ...).

A193819 Mirror of the triangle A193818.

Original entry on oeis.org

1, 1, 2, 2, 6, 4, 3, 12, 16, 8, 4, 20, 40, 40, 16, 5, 30, 80, 120, 96, 32, 6, 42, 140, 280, 336, 224, 64, 7, 56, 224, 560, 896, 896, 512, 128, 8, 72, 336, 1008, 2016, 2688, 2304, 1152, 256, 9, 90, 480, 1680, 4032, 6720, 7680, 5760, 2560, 512, 10, 110, 660
Offset: 0

Views

Author

Clark Kimberling, Aug 06 2011

Keywords

Comments

A193819 is obtained by reversing the rows of the triangle A193818.

Examples

			First six rows:
  1;
  1,   2;
  2,   6,   4;
  3,  12,  16,   8;
  4,  20,  40,  40,  16;
  5,  30,  80, 120,  96,  32;
		

Crossrefs

Programs

  • Mathematica
    z = 10; c = 2; d = 1;
    p[0, x_] := 1
    p[n_, x_] := x*p[n - 1, x] + 1; p[n_, 0] := p[n, x] /. x -> 0;
    q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]]  (* A193818 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]   (* A193819 *)

Formula

Write w(n,k) for the triangle at A193818. The triangle at A193819 is then given by w(n,n-k).
Triangle T(n,k), read by rows, given by (1,1,-1,1,0,0,0,0,0,0,0,...) DELTA (2,0,-2,2,0,0,0,0,0,0,0,...) where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 05 2011
T(n,k) = A153861(n,k)*2^k. - Philippe Deléham, Oct 09 2011
T(n,k) = 2*T(n-1,k) + 2*T(n-1,k-1) - T(n-2,k) - 2*T(n-2,k-1), T(0,0)=T(1,0)=1, T(1,1)=T(2,0)=2, T(2,1)=6, T(2,2)=4, T(n,k)=0 if k < 0 or if k > n. - Philippe Deléham, Dec 15 2013
G.f.: (1-x+x^2+2*x^2*y)/((x-1)*(-1+x+2*x*y)). - R. J. Mathar, Aug 12 2015
Showing 1-4 of 4 results.