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

A152948 a(n) = (n^2 - 3*n + 6)/2.

Original entry on oeis.org

2, 2, 3, 5, 8, 12, 17, 23, 30, 38, 47, 57, 68, 80, 93, 107, 122, 138, 155, 173, 192, 212, 233, 255, 278, 302, 327, 353, 380, 408, 437, 467, 498, 530, 563, 597, 632, 668, 705, 743, 782, 822, 863, 905, 948, 992, 1037, 1083, 1130, 1178, 1227, 1277, 1328, 1380
Offset: 1

Views

Author

Keywords

Comments

a(1) = 2; then add 0 to the first number, then 1, 2, 3, 4, ... and so on.
Essentially the same as A022856, A089071 and A133263. - R. J. Mathar, Dec 19 2008
First differences are A001477.
From Vladimir Shevelev, Jan 20 2014: (Start)
If we ignore the zero polygonal numbers, then for n >= 3, a(n) is the minimal k such that the k-th n-gonal number is a sum of two n-gonal numbers (see formula and example).
If the zero polygonal numbers are ignored, then for n >= 4, the a(n)-th n-gonal number is a sum of the (a(n)-1)-th n-gonal number and the (n-1)-th n-gonal number. (End)
Numbers m such that 8m - 15 is a square. - Bruce J. Nicholson, Jul 24 2017

Examples

			a(7)=17. This means that the 17th (positive) heptagonal number 697 (cf. A000566) is the smallest heptagonal number which is a sum of two (positive) heptagonal numbers. We have 697 = 616 + 81 with indices 17, 16, 6 in A000566. - _Vladimir Shevelev_, Jan 20 2014
		

Crossrefs

