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

A157898 Triangle read by rows: inverse binomial transform of A059576.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 0, 2, 2, 4, 1, 2, 6, 4, 8, 0, 3, 6, 16, 8, 16, 1, 3, 12, 16, 40, 16, 32, 0, 4, 12, 40, 40, 96, 32, 64, 1, 4, 20, 40, 120, 96, 224, 64, 128, 0, 5, 20, 80, 120, 336, 224, 512, 128, 256
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Mar 08 2009

Keywords

Comments

The inverse binomial transform of the triangle A059576 is given by multiplying the triangle with A130595 from the left.

Examples

			First few rows of the triangle =
  1;
  0, 1;
  1, 1,  2;
  0, 2,  2,  4;
  1, 2,  6,  4,   8;
  0, 3,  6, 16,   8,  16;
  1, 3, 12, 16,  40,  16,  32;
  0, 4, 12, 40,  40,  96,  32,  64;
  1, 4, 20, 40, 120,  96, 224,  64, 128;
  0, 5, 20, 80, 120, 336, 224, 512, 128, 256;
  ...
		

Crossrefs

Programs

  • Magma
    A011782:= func< n | n eq 0 select 1 else 2^(n-1) >;
    function t(n, k) // t = A059576
      if k eq 0 or k eq n then return A011782(n);
      else return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1);
      end if; return t;
    end function;
    A157898:= func< n,k | (&+[(-1)^(n-j)*Binomial(n,j)*t(j,k): j in [k..n]]) >;
    [A157898(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 03 2022
    
  • Maple
    A059576 := proc (n, k)
        if n = 0 then
            return 1;
        end if;
        if k <= n and k >= 0 then
            add((-1)^j*2^(n-j-1)*binomial(k, j)*binomial(n-j, k), j = 0 .. min(k, n-k))
        else
            0 ;
        end if
    end proc:
    A157898 := proc(n,k)
        add ( A130595(n,j)*A059576(j,k),j=k..n) ;
    end proc: # R. J. Mathar, Feb 13 2013
  • Mathematica
    t[n_, k_]:= t[n, k]= If[k==0 || k==n, 2^(n-1) +Boole[n==0]/2, 2*t[n-1, k-1] + 2*t[n-1, k] -(2 -Boole[n==2])*t[n-2, k-1]]; (* t= A059576 *)
    A157898[n_, k_]:= A157898[n, k]= Sum[(-1)^(n-j)*Binomial[n,j]*t[j,k], {j,k,n}];
    Table[A157898[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 03 2022 *)
  • SageMath
    @CachedFunction
    def t(n, k): # t = A059576
        if (k==0 or k==n): return bool(n==0)/2 + 2^(n-1) # A011782
        else: return 2*t(n-1, k-1) + 2*t(n-1, k) - (2 - 0^(n-2))*t(n-2, k-1)
    def A157898(n,k): return sum((-1)^(n-j)*binomial(n,j)*t(j,k) for j in (k..n))
    flatten([[A157898(n, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 03 2022

Formula

Sum_{k=0..n} T(n, k) = A097076(n+1).
From G. C. Greubel, Sep 03 2022: (Start)
T(n, k) = Sum_{j=k..n} (-1)^(n-j)*binomial(n,j)*A059576(j,k).
T(n, 0) = A059841(n).
T(n, 1) = A004526(n-1).
T(n, 2) = 2*A008805(n-2).
T(n, 3) = 4*A058187(n-3).
T(n, 4) = 8*A189976(n+4).
T(n, n) = A011782(n).
T(n, n-1) = A011782(n) - [n==0]. (End)

A074206 Kalmár's [Kalmar's] problem: number of ordered factorizations of n.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 8, 1, 3, 3, 8, 1, 8, 1, 8, 3, 3, 1, 20, 2, 3, 4, 8, 1, 13, 1, 16, 3, 3, 3, 26, 1, 3, 3, 20, 1, 13, 1, 8, 8, 3, 1, 48, 2, 8, 3, 8, 1, 20, 3, 20, 3, 3, 1, 44, 1, 3, 8, 32, 3, 13, 1, 8, 3, 13, 1, 76, 1, 3, 8, 8, 3, 13, 1, 48, 8, 3, 1, 44, 3, 3, 3, 20, 1, 44, 3, 8, 3, 3, 3, 112
Offset: 0

Views

Author

N. J. A. Sloane, Apr 29 2003

Keywords

Comments

a(0)=0, a(1)=1; thereafter a(n) is the number of ordered factorizations of n as a product of integers greater than 1.
Kalmár (1931) seems to be the earliest reference that mentions this sequence (as opposed to A002033). - N. J. A. Sloane, May 05 2016
a(n) is the permanent of the n-1 X n-1 matrix A with (i,j) entry = 1 if j|i+1 and = 0 otherwise. This is because ordered factorizations correspond to nonzero elementary products in the permanent. For example, with n=6, 3*2 -> 1,3,6 [partial products] -> 6,3,1 [reverse list] -> (6,3)(3,1) [partition into pairs with offset 1] -> (5,3)(2,1) [decrement first entry] -> (5,3)(2,1)(1,2)(3,4)(4,5) [append pairs (i,i+1) to get a permutation] -> elementary product A(1,2)A(2,1)A(3,4)A(4,5)A(5,3). - David Callan, Oct 19 2005
This sequence is important in describing the amount of energy in all wave structures in the Universe according to harmonics theory. - Ray Tomes (ray(AT)tomes.biz), Jul 22 2007
a(n) appears to be the number of permutation matrices contributing to the Moebius function. See A008683 for more information. Also a(n) appears to be the Moebius transform of A067824. Furthermore it appears that except for the first term a(n)=A067824(n)*(1/2). Are there other sequences such that when the Moebius transform is applied, the new sequence is also a constant factor times the starting sequence? - Mats Granvik, Jan 01 2009
Numbers divisible by n distinct primes appear to have ordered factorization values that can be found in an n-dimensional summatory Pascal triangle. For example, the ordered factorization values for numbers divisible by two distinct primes can be found in table A059576. - Mats Granvik, Sep 06 2009
Inverse Mobius transform of A174725 and also except for the first term, inverse Mobius transform of A174726. - Mats Granvik, Mar 28 2010
a(n) is a lower bound on the worst-case number of solutions to the probed partial digest problem for n fragments of DNA; see the Newberg & Naor reference, below. - Lee A. Newberg, Aug 02 2011
All integers greater than 1 are perfect numbers over this sequence (for definition of A-perfect numbers, see comment to A175522). - Vladimir Shevelev, Aug 03 2011
If n is squarefree, then a(n) = A000670(A001221(n)) = A000670(A001222(n)). - Vladimir Shevelev and Franklin T. Adams-Watters, Aug 05 2011
A034776 lists the values taken by this sequence. - Robert G. Wilson v, Jun 02 2012
From Gus Wiseman, Aug 25 2020: (Start)
Also the number of strict chains of divisors from n to 1. For example, the a(n) chains for n = 1, 2, 4, 6, 8, 12, 30 are:
1 2/1 4/1 6/1 8/1 12/1 30/1
4/2/1 6/2/1 8/2/1 12/2/1 30/2/1
6/3/1 8/4/1 12/3/1 30/3/1
8/4/2/1 12/4/1 30/5/1
12/6/1 30/6/1
12/4/2/1 30/10/1
12/6/2/1 30/15/1
12/6/3/1 30/6/2/1
30/6/3/1
30/10/2/1
30/10/5/1
30/15/3/1
30/15/5/1
(End)
a(n) is also the number of ways to tile a strip of length log(n) with tiles having lengths {log(k) : k>=2}. - David Bevan, Jan 07 2025

Examples

			G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + 3*x^6 + x^7 + 4*x^8 + 2*x^9 + 3*x^10 + ...
Number of ordered factorizations of 8 is 4: 8 = 2*4 = 4*2 = 2*2*2.
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 126, see #27.
  • R. Honsberger, Mathematical Gems III, M.A.A., 1985, p. 141.
  • Kalmár, Laszlo, A "factorisatio numerorum" problemajarol [Hungarian], Matemat. Fizik. Lapok, 38 (1931), 1-15.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 124.

Crossrefs

Apart from initial term, same as A002033.
a(A002110) = A000670, row sums of A251683.
A173382 (and A025523) gives partial sums.
A124433 has these as unsigned row sums.
A334996 has these as row sums.
A001055 counts factorizations.
A001222 counts prime factors with multiplicity.
A008480 counts ordered prime factorizations.
A067824 counts strict chains of divisors starting with n.
A122651 counts strict chains of divisors summing to n.
A253249 counts strict chains of divisors.

Programs

  • Haskell
    a074206 n | n <= 1 = n
    | otherwise = 1 + (sum $ map (a074206 . (div n)) $
    tail $ a027751_row n)
    -- Reinhard Zumkeller, Oct 01 2012
    
  • Maple
    a := array(1..150): for k from 1 to 150 do a[k] := 0 od: a[1] := 1: for j from 2 to 150 do for m from 1 to j-1 do if j mod m = 0 then a[j] := a[j]+a[m] fi: od: od: for k from 1 to 150 do printf(`%d,`,a[k]) od: # James Sellers, Dec 07 2000
    A074206:= proc(n) option remember; if n > 1 then `+`(op(apply(A074206, numtheory[divisors](n)[1..-2]))) else n fi end: # M. F. Hasler, Oct 12 2018
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = a /@ Most[Divisors[n]] // Total; a /@ Range[20000] (* N. J. A. Sloane, May 04 2016, based on program in A002033 *)
    ccc[n_]:=Switch[n,0,{},1,{{1}},,Join@@Table[Prepend[#,n]&/@ccc[d],{d,Most[Divisors[n]]}]]; Table[Length[ccc[n]],{n,0,100}] (* _Gus Wiseman, Aug 25 2020 *)
  • PARI
    A=vector(100);A[1]=1; for(n=2,#A,A[n]=1+sumdiv(n,d,A[d])); A/=2; A[1]=1; concat(0,A) \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    {a(n) = if( n<2, n>0, my(A = divisors(n)); sum(k=1, #A-1, a(A[k])))}; /* Michael Somos, Dec 26 2016 */
    
  • PARI
    A074206(n)=if(n>1, sumdiv(n, i, if(iA074206(i))),n) \\ M. F. Hasler, Oct 12 2018
    
  • PARI
    A74206=[1]; A074206(n)={if(#A74206A074206(i)))} \\ Use memoization for computing many values. - M. F. Hasler, Oct 12 2018
    
  • PARI
    first(n) = {my(res = vector(n, i, 1)); for(i = 2, n, for(j = 2, n \ i, res[i*j] += res[i])); concat(0, res)} \\ David A. Corneth, Oct 13 2018
    
  • PARI
    first(n) = {my(res = vector(n, i, 1)); for(i = 2, n, d = divisors(i); res[i] += sum(j = 1, #d-1, res[d[j]])); concat(0, res)} \\ somewhat faster than progs above for finding first terms of n. \\ David A. Corneth, Oct 12 2018
    
  • PARI
    a(n)={if(!n, 0, my(sig=factor(n)[,2], m=vecsum(sig)); sum(k=0, m, prod(i=1, #sig, binomial(sig[i]+k-1, k-1))*sum(r=k, m, binomial(r,k)*(-1)^(r-k))))} \\ Andrew Howroyd, Aug 30 2020
    
  • Python
    from math import prod
    from functools import lru_cache
    from sympy import divisors, factorint, prime
    @lru_cache(maxsize=None)
    def A074206(n): return sum(A074206(d) for d in divisors(prod(prime(i+1)**e for i,e in enumerate(sorted(factorint(n).values(),reverse=True))),generator=True,proper=True)) if n > 1 else n # Chai Wah Wu, Sep 16 2022
  • SageMath
    @cached_function
    def minus_mu(n):
        if n < 2: return n
        return sum(minus_mu(d) for d in divisors(n)[:-1])
    # Note that changing the sign of the sum gives the Möbius function A008683.
    print([minus_mu(n) for n in (0..96)]) # Peter Luschny, Dec 26 2016
    

Formula

With different offset: a(n) = sum of all a(i) such that i divides n and i < n. - Clark Kimberling
a(p^k) = 2^(k-1) if k>0 and p is a prime.
Dirichlet g.f.: 1/(2-zeta(s)). - Herbert S. Wilf, Apr 29 2003
a(n) = A067824(n)/2 for n>1; a(A122408(n)) = A122408(n)/2. - Reinhard Zumkeller, Sep 03 2006
If p,q,r,... are distinct primes, then a(p*q)=3, a(p^2*q)=8, a(p*q*r)=13, a(p^3*q)=20, etc. - Vladimir Shevelev, Aug 03 2011 [corrected by Charles R Greathouse IV, Jun 02 2012]
a(0) = 0, a(1) = 1; a(n) = [x^n] Sum_{k=1..n-1} a(k)*x^k/(1 - x^k). - Ilya Gutkovskiy, Dec 11 2017
a(n) = a(A046523(n)); a(A025487(n)) = A050324(n): a(n) depends only on the nonzero exponents in the prime factorization of n, more precisely prime signature of n, cf. A124010 and A320390. - M. F. Hasler, Oct 12 2018
a(n) = A000670(A001221(n)) for squarefree n. In particular a(A002110(n)) = A000670(n). - Amiram Eldar, May 13 2019
a(n) = A050369(n)/n, for n>=1. - Ridouane Oudra, Aug 31 2019
a(n) = A361665(A181819(n)). - Pontus von Brömssen, Mar 25 2023
From Ridouane Oudra, Nov 02 2023: (Start)
If p,q are distinct primes, and n,m>0 then we have:
a(p^n*q^m) = Sum_{k=0..min(n,m)} 2^(n+m-k-1)*binomial(n,k)*binomial(m,k);
More generally: let tau[k](n) denote the number of ordered factorizations of n as a product of k terms, also named the k-th Piltz function (see A007425), then we have for n>1:
a(n) = Sum_{j=1..bigomega(n)} Sum_{k=1..j} (-1)^(j-k)*binomial(j,k)*tau[k](n), or
a(n) = Sum_{j=1..bigomega(n)} Sum_{k=0..j-1} (-1)^k*binomial(j,k)*tau[j-k](n). (End)

Extensions

Originally this sequence was merged with A002033, the number of perfect partitions. Herbert S. Wilf suggested that it warrants an entry of its own.

A003480 a(0) = 1, a(1) = 2, for n > 1, a(n) = 4*a(n-1) - 2*a(n-2).

Original entry on oeis.org

1, 2, 7, 24, 82, 280, 956, 3264, 11144, 38048, 129904, 443520, 1514272, 5170048, 17651648, 60266496, 205762688, 702517760, 2398545664, 8189147136, 27959497216, 95459694592, 325919783936, 1112759746560, 3799199418368, 12971278180352, 44286713884672, 151204299177984
Offset: 0

Views

Author

Keywords

Comments

Gives the number of L-convex polyominoes with n cells, that is convex polyominoes where any two cells can be connected by a path internal to the polyomino and which has at most 1 change of direction (i.e., one of the four orientation of the L). - Simone Rinaldi (rinaldi(AT)unisi.it), Feb 19 2007
Joe Keane (jgk(AT)jgk.org) observes that this sequence (beginning at 2) is "size of raises in pot-limit poker, one blind, maximum raising".
Dimensions of the graded components of the Hopf algebra of noncommutative multi-symmetric functions of level 2. For level r, the sequence would be the INVERT transform of binomial(n+r-1,n). - Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Jun 26 2008
The sum of the numbers in the n-th row of the summatory Pascal triangle (A059576). - Ron R. King, Jan 22 2009
(1 + 2x + 7x^2 + 24x^3 + ...) = 1 / (1 - 2x - 3x^2 - 4x^3 - ...). - Gary W. Adamson, Jul 27 2009
Let M be a triangle with the odd-indexed Fibonacci numbers (1, 2, 5, 13, ...) in every column, with the leftmost column shifted upwards one row. A003480 = lim_{n->oo} M^n, the left-shifted vector considered as a sequence. The analogous operation using the even-indexed Fibonacci numbers generates A001835 starting with offset 1. - Gary W. Adamson, Jul 27 2010
a(n) is the number of generalized compositions of n when there are i+1 different types of the part i, (i=1,2,...). - Milan Janjic, Sep 24 2010
Let h(t) = (1-t)^2/(2*(1-t)^2-1) = 1/(1-(2*t + 3*t^2 + 4*t^3 + ...)),
an o.g.f. for A003480, then
A001003(n) = (1/n!)*((h(t)*d/dt)^n) t, evaluated at t=0, with initial n=1. - Tom Copeland, Sep 06 2011
Excluding the initial 1, a(n) is the 2nd subdiagonal of A228405. - Richard R. Forberg, Sep 02 2013

References

  • G. Castiglione and A. Restivo, L-convex polyominoes: a survey, Chapter 2 of K. G. Subranian et al., eds., Formal Models, Languages and Applications, World Scientific, 2015.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A059576 and of A181289. Second differences of A007070.
Column k=2 of A261780.

Programs

  • Haskell
    a003480 n = a003480_list !! n
    a003480_list = 1 : 2 : 7 : (tail $ zipWith (-)
       (tail $ map (* 4) a003480_list) (map (* 2) a003480_list))
    -- Reinhard Zumkeller, Jan 16 2012, Oct 03 2011
  • Maple
    INVERT([seq(n+1,n=1..20)]); # Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Jun 26 2008
  • Mathematica
    a[0]=1; a[1]=2; a[2]=7; a[n_]:=a[n]=4*a[n-1] - 2*a[n-2]; Table[a[n],{n,0,24}] (* Jean-François Alcover, Mar 22 2011 *)
    Join[{1},LinearRecurrence[{4,-2},{2,7},40]] (* Harvey P. Dale, Oct 23 2011 *)
  • PARI
    a(n)=polcoeff((1-x)^2/(1-4*x+2*x^2)+x*O(x^n),n)
    
  • PARI
    a(n)=local(x); if(n<1,n==0,x=(2+quadgen(8))^n; imag(x)+real(x)/2)
    

Formula

a(n) = (n+1)*a(0) + n*a(1) + ... + 3*a(n-2) + 2*a(n-1). - Amarnath Murthy, Aug 17 2002
G.f.: (1-x)^2/(1-4*x+2*x^2). - Simon Plouffe in his 1992 dissertation
a(n) = A007070(n)/2, n > 0.
G.f.: 1/( 1 - Sum_{k>=1} (k+1)*x^k ).
a(n+1)*a(n+1) - a(n+2)*a(n) = 2^n, n > 0. - D. G. Rogers, Jul 12 2004
For n > 0, a(n) = ((2+sqrt(2))^(n+1) - (2-sqrt(2))^(n+1))/(4*sqrt(2)). - Rolf Pleisch, Aug 03 2009
If the leading 1 is removed, 2, 7, 24, ... is the binomial transform of 2, 5, 12, 29, ..., which is A000129 without its first 2 terms, and the second binomial transform of 2, 3, 4, 6, ..., which is A029744, again without its leading 1. - Al Hakanson (hawkuu(AT)gmail.com), Aug 08 2009
a(n) = Sum((1+p_1)*(1+p_2)*...*(1+p_m)), summation being over all compositions (p_1, p_2, ..., p_m) of n. Example: a(3)=24; indeed, the compositions of 3 are (1,1,1), (1,2), (2,1), (3) and we have 2*2*2 + 2*3 + 3*2 + 4 = 24. - Emeric Deutsch, Oct 17 2010
a(n) = Sum_{k>=0} binomial(n+2*k-1,n) / 2^(k+1). - Vaclav Kotesovec, Dec 31 2013
E.g.f.: (1 + exp(2*x)*(cosh(sqrt(2)*x) + sqrt(2)*sinh(sqrt(2)*x)))/2. - Stefano Spezia, May 20 2024

A049600 Array T read by diagonals; T(i,j) is the number of paths from (0,0) to (i,j) consisting of nonvertical segments (x(k),y(k))-to-(x(k+1),y(k+1)) such that 0 = x(1) < x(2) < ... < x(n-1) < x(n)=i, 0 = y(1) <= y(2) <= ... <= y(n-1) <= y(n)=j, for i >= 0, j >= 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 1, 3, 4, 0, 1, 4, 8, 8, 0, 1, 5, 13, 20, 16, 0, 1, 6, 19, 38, 48, 32, 0, 1, 7, 26, 63, 104, 112, 64, 0, 1, 8, 34, 96, 192, 272, 256, 128, 0, 1, 9, 43, 138, 321, 552, 688, 576, 256, 0, 1, 10, 53, 190, 501, 1002, 1520, 1696, 1280, 512
Offset: 0

Views

Author

Keywords

Comments

Essentially array A059576 divided by sequence A011782.
[Hetyei] calls a variant of this array (omitting the initial row of zeros) the asymmetric Delannoy numbers and shows how they arise in certain lattice path enumeration problems and a face enumeration problem associated to Jacobi polynomials. - Peter Bala, Oct 29 2008
Essentially triangle in A208341. - Philippe Deléham, Mar 23 2012
T(n+k,n) is the dot product of a vector from the n-th row of Pascal's triangle A007318 with a vector created by the first n+1 values evaluated from the cycle index of symmetry group S(k). Example: T(4+3,4) = T(7,4) = {1,4,6,4,1}.{1,4,10,20,35} = 192. - Richard Turk, Sep 21 2017
The formula T(n,k) = Sum_{r=0..n-1} C(k+r,r)*C(n-1,r) (Paul D. Hanna, Oct 06 2006) counts the paths of the title by number, r, of interior vertices in the path. - David Callan, Nov 25 2021

Examples

			Diagonals (each starting on row 1): {0}; {0,1}; {0,1,2}; ...
Array begins:
    0     0     0     0     0     0     0     0     0     0     0 ...
    1     1     1     1     1     1     1     1     1     1     1 ...
    2     3     4     5     6     7     8     9    10    11    12 ...
    4     8    13    19    26    34    43    53    64    76    89 ...
    8    20    38    63    96   138   190   253   328   416   518 ...
   16    48   104   192   321   501   743  1059  1462  1966  2586 ...
   32   112   272   552  1002  1683  2668  4043  5908  8378 11584 ...
   64   256   688  1520  2972  5336  8989 14407 22180 33028 47818 ...
Triangle begins:
  0;
  0, 1;
  0, 1, 2;
  0, 1, 3,  4;
  0, 1, 4,  8,  8;
  0, 1, 5, 13, 20,  16;
  0, 1, 6, 19, 38,  48,  32;
  0, 1, 7, 26, 63, 104, 112, 64;
  ...
(1, 0, -1/2, 1/2, 0, 0, 0, ...) DELTA (0, 2, 0, 0, 0, ...) where DELTA is the operator defined in A084938 begins:
  1;
  1, 0;
  1, 2,  0;
  1, 3,  4,  0;
  1, 4,  8,  8,   0;
  1, 5, 13, 20,  16,   0;
  1, 6, 19, 38,  48,  32,  0;
  1, 7, 26, 63, 104, 112, 64, 0;
		

Crossrefs

Diagonal sums are even-indexed Fibonacci numbers. Alternating (+-) diagonal sums are signed Fibonacci numbers.
T(n, n-1) = A001850(n) (Delannoy numbers). T(n, n)=A047781. Cf. A035028, A055587.

Programs

  • Haskell
    a049600 n k = a049600_tabl !! n !! k
    a049600_row n = a049600_tabl !! n
    a049600_tabl = [0] : map (0 :) a208341_tabl
    -- Reinhard Zumkeller, Apr 15 2014
  • Maple
    A049600 := proc(n,k)
        add(binomial(k+j,j)*binomial(n-1,j),j=0..n-1) ;
    end proc: # R. J. Mathar, Oct 26 2015
  • Mathematica
    t[n_, k_] := Hypergeometric2F1[ n-k+1, 1-k, 1, -1] // Floor; Table[t[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 09 2013 *)
    t[n_, k_] := Sum[LaguerreL[n-k, i, 0]* LaguerreL[k-i, i, 0], {i,0,k}] //Floor; Table[t[n,k], {n, 0, 16}, {k, -1, n}] (* Richard Turk, Sep 08 2017 *)
    T[n_, k_] := If[k == 0, 0, JacobiP[k - 1, 0, 1 - 2*k + n, 3]];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Peter Luschny, Nov 25 2021 *)
  • PARI
    {A(i, j) = polcoeff( (x / (1 - 2*x)) * ((1 - x) / (1 - 2*x))^j + x * O(x^i), i)}; /* Michael Somos, Oct 01 2003 */
    
  • PARI
    T(n,k)=sum(j=0,n-1,binomial(k+j,j)*binomial(n-1,j)) \\ Paul D. Hanna, Oct 06 2006
    

Formula

T(n,k) = Sum_{j=0..n-1} C(k+j,j)*C(n-1,j). - Paul D. Hanna, Oct 06 2006
T(i,j) = 2*T(i-1,j) + T(i,j-1) - T(i-1,j-1) with T(0,0)=1 and T(i,j)=0 if one of i,j<0. - Theodore Kolokolnikov, Jul 05 2010
O.g.f.: t*x/(1 - (2*t+1)*x + t*x^2) = t*x + (t + 2*t^2)*x^2 + (t + 3*t^2 + 4*t^3)*x^3 + .... Taking the row reverse of this triangle (with an additional column of 1's) gives A055587. - Peter Bala, Sep 10 2012
T(i,0) = 2^(i-1) and for j>0, T(i,j) = T(i,j-1) + Sum_{k=0..i-1} T(k,j). - Glen Whitney, Aug 17 2021
T(n, k) = JacobiP(k - 1, 0, 1 - 2*k + n, 3) for k >= 1. - Peter Luschny, Nov 25 2021

A052141 Number of paths from (0,0) to (n,n) that always move closer to (n,n) (and do not pass (n,n) and backtrack).

Original entry on oeis.org

1, 3, 26, 252, 2568, 26928, 287648, 3112896, 34013312, 374416128, 4145895936, 46127840256, 515268544512, 5775088103424, 64912164888576, 731420783788032, 8259345993203712, 93443504499523584, 1058972245409005568, 12019152955622817792, 136599995048232747008
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2000

Keywords

Comments

From Michel Marcus and Petros Hadjicostas, Jul 16 2020: (Start)
a(n) is the number of subdivisions of a 2 x n grid as defined in Robeva and Sun (2020). We have a(n) = A059576(n-1, n-1) for n >= 1 privided the latter is viewed as a square array (rather than a triangle).
In general, A059576(m-1, n-1) is the number of subdivisions of a 2-row grid with m points at the top row and n points at the bottom. (End)
The title condition is unclear: the path (0,0) -> (0,n) -> (n,n-1) -> (n,n) arguably meets the title condition but is not allowed, because steps with negative slope are proscribed. Steps must move east (slope 0) or have finite positive slope or move north (infinite slope). On the other hand, for lattice paths subject only to the condition that each successive point on the path is closer to the terminal point than its predecessor, see the question "Why are the numbers counting "ever-closer" lattice paths so round?" on the mathoverflow website. - David Callan, Nov 21 2021

References

  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Example 6.3.9.

Crossrefs

Main diagonal of A059576.
Column k=2 of A316674.

Programs

  • Magma
    [n eq 0 select 1 else 2^(n-1)*Evaluate(LegendrePolynomial(n), 3) : n in [0..40]]; // G. C. Greubel, May 21 2023
    
  • Mathematica
    a[0]=1; a[n_]:= Hypergeometric2F1[-n, n+1, 1, -1]*2^(n-1); Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Feb 23 2012, after Jon Stadler *)
    Table[2^(n-1)*LegendreP[n,3] +Boole[n==0]/2, {n,0,40}] (* G. C. Greubel, May 21 2023 *)
    CoefficientList[Series[(1+1/Sqrt[1-12x+4x^2])/2,{x,0,30}],x] (* Harvey P. Dale, Mar 10 2024 *)
  • SageMath
    def A052141(n): return 2^(n-1)*gen_legendre_P(n,0,3) + int(n==0)/2
    [A052141(n) for n in range(41)] # G. C. Greubel, May 21 2023

Formula

G.f.: (1/2)*( 1 + 1/sqrt(1 - 12*x + 4*x^2) ).
a(n) = 2^(n-1) * A001850(n). - Jon Stadler (jstadler(AT)capital.edu), Apr 30 2003
D-finite with recurrence: n*a(n) = 6*(2*n-1)*a(n-1) - 4*(n-1)*a(n-2). - Vaclav Kotesovec, Oct 08 2012
a(n) ~ sqrt(8+6*sqrt(2))*(6+4*sqrt(2))^n/(8*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 08 2012

A059474 Triangle read by rows: T(n,k) is coefficient of z^n*w^k in 1/(1 - 2*z - 2*w + 2*z*w) read by rows in order 00, 10, 01, 20, 11, 02, ...

Original entry on oeis.org

1, 2, 2, 4, 6, 4, 8, 16, 16, 8, 16, 40, 52, 40, 16, 32, 96, 152, 152, 96, 32, 64, 224, 416, 504, 416, 224, 64, 128, 512, 1088, 1536, 1536, 1088, 512, 128, 256, 1152, 2752, 4416, 5136, 4416, 2752, 1152, 256, 512, 2560, 6784, 12160, 16032, 16032, 12160, 6784, 2560, 512
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2001; revised Jun 12 2005

Keywords

Comments

Pascal-like triangle: start with 1 at top; every subsequent entry is the sum of everything above you, plus 1.

Examples

			Triangle begins as:
   n\k [0]  [1]  [2]  [3]  [4]  [5]  [6] ...
  [0]   1;
  [1]   2,   2;
  [2]   4,   6,   4;
  [3]   8,  16,  16,   8;
  [4]  16,  40,  52,  40,  16;
  [5]  32,  96, 152, 152,  96,  32;
  [6]  64, 224, 416, 504, 416, 224,  64;
       ...
		

Crossrefs

See A059576 for a similar triangle.

Programs

  • Magma
    A059474:= func< n,k | (&+[(-1)^j*2^(n-j)*Binomial(n-k,j)*Binomial(n-j,n-k): j in [0..n-k]]) >;
    [A059474(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, May 21 2023
    
  • Maple
    read transforms; SERIES2(1/(1-2*z-2*w+2*z*w),x,y,12): SERIES2TOLIST(%,x,y,12);
    # Alternative
    T := (n, k) -> 2^n*binomial(n, k)*hypergeom([-k, -n + k], [-n], 1/2):
    for n from 0 to 10 do seq(simplify(T(n, k)), k = 0 .. n) end do; # Peter Luschny, Nov 26 2021
  • Mathematica
    Table[(-1)^k*2^n*JacobiP[k, -n-1,0,0], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 04 2017; May 21 2023 *)
  • SageMath
    def A059474(n,k): return 2^n*binomial(n, k)*simplify(hypergeometric([-k, k-n], [-n], 1/2))
    flatten([[A059474(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, May 21 2023

Formula

G.f.: 1/(1 - 2*z - 2*w + 2*z*w).
T(n, k) = Sum_{j=0..n} (-1)^j*2^(n + k - j)*C(n, j)*C(n + k - j, n).
T(n, 0) = T(n, n) = A000079(n).
T(2*n, n) = A084773(n).
T(n, k) = 2^n*binomial(n, k)*hypergeom([-k, k - n], [-n], 1/2). - Peter Luschny, Nov 26 2021
From G. C. Greubel, May 21 2023: (Start)
T(n, n-k) = T(n, k).
Sum_{k=0..n} T(n, k) = A007070(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A077957(n).
T(n, 1) = A057711(n+1) = 2*A001792(n) - [n=0].
T(n, 2) = 4*A049611(n-1). (End)

A181292 The sum of the entries in the top rows of all 2-compositions of n. A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n.

Original entry on oeis.org

0, 1, 7, 36, 164, 700, 2868, 11424, 44576, 171216, 649520, 2439360, 9085632, 33605312, 123561536, 451998720, 1646101504, 5971400960, 21586910976, 77796897792, 279594972160, 1002326793216, 3585117623296, 12796737085440
Offset: 0

Views

Author

Emeric Deutsch, Oct 12 2010

Keywords

Examples

			a(2)=7 because the 2-compositions of 2, written as (top row / bottom row), are (0 / 2), (1 / 1), (2 / 0), (1,0 / 0,1), (0,1 / 1,0), (1,1 / 0,0), (0,0 / 1,1) and the sum of the entries in the top rows is 0 + 1 + 2 + 1 + 0 +0 +1 + 1 + 1 + 0 + 0 = 7.
		

Crossrefs

Programs

  • Maple
    g := z*(1-z)/(1-4*z+2*z^2)^2: gser := series(g, z = 0, 30): seq(coeff(gser, z, k), k = 0 .. 25);
  • Mathematica
    CoefficientList[Series[x(1-x)/(1-4x+2x^2)^2, {x, 0, 30}], x] (* Georg Fischer, May 19 2019 *)

Formula

a(n) = Sum_{k=0..n} k*A059576(n,k).
G.f.: z(1-z)/(1-4z+2z^2)^2. [Corrected by Georg Fischer, May 19 2019]

A192933 Triangle read by rows: T(n,k) = Sum_{i <= n, j <= k, (i,j) <> (n,k)} T(i,j), starting with T(1,1) = 1, for n >= 1 and 1 <= k <= n.

Original entry on oeis.org

1, 1, 2, 2, 6, 12, 4, 16, 44, 88, 8, 40, 136, 360, 720, 16, 96, 384, 1216, 3152, 6304, 32, 224, 1024, 3712, 11296, 28896, 57792, 64, 512, 2624, 10624, 36416, 108032, 273856, 547712, 128, 1152, 6528, 29056, 109696, 362624, 1056896, 2661504, 5323008, 256, 2560, 15872, 76800, 314880, 1135616, 3659776, 10528768, 26380544, 52761088
Offset: 1

Views

Author

Andrea Raffetti, Jul 13 2011

Keywords

Comments

The outer diagonal is A059435.
The second outer diagonal is A090442.
The third outer diagonal is essentially 2*A068766.
The first column is A011782.
The second column is essentially A057711 (not considering its first two terms).
The second column is essentially A129952 (not considering its first two terms).
The second column is essentially 2*A001792.
The differences between the terms of the second column is essentially 2*A045623.
The third column is essentially 4*A084266.
The cumulative sums of the third column are essentially 4*A176027.
T(n,k) = 0 for n < k. If this overriding constraint is not applied, you get A059576. - Franklin T. Adams-Watters, Jul 24 2011
For n >= 2 and 1 <= k <= n, T(n,k) is the number of bimonotone subdivisions of a 2-row grid with n points on the first row and k points on the second row (with the lower left point of the grid being the origin). A bimonotone subdivision of a convex polygon (the convex hull of the grid) is one where the internal dividing lines have nonnegative (including infinite) slopes. See Robeva and Sun (2020). - Petros Hadjicostas and Michel Marcus, Jul 15 2020

Examples

			Triangle (with rows n >= 1 and columns k = 1..n) begins:
   1;
   1,   2;
   2,   6,   12;
   4,  16,   44,    88;
   8,  40,  136,   360,   720;
  16,  96,  384,  1216,  3152,   6304;
  32, 224, 1024,  3712, 11296,  28896,  57792;
  64, 512, 2624, 10624, 36416, 108032, 273856, 547712;
  ...
Example: T(4,3) = 44 = 1 + 1 + 2 + 2 + 6 + 12 + 4 + 16.
From _Petros Hadjicostas_, Jul 15 2020: (Start)
Consider the following 2-row grid with n = 3 points at the top and k = 2 points at the bottom:
   A  B  C
   *--*--*
   |    /
   |   /
   *--*
   D  E
The sets of the dividing internal lines of the T(3,2) = 6 bimonotone subdivisions of the above 2-row grid are as follows: { }, {DC}, {DB}, {EB}, {DB, DC}, and {DB, EB}. We exclude subdivisions {EA} and {EA, EB} because they have at least one dividing line with a negative slope. (End)
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(T=matrix(nn, nn)); T[1,1] = 1; for (n=2, nn, for (k=1, n, T[n,k] = sum(i=1, n, sum(j=1, k, if ((i!=n) || (j!=k), T[i,j]))););); vector(nn, k, vector(k, i, T[k, i]));} \\ Michel Marcus, Mar 18 2020

Formula

T(n,1) = 2^(n-2) for n >= 2.
T(n,2) = n*2^(n-2) for n >= 2.
T(n,3) = 2^(n-2)*((n-k+1)^2 + 7*(n-k+1) + 4)/2 = 2^(n-3)*(n^2 + 3*n - 6) for k = 3 and n >= 3.
In general: For 1 <= k <= n with (n,k) <> 1,
T(n,k) = 2^(n-2)*Sum_{i=0..k-1} c(k,i)*(n-k+1)^(k-1-i)/(k-1)! and
T(n,k) = 2^(n-2)*Sum_{j=0..k-1} c(k,k-1-j)*(n-k+1)^j/(k-1)!
with c(k,i) being specific coefficients. Below are the first values for c(k,i):
1;
1, 1;
1, 7, 4;
1, 18, 77, 36;
1, 34, 359, 1238, 528,
1, 55, 1065, 8705, 26654, 10800;
... [Formula corrected by Petros Hadjicostas, Jul 15 2020]
The diagonal of this triangle for c(k,i) divided by (k-1)! (except for the first term) is equal to the Shroeder number sequence A006318(k-1).
From Petros Hadjicostas and Michel Marcus, Jul 15 2020: (Start)
T(n,1) = 2^(n-2) for n >= 2; T(n,k) = 2*(T(n,k-1) + T(n-1,k) - T(n-1,k-1)) for n > k >= 2; T(n,n) = 2*T(n,n-1) for n = k >= 2; and T(n,k) = 0 for 1 <= n < k. [Robeva and Sun (2020)] (They do not specify T(1,1) explicitly since they do not care about subdivisions of a degenerate polygon with only one side.)
T(n,k) = (2^(n-2)/(k-1)!) * P_k(n) = (2^(n-2)/(k-1)!) * Sum_{j=1..k} A336245(k,j)*n^(k-j) for n >= k >= 1 with (n,k) <> (1,1), where P_k(n) is some polynomial with integer coefficients of degree k-1. [Robeva and Sun (2020)]
A336245(k,j) = Sum_{s=0..j-1} c(k,s) * binomial(k-1-s, k-j) * (1-k)^(j-1-s) for 1 <= j <= k, in terms of the above coefficients c(k,i).
So c(k,s) = Sum_{j=1..s+1} A336245(k,j) * binomial(k-j, k-s-1) * (k-1)^(s+1-j) for k >= 1 and 0 <= s <= k-1, obtained by inverting the binomial transform.
Bivariate o.g.f.: x*y*(1 - x)*(1 - 2*y*g(2*x*y))/(1 - 2*x - 2*y + 2*x*y), where g(w) = 2/(1 + w + sqrt(1 - 6*w + w^2)) = g.f. of A001003.
Letting y = 1 in the above joint o.g.f., we get the o.g.f. of the row sums: x*(1-x)*(2*g(2*x) - 1). It can then be easily proved that
Sum_{k=1..n} T(n,k) = 2^n*A001003(n-1) - 2^(n-1)*A001003(n-2) for n >= 3. (End)

Extensions

Offset changed by Andrew Howroyd, Dec 31 2017
Name edited by Petros Hadjicostas, Jul 15 2020

A362242 Triangle read by rows: T(n,k) is the number of lattice paths from (0,0) to (k,n-k) using steps (i,j) with i,j>=0 and gcd(i,j)=1.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 6, 6, 1, 1, 10, 17, 10, 1, 1, 15, 39, 39, 15, 1, 1, 21, 76, 111, 76, 21, 1, 1, 28, 135, 266, 266, 135, 28, 1, 1, 36, 222, 566, 757, 566, 222, 36, 1, 1, 45, 346, 1100, 1876, 1876, 1100, 346, 45, 1, 1, 55, 515, 1997, 4197, 5321, 4197, 1997, 515, 55, 1
Offset: 0

Views

Author

Keith S. Reid, Apr 12 2023

Keywords

Comments

These are the lattice paths that move in straight lines between grid points. No distinction is made between a path passing through a grid point and a path stopping at the grid point. For example the path (0,0)->(2,2) is considered the same as (0,0)->(1,1)->(2,2).

Examples

			Triangle begins:
  1;
  1,  1;
  1,  3,  1;
  1,  6,  6,  1;
  1, 10, 17, 10,  1;
  1, 15, 39, 39, 15, 1;
  ...
There are three paths across a one by one lattice. There are six across a two by one lattice.
		

Crossrefs

Columns k=0..1 give: A000012, A000217.
T(2n,n) gives A368639.
Row sums give A368672.
Cf. A059576.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(min(n, k)=0, 1, add(add(
          `if`(igcd(i, j)=1, b(n-i, k-j), 0), j=0..k), i=0..n))
        end:
    T:= (n, k)-> b(k, n-k):
    seq(seq(T(n, k), k=0..n), n=0..10);  # Alois P. Heinz, Apr 26 2023
  • Mathematica
    b[n_, k_] := b[n, k] = If[Min[n, k] == 0, 1, Sum[Sum[If[GCD[i, j] == 1, b[n - i, k - j], 0], {j, 0, k}], {i, 0, n}]]; T[n_, k_] := b[k, n - k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Mar 16 2025, after Alois P. Heinz *)
  • PARI
    T(n)={my(v=vector(n)); v[1]=[1]; for(n=2, #v, v[n]=vector(n, k, sum(i=0, k-1, sum(j=0,n-k, if(gcd(i,j)==1, v[n-i-j][k-i] ) )))); v}
    { my(A=T(10)); for(i=1, #A, print(A[i])) } \\ Andrew Howroyd, Apr 12 2023

A336244 Triangle read by rows: row n gives coefficients T(n,k), in descending powers of m, of a polynomial Q_n(m) (of degree n - 1) in an expression for the number of subdivisions A(m,n) of a grid with two rows.

Original entry on oeis.org

1, 1, 1, 1, 5, 2, 1, 12, 29, 6, 1, 22, 131, 206, 24, 1, 35, 385, 1525, 1774, 120, 1, 51, 895, 6585, 19624, 18204, 720, 1, 70, 1792, 21070, 117019, 281260, 218868, 5040, 1, 92, 3234, 55496, 492849, 2210348, 4483436, 3036144, 40320
Offset: 1

Views

Author

Keywords

Comments

Let P_(m,n) denote a grid with 2 rows that has m points in the top row and n points in the bottom, aligned at the left, and let the bottom left point be at the origin.
For m > n, the number of subdivisions of P_(m,n) is given by A(m,n) = 2^(m-2)/(n-1)!*Q_n(m), where Q_n(m) is some monic polynomial of degree n-1. See Theorem 2, p. 6, in Robeva and Sun (2020).
By symmetry, A(m,n) = A(n,m). For more information and formulas, see A059576.

Examples

			Triangle T(n,k) (with rows n >= 1 and columns k = 1..n) begins
  1;
  1,  1;
  1,  5,   2;
  1, 12,  29,   6;
  1, 22, 131, 206, 24;
  ...
Q_3(m) = m^2 + 5*m + 2.
		

Crossrefs

Programs

  • Maple
    # We assume the rows indexed by the degree of the polynomials, n = 0,1,2,...
    A336244row := proc(n) local p, k, s, b; p := 1;
    b := n -> bernoulli(n, x+1) - bernoulli(n, 1);
    for k from 1 to n-1 do
      s := p + add(coeff(p, x, i-1)*b(i)/i, i=1..k-1);
      p := b(k) + k*s od;
    seq(coeff(p, x, n-i), i=1..n) end:
    seq(A336244row(n), n=0..9); # Peter Luschny, Jul 15 2020
  • Mathematica
    b[n_] := BernoulliB[n, x + 1] - BernoulliB[n, 1]; b[1] = x;
    row[n_] := Module[{p = 1, s}, Do[s = p + Sum[Coefficient[p, x, i-1] b[i]/i, {i, 1, k-1}]; p = b[k] + k s, {k, 1, n-1}]; CoefficientList[p, x] // Reverse];
    row /@ Range[9] // Flatten (* Jean-François Alcover, Aug 21 2020, after Peter Luschny *)
  • PARI
    polf(n) = if (n==0, return(m)); my(p=bernpol(n+1,m)); (subst(p, m, m+1) - subst(p, m, 0))/(n+1);  \\ Faulhaber
    tabl(nn) = {my(p = 1, q); for (n=1, nn, if (n==1, q = p, q = (n-1)*(p + polf(n-2) + sum(i=0, n-3, polcoef(p, i, m)*polf(i)))); print(Vec(q)); p = q;);}

Formula

A(m,n) = (2^(m-2)/(n-1)!) * Sum_{k=1..n} T(n,k)*m^(n-k).
A(m,n) = (2^(m-2)/(n-1)!) * Q_n(m) = A059576(m-1, n-1) (provided the latter is viewed as a square array rather than a triangle).
A(m,n) = (2^(m-2)/(n-2)!) * (Q_(n-1)(m) + Sum_{i=1..m} Q_(n-1)(i)).
A(m,n) = 2*(A(m,n-1) + A(m-1,n) - A(m-1,n-1)) for m > n.
T(n, 1) = 1 and T(n, n) = (n - 1)!.
Conjectures:
(a) T(n,2) = (n - 1)*(3*n - 4)/2.
(b) T(n,3) = (n - 2)*(n - 1)*(27*n^2 - 97*n + 72)/24.
(c) T(n,4) = (n - 3)*(n - 2)*(n - 1)^2*(27*n^2 - 156*n + 208)/48.
(d) T(n, n - 1) = (n - 1)!*Sum_{k=1..n-1} binomial(n-1, k)/k = A103213(n-1).
Showing 1-10 of 11 results. Next