Programs

  • Magma
    [ (n^2-3*n+6)/2: n in [1..60] ];
    
  • Mathematica
    Array[(#^2 - 3 # + 6)/2 &, 54] (* or *) Rest@ CoefficientList[Series[-x (2 - 4 x + 3 x^2)/(x - 1)^3, {x, 0, 54}],x] (* Michael De Vlieger, Mar 25 2020 *)
  • PARI
    a(n)=(n^2-3*n+6)/2 \\ Charles R Greathouse IV, Sep 28 2015
  • Sage
    [2+binomial(n,2) for n in range(0, 54)] # Zerinvary Lajos, Mar 12 2009
    

Formula

a(n) = a(n-1) + n-2 (with a(1)=2). - Vincenzo Librandi, Nov 26 2010
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: -x*(2 - 4*x + 3*x^2) / (x-1)^3. - R. J. Mathar, Oct 30 2011
Sum_{n>=1} 1/a(n) = 1/2 + 2*Pi*tanh(sqrt(15)*Pi/2)/sqrt(15). - Amiram Eldar, Dec 13 2022
E.g.f.: exp(x)*(6 - 2*x + x^2)/2 - 3. - Stefano Spezia, Nov 14 2024

A047080 Triangular array T read by rows: T(h,k)=number of paths from (0,0) to (k,h-k) using step-vectors (0,1), (1,0), (1,1) with no right angles between pairs of consecutive steps.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 1, 1, 4, 5, 5, 4, 1, 1, 5, 8, 9, 8, 5, 1, 1, 6, 12, 15, 15, 12, 6, 1, 1, 7, 17, 24, 27, 24, 17, 7, 1, 1, 8, 23, 37, 46, 46, 37, 23, 8, 1, 1, 9, 30, 55, 75, 83, 75, 55, 30, 9, 1, 1, 10, 38, 79, 118, 143, 143, 118, 79, 38, 10, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) equals the number of reduced alignments between a string of length n and a string of length k. See Andrade et. al. - Peter Bala, Feb 04 2018

Examples

			E.g., row 3 consists of T(3,0)=1; T(3,1)=2; T(3,2)=2; T(3,3)=1.
Triangle begins:
  1;
  1,  1;
  1,  1,  1;
  1,  2,  2,  1;
  1,  3,  3,  3,  1;
  1,  4,  5,  5,  4,  1;
  1,  5,  8,  9,  8,  5,  1;
  1,  6, 12, 15, 15, 12,  6,  1;
		

Crossrefs

Programs

  • Magma
    F:=Factorial;
    p:= func< n,k | (&+[ (-1)^j*F(n+k-3*j)/(F(j)*F(n-2*j)*F(k-2*j)): j in [0..Min(Floor(n/2), Floor(k/2))]]) >;
    q:= func< n,k | n eq 0 or k eq 0 select 0 else (&+[ (-1)^j*F(n+k-3*j-2)/(F(j)*F(n-2*j-1)*F(k-2*j-1)) : j in [0..Min(Floor((n-1)/2), Floor((k-1)/2))]]) >;
    A:= func< n,k | p(n,k) - q(n,k) >;
    A047080:= func< n,k | n eq 0 select 1 else A(n-k, k) >;
    [[A(n,k): k in [1..6]]: n in [1..6]];
    [A047080(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 30 2022
    
  • Maple
    T := proc(n, k) option remember; if n < 0 or k > n then return 0 fi;
    if n < 3 then return 1 fi; if k < iquo(n,2) then return T(n, n-k) fi;
    T(n-1, k-1) + T(n-1, k) - T(n-4, k-2)  end:
    seq(seq(T(n,k), k=0..n), n=0..11); # Peter Luschny, Feb 11 2018
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n<0 || k>n, 0, n<3, 1, kJean-François Alcover, Jul 30 2018 *)
  • SageMath
    f=factorial
    def p(n,k): return sum( (-1)^j*f(n+k-3*j)/(f(j)*f(n-2*j)*f(k-2*j)) for j in range(1+min((n//2), (k//2))) )
    def q(n,k): return sum( (-1)^j*f(n+k-3*j-2)/(f(j)*f(n-2*j-1)*f(k-2*j-1)) for j in range(1+min(((n-1)//2), ((k-1)//2))) )
    def A(n,k): return p(n,k) - q(n,k)
    def A047080(n,k): return A(n-k, k)
    flatten([[A047080(n,k) for k in range(n+1)] for n in range(14)]) # G. C. Greubel, Oct 30 2022

Formula

T(h, k) = T(h-1, k-1) + T(h-1, k) - T(h-4, k-2);
Writing T(h, k) = F(h-k, k), generating function for F is (1-xy)/(1-x-y+x^2y^2).
From Peter Bala, Feb 04 2018: (Start)
T(n, k) = (Sum_{i = 0..A} (-1)^i*(n+k-3*i)!/(i!*(n-2*i)!*(k-2*i)!)) - (Sum_{i = 0..B} (-1)^i*(n+k-3*i-2)!/(i!*(n-2*i-1)!*(k-2*i-1)!)), where A = min{floor(n/2), floor(k/2)} and B = min{floor((n-1)/2), floor((k-1)/2)}.
T(2*n, n) = A171155(n). (End)
From G. C. Greubel, Oct 30 2022: (Start) (formulas for triangle T(n,k))
T(n, n-k) = T(n, k).
T(n, n) = A000012(n).
T(n, n-1) = A028310(n-1).
T(n, n-2) = A089071(n-1) = A022856(n+1).
T(2*n, n-1) = A047087(n).
T(2*n+1, n-1) = A047088(n).
Sum_{k=0..n} T(n, k) = (-1)^n*A078042(n) = A001590(n+3).
Sum_{k=0..n} (-1)^k*T(n, k) = A091337(n+1).
Sum_{k=0..floor(n/2)} T(n, k) = A047084(n). (End)

Extensions

Sequence recomputed to correct terms from 23rd onward, and recurrence and generating function added by Michael L. Catalano-Johnson (mcj(AT)pa.wagner.com), Jan 14 2000

A180091 a(m,n) is the number of ways to split two strings of length m and n, respectively, into the same number of nonempty parts such that at least one of the corresponding parts has length 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 5, 9, 1, 4, 8, 15, 27, 1, 5, 12, 24, 46, 83, 1, 6, 17, 37, 75, 143, 259, 1, 7, 23, 55, 118, 237, 450, 817, 1, 8, 30, 79, 180, 380, 755, 1429, 2599, 1, 9, 38, 110, 267, 592, 1229, 2421, 4570, 8323
Offset: 1

Views

Author

Steffen Eger, Jan 14 2011

Keywords

Comments

a(m,n) is also the number alignments (between two strings) that satisfy weak monotonicity, completeness, and disjointness.
a(m,n) is also the number of monotone lattice paths from (0,0) to (m,n) with steps in {(1,1),(1,2),(1,3),(1,4),...,(2,1),(3,1),(4,1),...}. - Steffen Eger, Sep 25 2012
From Julien Rouyer, Jun 02 2023: (Start)
a(m-1,n-1) is also the number of strictly increasing functions defined on a part of the m-set {1,...,m} that take values in the n-set {1,...,n} and that can't be extended to a greater part of the m-set to give another strictly increasing function (values for m < n can be obtained by symmetry).
a(m-1,n-1) is also the number of solutions to the problem consisting of connecting, with noncrossing edges, some of m points aligned on a straight line to some of n other points aligned on a parallel straight line (each point is connected at most with one other point), in such a way that no additional noncrossing connection can be added.
A direct combinatorial calculation is possible, but time-consuming if m and n are large. (End)
From Thierry Marchant, Oct 30 2024: (Start)
a(m,n) is also the number of maximal antichains in the product of two chains of length m and n.
a(m,n) is also the number of strict chains in the product of two chains of length m and n (a strict chain P in a product of two chains is a chain such that x,y in P implies x_1 different from y_1 and x_2 different from y_2).
a(m,n) is also the number of walks from (0,0) to (m,n) where unit horizontal (+1,0), vertical (0,+1), and diagonal (+1,+1) steps are permitted but a horizontal step cannot be followed by a vertical step, nor vice versa. (End)

Examples

			For m=4, n=3, the 5 possibilities are:
a) X XXX   b) XXX X  c) X XX X  d) XX X X   e) X X XX
   YY Y        Y YY     Y  Y Y     Y  Y Y      Y Y Y
The triangle a(m,n) starts in row m=1 with columns 1 <= n <= m as:
  1;
  1,  1;
  1,  2,  3;
  1,  3,  5,   9;
  1,  4,  8,  15,  27;
  1,  5, 12,  24,  46,   83;
  1,  6, 17,  37,  75,  143,  259;
  1,  7, 23,  55, 118,  237,  450,  817;
  1,  8, 30,  79, 180,  380,  755, 1429,  2599;
  1,  9, 38, 110, 267,  592, 1229, 2421,  4570,  8323;
  1, 10, 47, 149, 386,  899, 1948, 3989,  7804, 14698, 26797;
  1, 11, 57, 197, 545, 1334, 3015, 6412, 12987, 25264, 47491, 86659;
From _Julien Rouyer_, Jun 02 2023: (Start)
There are a(5)=T(3,2)=5 strictly increasing functions defined on a part of {1,2,3} that take values in {1,2} and can't be extended keeping the same properties. The 5 functions are defined by
    f(1)=1, f(2)=2;
    g(1)=1, g(2)=3;
    h(1)=2, h(2)=3;
    i(1)=3;
    j(2)=1. (End)
		

Crossrefs

Cf. A089071 (third column), A108626 (sums of diagonals).
Main diagonal gives A171155.
Cf. A047080.

Programs

  • Maple
    A180091 := proc(m,n) a := binomial(m-1,n-1); for k from 2 to n-1 do for l from 1 to k-1 do if k-l-1 >= 0 and k-l-1 <= n-k-1 and l-1 >=0 and l-1 <= m+l-k-1 then a := a+ binomial(k,l)*binomial(n-k-1,k-l-1)*binomial(m+l-k-1,l-1); end if; end do: end do: a; end proc: # R. J. Mathar, Feb 01 2011
  • Python
    # The following program gives T(m,n)=a(m+1,n+1) for any m >= 0 and n >= 0:
    def T(m,n):
        if n == 0:
            res = 1
        elif n == 1:
            res = max(m,n)
        elif m < n:
            res = T(n,m)
        else:
            res = 0
            for i in range(1,m+1):
                res += T(m-i,n-1)
            for j in range(2,n+1):
                res += T(m-1,n-j)
        return res # Julien Rouyer, Jun 02 2023

Formula

For m >= n: a(m,n) = C(m-1,n-1) + Sum_{k=2..n-1} Sum_{i=1..k-1} C(k,i)*C(n-k-1,k-i-1)*C(m+i-k-1,i-1).
Symmetrically extended to m <= n by a(m,n) = a(n,m).
a(n,n) = A171155(n-1).
a(m,n) = Sum_{i=1..m} a(m-i,n-1) + Sum_{j=2..n} a(m-1,n-j). - Julien Rouyer, Jun 02 2023

A172098 Irregular triangle T(n, k) = [x^k]( p(n, x) ), where p(n, x) = x^(n-1)*p(n-1, x) + p(n-2, x) with p(0, x) = 1 and p(1, x) = 1 + x, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 2, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Roger L. Bagula, Jan 25 2010

Keywords

Comments

Rows have A089071(n) number of terms, i.e., 0 <= k <= A089071(n) - 1, for n >= 0. - G. C. Greubel, Apr 07 2022

Examples

			Irregular triangle begins as:
  1;
  1, 1;
  1, 1, 1;
  1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1;
  1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1;
		

Crossrefs

Programs

  • Mathematica
    p[n_, x_]:= p[n, x]= If[n<2, n*x+1, x^(n-1)*p[n-1, x] + p[n-2, x]];
    Table[CoefficientList[p[n, x], x], {n,0,12}]//Flatten
  • SageMath
    @CachedFunction
    def p(n,x):
        if (n<2): return n*x+1
        else: return x^(n-1)*p(n-1, x) + p(n-2, x)
    def T(n,k): return ( p(n,x) ).series(x, (n^2-n+4-2*0^n)/2+1).list()[k]
    flatten([[T(n,k) for k in (0..(n^2-n+2-2*0^n)/2)] for n in (0..12)]) # G. C. Greubel, Apr 07 2022

Formula

T(n, k) = [x^k]( p(n, x) ), where p(n, x) = x^(n-1)*p(n-1, x) + p(n-2, x) with p(0, x) = 1 and p(1, x) = 1 + x.
Sum_{k=0..A089071(n)-1} T(n, k) = Fibonacci(n+2) (row sums). - G. C. Greubel, Apr 07 2022

Extensions

Edited by G. C. Greubel, Apr 07 2022

A238531 Expansion of (1 - x + x^2)^2 / (1 - x)^3 in powers of x.

Original entry on oeis.org

1, 1, 3, 5, 8, 12, 17, 23, 30, 38, 47, 57, 68, 80, 93, 107, 122, 138, 155, 173, 192, 212, 233, 255, 278, 302, 327, 353, 380, 408, 437, 467, 498, 530, 563, 597, 632, 668, 705, 743, 782, 822, 863, 905, 948, 992, 1037, 1083, 1130, 1178, 1227, 1277, 1328, 1380
Offset: 0

Views

Author

Michael Somos, Feb 28 2014

Keywords

Comments

Essentially the same as A152948, A133263 and A089071. - R. J. Mathar, Mar 30 2014

Examples

			G.f. = 1 + x + 3*x^2 + 5*x^3 + 8*x^4 + 12*x^5 + 17*x^6 + 23*x^7 + 30*x^8 + ...
		

Crossrefs

Cf. A133263.

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+x^2)^2/(1-x)^3)); // G. C. Greubel, Aug 07 2018
  • Mathematica
    a[ n_] := (n^2 - n) / 2 + If[ n == 0 || n == 1, 1, 2];
    CoefficientList[Series[(1-x+x^2)^2/(1-x)^3, {x, 0, 50}], x] (* G. C. Greubel, Aug 07 2018 *)
  • PARI
    {a(n) = (n^2 - n) / 2 + 2 - (n==0) - (n==1)};
    
  • PARI
    {a(n) = if( n<0, n = 1-n); polcoeff( (1 - x + x^2)^2 / (1 - x)^3 + x * O(x^n), n)};
    

Formula

Euler transform of length 6 sequence [1, 2, 2, 0, 0, -2].
Binomial transform of [1, 0, 2, -2, 3, -4, 5, -6, ...].
a(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n.
G.f.: (1 - x + x^2)^2 / (1 - x)^3.
a(n) = a(1 - n) for all n in Z.
a(n + 1) = A133263(n) if n>=0. a(n) = (n^2 - n) / 2 + 2 unless n=0 or n=1.
(1 + x^2 + x^3 + x^4 + ...)*(1 + x + 2x^2 + 3x^3 + 4x^4 + ...) = (1 + x + 3x^2 + 5x^3 + 8x^4 + 12x^5 + ...). - Gary W. Adamson, Jul 27 2010

A173154 a(n) = n^3/6 + 3*n^2/4 + 7*n/3 + 7/8 + (-1)^n/8.

Original entry on oeis.org

1, 4, 10, 19, 33, 52, 78, 111, 153, 204, 266, 339, 425, 524, 638, 767, 913, 1076, 1258, 1459, 1681, 1924, 2190, 2479, 2793, 3132, 3498, 3891, 4313, 4764, 5246, 5759, 6305, 6884, 7498, 8147, 8833, 9556, 10318, 11119, 11961, 12844, 13770, 14739, 15753, 16812, 17918, 19071, 20273, 21524
Offset: 0

Views

Author

Paul Curtz, Feb 11 2010

Keywords

Comments

Generated by reading the table shown in A172002 down the diagonal starting at 1.
The inverse binomial transform yields 1, 3, 3, 0, 2, -4, 8, -16, 32, -64, 128, -256, 512, -1024, ... with a pattern of powers of 2.

Programs

  • Magma
    [n^3/6 + 3*n^2/4 + 7*n/3 + 7/8 + (-1)^n/8: n in [0..50]]; // Vincenzo Librandi, Aug 05 2011
  • Mathematica
    Table[n^3/6+(3n^2)/4+(7n)/3+7/8+(-1)^n/8,{n,0,50}] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{1,4,10,19,33},50] (* Harvey P. Dale, Jan 04 2012 *)

Formula

G.f.: ( 1 + x - x^3 + x^4 ) / ( (1+x)*(x-1)^4 ).
a(n) = 3*a(n-1) - 2*a(n-2) - 2*a(n-3) + 3*a(n-4) - a(n-5).
a(n+4) - a(n) = 4*A152948(n+5) = 4*A089071(n+5).
First differences: a(n+1) - a(n) = A061925(n+2).
Second differences: a(n+2) - 2*a(n+1) + a(n) = n + 5/2 + (-1)^n/2 = 3, 3, 5, 5, 7, 7, 9, 9, ... , duplicated A144396.

A173247 a(0) = -1 and a(n) = (-1)^n*(n - 4 - 3*n^2)/2 for n >= 1.

Original entry on oeis.org

-1, 3, -7, 14, -24, 37, -53, 72, -94, 119, -147, 178, -212, 249, -289, 332, -378, 427, -479, 534, -592, 653, -717, 784, -854, 927, -1003, 1082, -1164, 1249, -1337, 1428, -1522, 1619, -1719, 1822, -1928, 2037, -2149, 2264, -2382, 2503, -2627, 2754
Offset: 0

Views

Author

Roger L. Bagula, Feb 13 2010

Keywords

Crossrefs

Programs

  • Magma
    [-1] cat [(-1)^n*(n-4-3*n^2)/2: n in [1..50]]; // Vincenzo Librandi, Apr 20 2015
    
  • Mathematica
    p[x_] = (x^3 - x^2 - 1)/(x + 1)^3;
    a = Table[SeriesCoefficient[ Series[p[x], {x, 0, 50}], n], {n, 0, 50}]
  • PARI
    Vec((x^3 - x^2 - 1)/(x + 1)^3 + O(x^50)) \\ Michel Marcus, Apr 20 2015

Formula

G.f.: (x^3 - x^2 - 1)/(x + 1)^3.
a(n) = -3*a(n-1) -3*a(n-2) -a(n-3).
From Franck Maminirina Ramaharo, Dec 27 2018: (Start)
a(n) = (A143689(n) + 1)*(-1)^(n + 1), n >= 1.
E.g.f.: 1 - (1/2)*(4 - 2*x + 3*x^2)*exp(-x). (End)

Extensions

Definition simplified by the Assoc. Editors of the OEIS, Feb 21 2010
Incorrect comment removed by Joerg Arndt, Dec 27 2018

A173965 Averages of four consecutive cubes.

Original entry on oeis.org

2, 9, 25, 56, 108, 187, 299, 450, 646, 893, 1197, 1564, 2000, 2511, 3103, 3782, 4554, 5425, 6401, 7488, 8692, 10019, 11475, 13066, 14798, 16677, 18709, 20900, 23256, 25783, 28487, 31374, 34450, 37721, 41193, 44872, 48764, 52875, 57211, 61778, 66582, 71629, 76925
Offset: 1

Views

Author

Keywords

Examples

			(0^3+1^3+2^3+3^3)/4 = 9, ...
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=(n^3+(n+1)^3+(n+2)^3+(n+3)^3)/4;Table[f[n],{n,-1,5!}]

Formula

From R. J. Mathar, Mar 31 2010: (Start)
a(n) = (2*n-1)*(n^2-n+4)/2 = (2*n-1)*A089071(n+1).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: x*(1+x)*(2*x^2-x+2)/(x-1)^4. (End)
E.g.f.: 2 + exp(x)*(-4 + 8*x + 3*x^2 + 2*x^3)/2. - Elmo R. Oliveira, Aug 23 2025

Extensions

More terms from Elmo R. Oliveira, Aug 23 2025

A230449 T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = A052952(n), n >= 0 and 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 5, 4, 1, 4, 8, 9, 8, 1, 5, 12, 17, 17, 12, 1, 6, 17, 29, 34, 29, 21, 1, 7, 23, 46, 63, 63, 50, 33, 1, 8, 30, 69, 109, 126, 113, 83, 55, 1, 9, 38, 99, 178, 235, 239, 196, 138, 88, 1, 10, 47, 137, 277, 413, 474, 435, 334, 226, 144
Offset: 0

Views

Author

Johannes W. Meijer, Oct 19 2013

Keywords

Comments

The right hand columns of triangle T(n, k) represent the Kn2p sums of the ‘Races with Ties’ triangle A035317. See A180662 for the definitions of these sums.
The row sums lead to A094687, the convolution of Fibonacci and Jacobsthal numbers, and the alternating row sums lead to A008346.
The backwards antidiagonal sums equal Kn21(n) = (-1)^n*A175722(n).

Examples

			The first few rows of triangle T(n, k), n >= 0 and 0 <= k <= n.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1
1|  1,  1
2|  1,  2,  3
3|  1,  3,  5,   4
4|  1,  4,  8,   9,   8
5|  1,  5, 12,  17,  17,   12
6|  1,  6, 17,  29,  34,   29,   21
7|  1,  7, 23,  46,  63,   63,   50,   33
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
n/k 0   1   2    3    4     5     6     7
------------------------------------------------
0|  1,  1,  3,   4,   8,   12,   21,   33
1|  1,  2,  5,   9,  17,   29,   50,   83
2|  1,  3,  8,  17,  34,   63,  113,  196
3|  1,  4, 12,  29,  63,  126,  239,  435
4|  1,  5, 17,  46, 109,  235,  474,  909
5|  1,  6, 23,  69, 178,  413,  887, 1796
6|  1,  7, 30,  99, 277,  690, 1577, 3373
7|  1,  8, 38, 137, 414, 1104, 2681, 6054
		

Crossrefs

Cf. (Triangle columns) A000012, A000027, A089071, A052952, A129696

Programs

  • Maple
    T:= proc(n, k) option remember: if k=0 then return(1) elif k=n then return(combinat[fibonacci](n+2) - (1-(-1)^n)/2) else procname(n-1,k-1)+procname(n-1,k) fi: end: seq(seq(T(n, k), k=0..n), n=0..10); # End first program.
    T := proc(n, k): add(A035317(k-p+n-k, k-2*p), p=0..floor(k/2)) end: A035317 := proc(n, k): add((-1)^(i+k) * binomial(i+n-k+1, i), i=0..k) end: seq(seq(T(n, k), k=0..n), n=0..10); # End second program.

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k) with T(n, 0) = 1 and T(n, n) = F(n+2) - (1-(-1)^n)/2 = A052952(n), with F(n) = A000045(n), the Fibonacci numbers, n >= 0 and 0 <= k <= n.
T(n+p-1, n) = sum(A035317(n-k+p-1, n-2*k), k=0..floor(n/2)), n >= 0 and p >= 1.
The triangle as a square array Tsq(n, k) = T(n+k, k), n >= 0 and k >= 0.
Tsq(n, k) = sum(Tsq(n-1, i), i=0..k), n >= 1 and k >= 0, with Tsq(0, k) = A052952(k).
Tsq(n, k) = sum(A035317(n+k-i, k-2*i), i=0..floor(k/2)), n >= 0 and k >= 0.
Tsq(n, k) = A052952(2*n+k) - sum(A035317(n+k+i+1, k+2*i+2), i = 0..n-1)
The G.f. generates the terms in the n-th row of the square array Tsq(n, k).
G.f.: (-1)^(n)/((-1+x+x^2)*(x+1)*(x-1)^(n+1)), n >= 0.

A275346 In Go, minimum total number of liberties player 1 (black) can have on a standard 19 X 19 board after n moves when no player passes a move, with no repeating game positions allowed.

Original entry on oeis.org

2, 1, 2, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
Offset: 1

Views

Author

Felix Fröhlich, Jul 24 2016

Keywords

Comments

For many small n, a(n) = 0 when n is even and a(n) = 1 when n is odd, because a row of black stones can be played on the outer line of the board with a row of white stones running adjacent to the black stones, as in the following diagram:
B--B--W
|
B--W
|
B--W
|
B--W
|
o
What is the asymptotic behavior of this sequence?
Does a(n) exist for all n or does a constant c exist such that a(n) is undefined for n >= c (because no more legal moves are possible)?

Examples

			n=1: B--o
     |
     o
n=2: B--o  B--W
     |     |
     o     o
n=3: B--o  B--W  B--W
     |     |     |
     o     o     B--o
                 |
                 o
n=4: B--o  B--W  B--W  B--W
     |     |     |     |
     o     o     B--o  B--W
                 |     |
                 o     o
n=5: o     o     B--o  B--o  B--B--o
     |     |     |     |     |  |
     B--o  B--o  B--o  B--W  B--W
     |     |     |     |     |
     o     W     W     W     W
n=6: o     o     o--B--o  o--B--o  B--B--o  .--.--W
     |     |     |  |     |  |     |  |     |  |
     B--o  B--o  B--o     B--W     B--W     .--W
     |     |     |        |        |        |
     o     W     W        W        W        W
		

Crossrefs

Showing 1-10 of 13 results. Next