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

A000012 The simplest sequence of positive numbers: the all 1's sequence.

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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 16 1994

Keywords

Comments

Number of ways of writing n as a product of primes.
Number of ways of writing n as a sum of distinct powers of 2.
Continued fraction for golden ratio A001622.
Partial sums of A000007 (characteristic function of 0). - Jeremy Gardiner, Sep 08 2002
An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - Don Reble, Apr 17 2005
Binomial transform of A000007; inverse binomial transform of A000079. - Philippe Deléham, Jul 07 2005
A063524(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2008
For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+1 n+2). Then a(n) = absolute value of det(M(n)). - K.V.Iyer, Apr 11 2009
The partial sums give the natural numbers (A000027). - Daniel Forgues, May 08 2009
From Enrique Pérez Herrero, Sep 04 2009: (Start)
a(n) is also tau_1(n) where tau_2(n) is A000005.
a(n) is a completely multiplicative arithmetical function.
a(n) is both squarefree and a perfect square. See A005117 and A000290. (End)
Also smallest divisor of n. - Juri-Stepan Gerasimov, Sep 07 2009
Also decimal expansion of 1/9. - Enrique Pérez Herrero, Sep 18 2009; corrected by Klaus Brockhaus, Apr 02 2010
a(n) is also the number of complete graphs on n nodes. - Pablo Chavez (pchavez(AT)cmu.edu), Sep 15 2009
Totally multiplicative sequence with a(p) = 1 for prime p. Totally multiplicative sequence with a(p) = a(p-1) for prime p. - Jaroslav Krizek, Oct 18 2009
n-th prime minus phi(prime(n)); number of divisors of n-th prime minus number of perfect partitions of n-th prime; the number of perfect partitions of n-th prime number; the number of perfect partitions of n-th noncomposite number. - Juri-Stepan Gerasimov, Oct 26 2009
For all n>0, the sequence of limit values for a(n) = n!*Sum_{k>=n} k/(k+1)!. Also, a(n) = n^0. - Harlan J. Brothers, Nov 01 2009
a(n) is also the number of 0-regular graphs on n vertices. - Jason Kimberley, Nov 07 2009
Differences between consecutive n. - Juri-Stepan Gerasimov, Dec 05 2009
From Matthew Vandermast, Oct 31 2010: (Start)
1) When sequence is read as a regular triangular array, T(n,k) is the coefficient of the k-th power in the expansion of (x^(n+1)-1)/(x-1).
2) Sequence can also be read as a uninomial array with rows of length 1, analogous to arrays of binomial, trinomial, etc., coefficients. In a q-nomial array, T(n,k) is the coefficient of the k-th power in the expansion of ((x^q -1)/(x-1))^n, and row n has a sum of q^n and a length of (q-1)*n + 1. (End)
The number of maximal self-avoiding walks from the NW to SW corners of a 2 X n grid.
When considered as a rectangular array, A000012 is a member of the chain of accumulation arrays that includes the multiplication table A003991 of the positive integers. The chain is ... < A185906 < A000007 < A000012 < A003991 < A098358 < A185904 < A185905 < ... (See A144112 for the definition of accumulation array.) - Clark Kimberling, Feb 06 2011
a(n) = A007310(n+1) (Modd 3) := A193680(A007310(n+1)), n>=0. For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the three residue classes Modd 3, called [0], [1], and [2], are shown in the array A088520, if there the third row is taken as class [0] after inclusion of 0. - Wolfdieter Lang, Feb 09 2012
Let M = Pascal's triangle without 1's (A014410) and V = a variant of the Bernoulli numbers A027641 but starting [1/2, 1/6, 0, -1/30, ...]. Then M*V = [1, 1, 1, 1, ...]. - Gary W. Adamson, Mar 05 2012
As a lower triangular array, T is an example of the fundamental generalized factorial matrices of A133314. Multiplying each n-th diagonal by t^n gives M(t) = I/(I-t*S) = I + t*S + (t*S)^2 + ... where S is the shift operator A129184, and T = M(1). The inverse of M(t) is obtained by multiplying the first subdiagonal of T by -t and the other subdiagonals by zero, so A167374 is the inverse of T. Multiplying by t^n/n! gives exp(t*S) with inverse exp(-t*S). - Tom Copeland, Nov 10 2012
The original definition of the meter was one ten-millionth of the distance from the Earth's equator to the North Pole. According to that historical definition, the length of one degree of latitude, that is, 60 nautical miles, would be exactly 111111.111... meters. - Jean-François Alcover, Jun 02 2013
Deficiency of 2^n. - Omar E. Pol, Jan 30 2014
Consider n >= 1 nonintersecting spheres each with surface area S. Define point p on sphere S_i to be a "public point" if and only if there exists a point q on sphere S_j, j != i, such that line segment pq INTERSECT S_i = {p} and pq INTERSECT S_j = {q}; otherwise, p is a "private point". The total surface area composed of exactly all private points on all n spheres is a(n)*S = S. ("The Private Planets Problem" in Zeitz.) - Rick L. Shepherd, May 29 2014
For n>0, digital roots of centered 9-gonal numbers (A060544). - Colin Barker, Jan 30 2015
Product of nonzero digits in base-2 representation of n. - Franklin T. Adams-Watters, May 16 2016
Alternating row sums of triangle A104684. - Wolfdieter Lang, Sep 11 2016
A fixed point of the run length transform. - Chai Wah Wu, Oct 21 2016
Length of period of continued fraction for sqrt(A002522) or sqrt(A002496). - A.H.M. Smeets, Oct 10 2017
a(n) is also the determinant of the (n+1) X (n+1) matrix M defined by M(i,j) = binomial(i,j) for 0 <= i,j <= n, since M is a lower triangular matrix with main diagonal all 1's. - Jianing Song, Jul 17 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = min(i,j) for 1 <= i,j <= n (see Xavier Merlin reference). - Bernard Schott, Dec 05 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = tau(gcd(i,j)) for 1 <= i,j <= n (see De Koninck & Mercier reference). - Bernard Schott, Dec 08 2020

Examples

			1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.
1/9 = 0.11111111111111...
From _Wolfdieter Lang_, Feb 09 2012: (Start)
Modd 7 for nonnegative odd numbers not divisible by 3:
A007310: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, ...
Modd 3:  1, 1, 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ...
(End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 692 pp. 90 and 297, Ellipses, Paris, 2004.
  • Xavier Merlin, Méthodix Algèbre, Exercice 1-a), page 153, Ellipses, Paris, 1995.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 277, 284.
  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
  • Paul Zeitz, The Art and Craft of Mathematical Problem Solving, The Great Courses, The Teaching Company, 2010 (DVDs and Course Guidebook, Lecture 6: "Pictures, Recasting, and Points of View", pp. 32-34).

Crossrefs

Programs

  • Haskell
    a000012 = const 1
    a000012_list = repeat 1 -- Reinhard Zumkeller, May 07 2012
    
  • Magma
    [1 : n in [0..100]];
    
  • Maple
    seq(1, i=0..150);
  • Mathematica
    Array[1 &, 50] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
  • Maxima
    makelist(1, n, 1, 30); /* Martin Ettl, Nov 07 2012 */
    
  • PARI
    {a(n) = 1};
    
  • Python
    print([1 for n in range(90)]) # Michael S. Branicky, Apr 04 2022

Formula

a(n) = 1.
G.f.: 1/(1-x).
E.g.f.: exp(x).
G.f.: Product_{k>=0} (1 + x^(2^k)). - Zak Seidov, Apr 06 2007
Completely multiplicative with a(p^e) = 1.
Regarded as a square array by antidiagonals, g.f. 1/((1-x)(1-y)), e.g.f. Sum T(n,m) x^n/n! y^m/m! = e^{x+y}, e.g.f. Sum T(n,m) x^n y^m/m! = e^y/(1-x). Regarded as a triangular array, g.f. 1/((1-x)(1-xy)), e.g.f. Sum T(n,m) x^n y^m/m! = e^{xy}/(1-x). - Franklin T. Adams-Watters, Feb 06 2006
Dirichlet g.f.: zeta(s). - Ilya Gutkovskiy, Aug 31 2016
a(n) = Sum_{l=1..n} (-1)^(l+1)*2*cos(Pi*l/(2*n+1)) = 1 identically in n >= 1 (for n=0 one has 0 from the undefined sum). From the Jolley reference, (429) p. 80. Interpretation: consider the n segments between x=0 and the n positive zeros of the Chebyshev polynomials S(2*n, x) (see A049310). Then the sum of the lengths of every other segment starting with the one ending in the largest zero (going from the right to the left) is 1. - Wolfdieter Lang, Sep 01 2016
As a lower triangular matrix, T = M*T^(-1)*M = M*A167374*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - Tom Copeland, Nov 15 2016

A027907 Triangle of trinomial coefficients T(n,k) (n >= 0, 0 <= k <= 2*n), read by rows: n-th row is obtained by expanding (1 + x + x^2)^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 3, 6, 7, 6, 3, 1, 1, 4, 10, 16, 19, 16, 10, 4, 1, 1, 5, 15, 30, 45, 51, 45, 30, 15, 5, 1, 1, 6, 21, 50, 90, 126, 141, 126, 90, 50, 21, 6, 1, 1, 7, 28, 77, 161, 266, 357, 393, 357, 266, 161, 77, 28, 7, 1, 1, 8, 36, 112, 266
Offset: 0

Views

Author

Keywords

Comments

When the rows are centered about their midpoints, each term is the sum of the three terms directly above it (assuming the undefined terms in the previous row are zeros). - N. J. A. Sloane, Dec 23 2021
T(n,k) = number of integer strings s(0),...,s(n) such that s(0)=0, s(n)=k, s(i) = s(i-1) + c, where c is 0, 1 or 2. Columns of T include A002426, A005717 and A014531.
Also number of ordered trees having n+1 leaves, all at level three and n+k+3 edges. Example: T(3,5)=3 because we have three ordered trees with 4 leaves, all at level three and 11 edges: the root r has three children; from one of these children two paths of length two are hanging (i.e., 3 possibilities) while from each of the other two children one path of length two is hanging. Diagonal sums are the tribonacci numbers; more precisely: Sum_{i=0..floor(2*n/3)} T(n-i,i) = A000073(n+2). - Emeric Deutsch, Jan 03 2004
T(n,k) = A111808(n,k) for 0 <= k <= n and T(n, 2*n-k) = A111808(n,k) for 0 <= k < n. - Reinhard Zumkeller, Aug 17 2005
The trinomial coefficients, T(n,i), are the absolute value of the coefficients of the chromatic polynomial of P_2 X P_n factored with x*(x-1)^i terms. Example: The chromatic polynomial of P_2 X P_2 is: x*(x-1) - 2*x*(x-1)^2 + x*(x-1)^3 and so T(1,0)=1, T(1,1)=2 and T(1,1) = 1. - Thomas J. Pfaff (tpfaff(AT)ithaca.edu), Oct 02 2006
T(n,k) is the number of distinct ways in which k unlabeled objects can be distributed in n labeled urns allowing at most 2 objects to fall into each urn. - N-E. Fahssi, Mar 16 2008
T(n,k) is the number of compositions of k into n parts p, each part 0 <= p <= 2. Adding 1 to each part, as a corollary, T(n,k) is the number of compositions of n+k into n parts p where 1 <= p <= 3. E.g., T(2,3)=2 since 5 = 3+2 = 2+3. - Steffen Eger, Jun 10 2011
Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (1,2). - Joerg Arndt, Jul 05 2011
Number of lattice paths from (0,0) to (2*n-k,k) using steps (2,0), (1,1), (0,2). - Werner Schulte, Jan 25 2017
T(n,k) is number of distinct ways to sum the integers -1, 0 , and 1 n times to obtain n-k, where T(n,0) = T(n,2*n+1) = 1. - William Boyles, Apr 23 2017
T(n-1,k-1) is the number of 2-compositions of n with 0's having k parts; see Hopkins & Ouvry reference. - Brian Hopkins, Aug 15 2020
T(n,k) is the number of ways to obtain a sum of n+k when throwing a 3-sided die n times. Follows from the "T(n,k) is the number of compositions of n+k into n parts p where 1 <= p <= 3" comment above. - Feryal Alayont, Dec 30 2024

Examples

			The triangle T(n, k) begins:
  n\k 0   1   2   3   4   5   6   7   8   9 10 11 12
  0:  1
  1:  1   1   1
  2:  1   2   3   2   1
  3:  1   3   6   7   6   3   1
  4:  1   4  10  16  19  16  10   4   1
  5:  1   5  15  30  45  51  45  30  15   5  1
  6:  1   6  21  50  90 126 141 126  90  50 21  6  1
Concatenated rows:
G.f. = 1 + (x^2+x+1)*x + (x^2+x+1)^2*x^4 + (x^2+x+1)^3*x^9 + ...
     = 1 + (x + x^2 + x^3) + (x^4 + 2*x^5 + 3*x^6 + 2*x^7 + x^8) +
  (x^9 + 3*x^10 + 6*x^11 + 7*x^12 + 6*x^13 + 3*x^14 + x^15) + ... .
As a centered triangle, this begins:
           1
        1  1  1
     1  2  3  2  1
  1  3  6  7  6  3  1
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • D. C. Fielder and C. O. Alford, Pascal's triangle: top gun or just one of the gang?, in G E Bergum et al., eds., Applications of Fibonacci Numbers Vol. 4 1991 pp. 77-90 (Kluwer).
  • L. Kleinrock, Uniform permutation of sequences, JPL Space Programs Summary, Vol. 37-64-III, Apr 30, 1970, pp. 32-43.

Crossrefs

Columns of T include A002426, A005717, A014531, A005581, A005712, etc. See also A035000, A008287.
First differences are in A025177. Pairwise sums are in A025564.

Programs

  • Haskell
    a027907 n k = a027907_tabf !! n !! k
    a027907_row n = a027907_tabf !! n
    a027907_tabf = [1] : iterate f [1, 1, 1] where
       f row = zipWith3 (((+) .) . (+))
                        (row ++ [0, 0]) ([0] ++ row ++ [0]) ([0, 0] ++ row)
    a027907_list = concat a027907_tabf
    -- Reinhard Zumkeller, Jul 06 2014, Jan 22 2013, Apr 02 2011
  • Maple
    A027907 := proc(n,k) expand((1+x+x^2)^n) ; coeftayl(%,x=0,k) ; end proc:
    seq(seq(A027907(n,k),k=0..2*n),n=0..5) ; # R. J. Mathar, Jun 13 2011
    T := (n,k) -> simplify(GegenbauerC(`if`(kPeter Luschny, May 08 2016
  • Mathematica
    Table[CoefficientList[Series[(Sum[x^i, {i, 0, 2}])^n, {x, 0, 2 n}], x], {n, 0, 10}] // Grid (* Geoffrey Critzer, Mar 31 2010 *)
    Table[Sum[Binomial[n, i]Binomial[n - i, k - 2i], {i, 0, n}], {n, 0, 10}, {k, 0, 2n}] (* Adi Dani, May 07 2011 *)
    T[ n_, k_] := If[ n < 0, 0, Coefficient[ (1 + x + x^2)^n, x, k]]; (* Michael Somos, Nov 08 2016 *)
    Flatten[DeleteCases[#,0]&/@CellularAutomaton[{Total[#] &, {}, 1}, {{1}, 0}, 8] ] (* Giorgos Kalogeropoulos, Nov 09 2021 *)
  • Maxima
    trinomial(n,k):=coeff(expand((1+x+x^2)^n),x,k);
    create_list(trinomial(n,k),n,0,8,k,0,2*n); /* Emanuele Munarini, Mar 15 2011 */
    
  • Maxima
    create_list(ultraspherical(k,-n,-1/2),n,0,6,k,0,2*n); /* Emanuele Munarini, Oct 18 2016 */
    
  • PARI
    {T(n, k) = if( n<0, 0, polcoeff( (1 + x + x^2)^n, k))}; /* Michael Somos, Jun 27 2003 */
    

Formula

G.f.: 1/(1-z*(1+w+w^2)).
T(n,k) = Sum_{r=0..floor(k/3)} (-1)^r*binomial(n, r)*binomial(k-3*r+n-1, n-1).
Recurrence: T(0,0) = 1; T(n,k) = T(n-1,k-2) + T(n-1,k-1) + T(n-1,k-0), with T(n,k) = 0 if k < 0 or k > 2*n:
T(i,0) = T(i, 2*i) = 1 for i >= 0, T(i, 1) = T(i, 2*i-1) = i for i >= 1 and for i >= 2 and 2 <= j <= i-2, T(i, j) = T(i-1, j-2) + T(i-1, j-1) + T(i-1, j).
The row sums are powers of 3 (A000244). - Gerald McGarvey, Aug 14 2004
T(n,k) = Sum_{i=0..floor(k/2)} binomial(n, 2*i+n-k) * binomial(2*i+n-k, i). - Ralf Stephan, Jan 26 2005
T(n,k) = Sum_{j=0..n} binomial(n, j) * binomial(j, k-j). - Paul Barry, May 21 2005
T(n,k) = Sum_{j=0..n} binomial(k-j, j) * binomial(n, k-j). - Paul Barry, Nov 04 2005
From Loic Turban (turban(AT)lpm.u-nancy.fr), Aug 31 2006: (Start)
T(n,k) = Sum_{j=0..n} (-1)^j * binomial(n,j) * binomial(2*n-2*j, k-j); (G. E. Andrews (1990)) obtained by expanding ((1+x)^2 - x)^n.
T(n,k) = Sum_{j=0..n} binomial(n,j) * binomial(n-j, k-2*j); obtained by expanding ((1+x) + x^2)^n.
T(n,k) = (-1)^k*Sum_{j=0..n} (-3)^j * binomial(n,j) * binomial(2*n-2*j, k-j); obtained by expanding ((1-x)^2 + 3*x)^n.
T(n,k) = (1/2)^k * Sum_{j=0..n} 3^j * binomial(n,j) * binomial(2*n-2*j, k-2*j); obtained by expanding ((1+x/2)^2 + (3/4)*x^2)^n.
T(n,k) = (2^k/4^n) * Sum_{j=0..n} 3^j * binomial(n,j) * binomial(2*n-2*j, k); obtained by expanding ((1/2+x)^2 + 3/4)^n using T(n,k) = T(2*n-k). (End)
From Paul D. Hanna, Apr 18 2012: (Start)
Let A(x) be the g.f. of the flattened sequence, then:
G.f.: A(x) = Sum_{n>=0} x^(n^2) * (1+x+x^2)^n.
G.f.: A(x) = Sum_{n>=0} x^n*(1+x+x^2)^n * Product_{k=1..n} (1 - (1+x+x^2) * x^(4*k-3)) / (1 - (1+x+x^2)*x^(4*k-1)).
G.f.: A(x) = 1/(1 - x*(1+x+x^2)/(1 + x*(1-x^2)*(1+x+x^2)/(1 - x^5*(1+x+x^2)/(1 + x^3*(1-x^4)*(1+x+x^2)/(1 - x^9*(1+x+x^2)/(1 + x^5*(1-x^6)*(1+x+x^2)/(1 - x^13* (1+x+x^2)/(1 + x^7*(1-x^8)*(1+x+x^2)/(1 - ...))))))))), a continued fraction.
(End)
Triangle: G.f. = Sum_{n>=0} (1+x+x^2)^n * x^(n^2) * y^n. - Daniel Forgues, Mar 16 2015
From Peter Luschny, May 08 2016: (Start)
T(n+1,n)/(n+1) = A001006(n) (Motzkin) for n>=0.
T(n,k) = H(n, k) if k < n else H(n, 2*n-k) where H(n,k) = binomial(n,k)*hypergeom([(1-k)/2, -k/2], [n-k+1], 4).
T(n,k) = GegenbauerC(m, -n, -1/2) where m=k if k < n else 2*n-k. (End)
T(n,k) = (-1)^k * C(2*n,k) * hypergeom([-k, -(2*n-k)], [-n+1/2], 3/4), for all k with 0 <= k <= 2n. - Robert S. Maier, Jun 13 2023
T(n,n) = Sum_{k=0..2*n} (-1)^k*(T(n,k))^2 and T(2*n,2*n) = Sum_{k=0..2*n} (T(n,k))^2 for n >= 0. - Werner Schulte, Nov 08 2016
T(n,n) = A002426(n), central trinomial coefficients. - M. F. Hasler, Nov 02 2019
Sum_{k=0..n-1} T(n, 2*k) = (3^n-1)/2. - Tony Foster III, Oct 06 2020

A000078 Tetranacci numbers: a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) for n >= 4 with a(0) = a(1) = a(2) = 0 and a(3) = 1.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 4, 8, 15, 29, 56, 108, 208, 401, 773, 1490, 2872, 5536, 10671, 20569, 39648, 76424, 147312, 283953, 547337, 1055026, 2033628, 3919944, 7555935, 14564533, 28074040, 54114452, 104308960, 201061985, 387559437, 747044834, 1439975216, 2775641472
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of compositions of n-3 with no part greater than 4. Example: a(7) = 8 because we have 1+1+1+1 = 2+1+1 = 1+2+1 = 3+1 = 1+1+2 = 2+2 = 1+3 = 4. - Emeric Deutsch, Mar 10 2004
In other words, a(n) is the number of ways of putting stamps in one row on an envelope using stamps of denominations 1, 2, 3 and 4 cents so as to total n-3 cents [Pólya-Szegő]. - N. J. A. Sloane, Jul 28 2012
a(n+4) is the number of 0-1 sequences of length n that avoid 1111. - David Callan, Jul 19 2004
a(n) is the number of matchings in the graph obtained by a zig-zag triangulation of a convex (n-3)-gon. Example: a(8) = 15 because in the triangulation of the convex pentagon ABCDEA with diagonals AD and AC we have 15 matchings: the empty set, seven singletons and {AB,CD}, {AB,DE}, {BC,AD}, {BC,DE}, {BC,EA}, {CD,EA} and {DE,AC}. - Emeric Deutsch, Dec 25 2004
Number of permutations satisfying -k <= p(i)-i <= r, i=1..n-3, with k = 1, r = 3. - Vladimir Baltic, Jan 17 2005
For n >= 0, a(n+4) is the number of palindromic compositions of 2*n+1 into an odd number of parts that are not multiples of 4. In addition, a(n+4) is also the number of Sommerville symmetric cyclic compositions (= bilaterally symmetric cyclic compositions) of 2*n+1 into an odd number of parts that are not multiples of 4. - Petros Hadjicostas, Mar 10 2018
a(n) is the number of ways to tile a hexagonal double-strip (two rows of adjacent hexagons) containing (n-4) cells with hexagons and double-hexagons (two adjacent hexagons). - Ziqian Jin, Jul 28 2019
The term "tetranacci number" was coined by Mark Feinberg (1963; see A000073). - Amiram Eldar, Apr 16 2021
a(n) is the number of ways to tile a skew double-strip of n-3 cells using squares and all possible "dominos", as seen in Ziqian Jin's article, below. Here is the skew double-strip corresponding to n=15, with 12 cells:
_ ___ _ ___ _ ___
| | | | | | |
|__|___|_|___| |___|
| | | | | | |
|_|___|_|___|_|___|,
and here are the three possible "domino" tiles:
_ _
| | | |
| | | | | |
|_|, |_|, |_____|.
As an example, here is one of the a(15) = 1490 ways to tile the skew double-strip of 12 cells:
_ ___ _____ _______
| | | | | | |
|__|_ |_|_ | _| _|
| | | | | |
|_____|___|_|___|_|. - Greg Dresden, Jun 05 2024

Examples

			From _Petros Hadjicostas_, Mar 10 2018: (Start)
For n = 3, we get a(3+4) = a(7) = 8 palindromic compositions of 2*n+1 = 7 into an odd number of parts that are not a multiple of 4. They are the following: 7 = 1+5+1 = 3+1+3 = 2+3+2 = 1+2+1+2+1 = 2+1+1+1+2 = 1+1+3+1+1 = 1+1+1+1+1+1+1. If we put these compositions on a circle, they become bilaterally symmetric cyclic compositions of 2*n+1 = 7.
For n = 4, we get a(4+4) = a(8) = 15 palindromic compositions of 2*n + 1 = 9 into an odd number of parts that are not a multiple of 4. They are the following: 9 = 3+3+3 = 2+5+2 = 1+7+1 = 1+1+5+1+1 = 2+1+3+1+2 = 1+2+3+2+1 = 1+3+1+3+1 = 3+1+1+1+3 = 2+2+1+2+2 = 2+1+1+1+1+1+2 = 1+2+1+1+1+2+1 = 1+1+2+1+2+1+1 = 1+1+1+3+1+1+1 = 1+1+1+1+1+1+1+1+1.
As _David Callan_ points out in the comments above, for n >= 1, a(n+4) is also the number of 0-1 sequences of length n that avoid 1111. For example, for n = 5, a(5+4) = a(9) = 29 is the number of binary strings of length n that avoid 1111. Out of the 2^5 = 32 binary strings of length n = 5, the following do not avoid 1111: 11111, 01111, and 11110. (End)
		

References

  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1, Problems 3 and 4.
  • J. Riordan, An Introduction to Combinatorial Analysis, Princeton University Press, Princeton, NJ, 1978.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row 4 of arrays A048887 and A092921 (k-generalized Fibonacci numbers).
First differences are in A001631.
Cf. A008287 (quadrinomial coefficients) and A073817 (tetranacci with different initial conditions).

Programs

  • GAP
    a:=[0,0,0,1];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]+a[n-4]; od; a; # Muniru A Asiru, Mar 11 2018
  • Haskell
    import Data.List (tails, transpose)
    a000078 n = a000078_list !! n
    a000078_list = 0 : 0 : 0 : f [0,0,0,1] where
       f xs = y : f (y:xs) where
         y = sum $ head $ transpose $ take 4 $ tails xs
    -- Reinhard Zumkeller, Jul 06 2014, Apr 28 2011
    
  • Magma
    [n le 4 select Floor(n/4) else Self(n-1)+Self(n-2)+Self(n-3)+Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jan 29 2016
    
  • Maple
    a:= n-> (<<1|1|0|0>, <1|0|1|0>, <1|0|0|1>, <1|0|0|0>>^n)[1, 4]: seq(a(n), n=0..50); # Alois P. Heinz, Jun 12 2008
  • Mathematica
    CoefficientList[Series[x^3/(1-x-x^2-x^3-x^4), {x, 0, 50}], x]
    LinearRecurrence[{1,1,1,1}, {0,0,0,1}, 50]  (* Vladimir Joseph Stephan Orlovsky, May 25 2011 *)
    (* From Eric W. Weisstein, Nov 09 2017 *)
    Table[RootSum[-1 -# -#^2 -#^3 +#^4 &, 10#^n +157#^(n+1) -103 #^(n+2) +16#^(n+3) &]/563, {n, 0, 40}]
    Table[RootSum[#^4 -#^3 -#^2 -# -1 &, #^(n-2)/(-#^3 +6# -1) &], {n, 0, 40}] (* End *)
  • Maxima
    a(n):=sum(sum(if mod(5*k-i,4)>0 then 0 else binomial(k,(5*k-i)/4)*(-1)^((i-k)/4)*binomial(n-i+k-1,k-1),i,k,n),k,1,n); /* Vladimir Kruchinin, Aug 18 2010 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( x^3 / (1 - x - x^2 - x^3 - x^4) + x * O(x^n), n))}
    
  • Python
    A000078 = [0,0,0,1]
    for n in range(4, 100):
        A000078.append(A000078[n-1]+A000078[n-2]+A000078[n-3]+A000078[n-4])
    # Chai Wah Wu, Aug 20 2014
    

Formula

a(n) = A001630(n) - a(n-1). - Henry Bottomley
G.f.: x^3/(1 - x - x^2 - x^3 - x^4). - Simon Plouffe in his 1992 dissertation
G.f.: x^3 / (1 - x / (1 - x / (1 + x^3 / (1 + x / (1 - x / (1 + x)))))). - Michael Somos, May 12 2012
G.f.: Sum_{n >= 0} x^(n+3) * (Product_{k = 1..n} (k + k*x + k*x^2 + x^3)/(1 + k*x + k*x^2 + k*x^3)). - Peter Bala, Jan 04 2015
a(n) = term (1,4) in the 4 X 4 matrix [1,1,0,0; 1,0,1,0; 1,0,0,1; 1,0,0,0]^n. - Alois P. Heinz, Jun 12 2008
Another form of the g.f.: f(z) = (z^3 - z^4)/(1 - 2*z + z^5), then a(n) = Sum_{i=0..floor((n-3)/5)} (-1)^i*binomial(n-3-4*i, i)*2^(n - 3 - 5*i) - Sum_{i=0..floor((n-4)/5)} (-1)^i*binomial(n-4-4*i, i)*2^(n - 4 - 5*i) with natural convention Sum_{i=m..n} alpha(i) = 0 for m > n. - Richard Choulet, Feb 22 2010
a(n+3) = Sum_{k=1..n} Sum_{i=k..n} [(5*k-i mod 4) = 0] * binomial(k, (5*k-i)/4) *(-1)^((i-k)/4) * binomial(n-i+k-1,k-1), n > 0. - Vladimir Kruchinin, Aug 18 2010 [Edited by Petros Hadjicostas, Jul 26 2020, so that the formula agrees with the offset of the sequence]
Sum_{k=0..3*n} a(k+b) * A008287(n,k) = a(4*n+b), b >= 0 ("quadrinomial transform"). - N. J. A. Sloane, Nov 10 2010
G.f.: x^3*(1 + x*(G(0)-1)/(x+1)) where G(k) = 1 + (1+x+x^2+x^3)/(1-x/(x+1/G(k+1) )); (recursively defined continued fraction). - Sergei N. Gladkovskii, Jan 26 2013
Starting (1, 2, 4, 8, ...) = the INVERT transform of (1, 1, 1, 1, 0, 0, 0, ...). - Gary W. Adamson, May 13 2013
a(n) ~ c*r^n, where c = 0.079077767399388561146007... and r = 1.92756197548292530426195... = A086088 (One of the roots of the g.f. denominator polynomial is 1/r.). - Fung Lam, Apr 29 2014
a(n) = 2*a(n-1) - a(n-5), n >= 5. - Bob Selcoe, Jul 06 2014
From Ziqian Jin, Jul 28 2019: (Start)
a(2*n+5) = a(n+4)^2 + a(n+3)^2 + a(n+2)^2 + 2*a(n+3)*(a(n+2) + a(n+1)).
a(n) - 1 = a(n-2) + 2*a(n-3) + 3*(a(n-4) + a(n-5) + ... + a(2) + a(1)), n >= 4. (End)
a(n) = (Sum_{i=0..n-1} a(i)*A073817(n-i))/(n-3) for n > 3. - Greg Dresden and Advika Srivastava, Sep 28 2019
a(n) = Sum_{r root of x^4-x^3-x^2-x-1} r^n/(4*r^3-3*r^2-2*r-1). - Fabian Pereyra, Dec 06 2024

Extensions

Definition augmented (with 4 initial terms) by Daniel Forgues, Dec 02 2009
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A001317 Sierpiński's triangle (Pascal's triangle mod 2) converted to decimal.

Original entry on oeis.org

1, 3, 5, 15, 17, 51, 85, 255, 257, 771, 1285, 3855, 4369, 13107, 21845, 65535, 65537, 196611, 327685, 983055, 1114129, 3342387, 5570645, 16711935, 16843009, 50529027, 84215045, 252645135, 286331153, 858993459, 1431655765, 4294967295, 4294967297, 12884901891, 21474836485, 64424509455, 73014444049, 219043332147, 365072220245, 1095216660735, 1103806595329, 3311419785987
Offset: 0

Views

Author

Keywords

Comments

The members are all palindromic in binary, i.e., a subset of A006995. - Ralf Stephan, Sep 28 2004
J. H. Conway writes (in Math Forum): at least the first 31 numbers give odd-sided constructible polygons. See also A047999. - M. Dauchez (mdzzdm(AT)yahoo.fr), Sep 19 2005 [This observation was also made in 1982 by N. L. White (see letter). - N. J. A. Sloane, Jun 15 2015]
Decimal number generated by the binary bits of the n-th generation of the Rule 60 elementary cellular automaton. Thus: 1; 0, 1, 1; 0, 0, 1, 0, 1; 0, 0, 0, 1, 1, 1, 1; 0, 0, 0, 0, 1, 0, 0, 0, 1; ... . - Eric W. Weisstein, Apr 08 2006
Limit_{n->oo} log(a(n))/n = log(2). - Bret Mulvey, May 17 2008
Equals row sums of triangle A166548; e.g., 17 = (2 + 4 + 6 + 4 + 1). - Gary W. Adamson, Oct 16 2009
Equals row sums of triangle A166555. - Gary W. Adamson, Oct 17 2009
For n >= 1, all terms are in A001969. - Vladimir Shevelev, Oct 25 2010
Let n,m >= 0 be such that no carries occur when adding them. Then a(n+m) = a(n)*a(m). - Vladimir Shevelev, Nov 28 2010
Let phi_a(n) be the number of a(k) <= a(n) and respectively prime to a(n) (i.e., totient function over {a(n)}). Then, for n >= 1, phi_a(n) = 2^v(n), where v(n) is the number of 0's in the binary representation of n. - Vladimir Shevelev, Nov 29 2010
Trisection of this sequence gives rows of A008287 mod 2 converted to decimal. See also A177897, A177960. - Vladimir Shevelev, Jan 02 2011
Converting the rows of the powers of the k-nomial (k = 2^e where e >= 1) term-wise to binary and reading the concatenation as binary number gives every (k-1)st term of this sequence. Similarly with powers p^k of any prime. It might be interesting to study how this fails for powers of composites. - Joerg Arndt, Jan 07 2011
This sequence appears in Pascal's triangle mod 2 in another way, too. If we write it as
1111111...
10101010...
11001100...
10001000...
we get (taking the period part in each row):
.(1) (base 2) = 1
.(10) = 2/3
.(1100) = 12/15 = 4/5
.(1000) = 8/15
The k-th row, treated as a binary fraction, seems to be equal to 2^k / a(k). - Katarzyna Matylla, Mar 12 2011
From Daniel Forgues, Jun 16-18 2011: (Start)
Since there are 5 known Fermat primes, there are 32 products of distinct Fermat primes (thus there are 31 constructible odd-sided polygons, since a polygon has at least 3 sides). a(0)=1 (empty product) and a(1) to a(31) are those 31 non-products of distinct Fermat primes.
It can be proved by induction that all terms of this sequence are products of distinct Fermat numbers (A000215):
a(0)=1 (empty product) are products of distinct Fermat numbers in { };
a(2^n+k) = a(k) * (2^(2^n)+1) = a(k) * F_n, n >= 0, 0 <= k <= 2^n - 1.
Thus for n >= 1, 0 <= k <= 2^n - 1, and
a(k) = Product_{i=0..n-1} F_i^(alpha_i), alpha_i in {0, 1},
this implies
a(2^n+k) = Product_{i=0..n-1} F_i^(alpha_i) * F_n, alpha_i in {0, 1}.
(Cf. OEIS Wiki links below.) (End)
The bits in the binary expansion of a(n) give the coefficients of the n-th power of polynomial (X+1) in ring GF(2)[X]. E.g., 3 ("11" in binary) stands for (X+1)^1, 5 ("101" in binary) stands for (X+1)^2 = (X^2 + 1), and so on. - Antti Karttunen, Feb 10 2016

Examples

			Given a(5)=51, a(6)=85 since a(5) XOR 2*a(5) = 51 XOR 102 = 85.
From _Daniel Forgues_, Jun 18 2011: (Start)
  a(0) = 1 (empty product);
  a(1) = 3 = 1 * F_0 = a(2^0+0) = a(0) * F_0;
  a(2) = 5 = 1 * F_1 = a(2^1+0) = a(0) * F_1;
  a(3) = 15 = 3 * 5 = F_0 * F_1 = a(2^1+1) = a(1) * F_1;
  a(4) = 17 = 1 * F_2 = a(2^2+0) = a(0) * F_2;
  a(5) = 51 = 3 * 17 = F_0 * F_2 = a(2^2+1) = a(1) * F_2;
  a(6) = 85 = 5 * 17 = F_1 * F_2 = a(2^2+2) = a(2) * F_2;
  a(7) = 255 = 3 * 5 * 17 = F_0 * F_1 * F_2 = a(2^2+3) = a(3) * F_2;
  ... (End)
		

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic sequences, Cambridge University Press, 2003, p. 113.
  • Henry Wadsworth Gould, Exponential Binomial Coefficient Series, Tech. Rep. 4, Math. Dept., West Virginia Univ., Morgantown, WV, Sept. 1961.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 136-137.

Crossrefs

Cf. A038183 (odd bisection, 1D Cellular Automata Rule 90).
Iterates of A048724 (starting from 1).
Row 3 of A048723.
Positions of records in A268389.
Positions of ones in A268669 and A268384 (characteristic function).
Not the same as A045544 nor as A053576.
Cf. A045544.

Programs

  • Haskell
    a001317 = foldr (\u v-> 2*v + u) 0 . map toInteger . a047999_row
    -- Reinhard Zumkeller, Nov 24 2012
    (Scheme, with memoization-macro definec, two variants)
    (definec (A001317 n) (if (zero? n) 1 (A048724 (A001317 (- n 1)))))
    (definec (A001317 n) (if (zero? n) 1 (A048720bi 3 (A001317 (- n 1))))) ;; Where A048720bi implements the dyadic function given in A048720.
    ;; Antti Karttunen, Feb 10 2016
    
  • Magma
    [&+[(Binomial(n, i) mod 2)*2^i: i in [0..n]]: n in [0..41]]; // Vincenzo Librandi, Feb 12 2016
    
  • Maple
    A001317 := proc(n) local k; add((binomial(n,k) mod 2)*2^k, k=0..n); end;
  • Mathematica
    a[n_] := Nest[ BitXor[#, BitShiftLeft[#, 1]] &, 1, n]; Array[a, 42, 0] (* Joel Madigan (dochoncho(AT)gmail.com), Dec 03 2007 *)
    NestList[BitXor[#,2#]&,1,50] (* Harvey P. Dale, Aug 02 2021 *)
  • PARI
    a(n)=sum(i=0,n,(binomial(n,i)%2)*2^i)
    
  • PARI
    a=1; for(n=0, 66, print1(a,", "); a=bitxor(a,a<<1) ); \\ Joerg Arndt, Mar 27 2013
    
  • PARI
    A001317(n,a=1)={for(k=1,n,a=bitxor(a,a<<1));a} \\ M. F. Hasler, Jun 06 2016
    
  • PARI
    a(n) = subst(lift(Mod(1+'x,2)^n), 'x, 2); \\ Gheorghe Coserea, Nov 09 2017
    
  • Python
    from sympy import binomial
    def a(n): return sum([(binomial(n, i)%2)*2**i for i in range(n + 1)]) # Indranil Ghosh, Apr 11 2017
    
  • Python
    def A001317(n): return int(''.join(str(int(not(~n&k))) for k in range(n+1)),2) # Chai Wah Wu, Feb 04 2022

Formula

a(n+1) = a(n) XOR 2*a(n), where XOR is binary exclusive OR operator. - Paul D. Hanna, Apr 27 2003
a(n) = Product_{e(j, n) = 1} (2^(2^j) + 1), where e(j, n) is the j-th least significant digit in the binary representation of n (Roberts: see Allouche & Shallit). - Benoit Cloitre, Jun 08 2004
a(2*n+1) = 3*a(2*n). Proof: Since a(n) = Product_{k in K} (1 + 2^(2^k)), where K is the set of integers such that n = Sum_{k in K} 2^k, clearly K(2*n+1) = K(2*n) union {0}, hence a(2*n+1) = (1+2^(2^0))*a(2*n) = 3*a(2*n). - Emmanuel Ferrand and Ralf Stephan, Sep 28 2004
a(32*n) = 3 ^ (32 * n * log(2) / log(3)) + 1. - Bret Mulvey, May 17 2008
For n >= 1, A000120(a(n)) = 2^A000120(n). - Vladimir Shevelev, Oct 25 2010
a(2^n) = A000215(n); a(2^n-1) = a(2^n)-2; for n >= 1, m >= 0,
a(2^(n-1)-1)*a(2^n*m + 2^(n-1)) = 3*a(2^(n-1))*a(2^n*m + 2^(n-1)-2). - Vladimir Shevelev, Nov 28 2010
Sum_{k>=0} 1/a(k) = Product_{n>=0} (1 + 1/F_n), where F_n=A000215(n);
Sum_{k>=0} (-1)^(m(k))/a(k) = 1/2, where {m(n)} is Thue-Morse sequence (A010060).
If F_n is defined by F_n(z) = z^(2^n) + 1 and a(n) by (1/2)*Sum_{i>=0}(1-(-1)^{binomial(n,i)})*z^i, then, for z > 1, the latter two identities hold as well with the replacement 1/2 in the right hand side of the 2nd one by 1-1/z. - Vladimir Shevelev, Nov 29 2010
G.f.: Product_{k>=0} ( 1 + z^(2^k) + (2*z)^(2^k) ). - conjectured by Shamil Shakirov, proved by Vladimir Shevelev
a(n) = A000225(n+1) - A219843(n). - Reinhard Zumkeller, Nov 30 2012
From Antti Karttunen, Feb 10 2016: (Start)
a(0) = 1, and for n > 1, a(n) = A048720(3, a(n-1)) = A048724(a(n-1)).
a(n) = A048723(3,n).
a(n) = A193231(A000079(n)).
For all n >= 0: A268389(a(n)) = n.
(End)

A212500 a(n) is the difference between multiples of 5 with even and odd digit sum in base 4 in interval [0,4^n).

Original entry on oeis.org

1, 4, 7, 36, 65, 340, 615, 3220, 5825, 30500, 55175, 288900, 522625, 2736500, 4950375, 25920500, 46890625, 245522500, 444154375, 2325622500, 4207090625, 22028612500, 39850134375, 208658012500, 377465890625, 1976437062500, 3575408234375
Offset: 1

Views

Author

Keywords

Comments

Let the term "transform" mean the operation of summing the products of the numbers in the n-th row of an m-nomial triangle (m-nomial T(n,k)) and the ascending numbers of a sequence. And let T(0,0) be the top entry (0th row, 0th column) in an m-nomial triangle. Then starting with a(1)=1, the bisection of this sequence (1,7,65,615,5825...) is the quadrinomial (4-nomial) transform of A000045 (Fibonacci sequence, F(j)), starting at T(0,0)=1, F(1)=1. - Bob Selcoe, May 24 2014

Examples

			Let n=3. In interval [0,4^3) we have 13 multiples of 5,from which in base 4 only three (namely, 35,50,55) have odd digit sums. Thus a(3)=(13-3)-3=7.
From _Bob Selcoe_, May 28 2014: (Start)
n=2: a(5)=65 because T(2,k) {k=0..6} is {1,2,3,4,3,2,1} and {j=1..7} is {1,1,2,3,5,8,13}: 1*1 + 2*1 + 3*2 + 4*3 + 3*5 + 2*8 + 1*13 = 65.
n=3: a(7)=615 because T(3,k) {k=0..9} is {1,3,6,10,12,12,10,6,3,1} and {j=1..10} is {1,1,2,3,5,8,13,21,34,55}: 1*1 + 3*1 + 6*2 + 10*3 + 12*5 + 12*8 + 10*13 + 6*21 + 3*34 + 1*55 = 615. (End)
		

Crossrefs

Cf. A038754, A084990, A189334 (bisection).

Programs

  • Magma
    I:=[1,4,7,36]; [n le 4 select I[n] else 10*Self(n-2)-5*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jun 17 2014
    
  • Mathematica
    CoefficientList[Series[-(-1 - 4 x + 3 x^2 + 4 x^3)/(1 - 10 x^2 + 5 x^4), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 17 2014 *)
    LinearRecurrence[{0,10,0,-5},{1,4,7,36},30] (* Harvey P. Dale, Apr 07 2019 *)
  • PARI
    Vec(-x*(-1-4*x+3*x^2+4*x^3)/(1-10*x^2+5*x^4) + O(x^30)) \\ Michel Marcus, Feb 06 2016

Formula

For n>=5, a(n) = 10*a(n-2)-5*a(n-4).
a(n) = 0.4*((5+2*sqrt(5))^(n/2)+ (5-2*sqrt(5))^(n/2)) , if n is even, and
a(n) = 0.1*((5+2*sqrt(5))^((n-1)/2)*sqrt(30+10*sqrt(5))+(5-2*sqrt(5))^((n-1)/2)*sqrt(30-10*sqrt(5))), if n is odd.
a(2n+1) = Sum_{j=0..3n+1} fibonacci(j+1)*A008287(n,j). - Bob Selcoe, May 28 2014
G.f.: -x*(-1-4*x+3*x^2+4*x^3) / ( 1-10*x^2+5*x^4 ). - R. J. Mathar, Jun 16 2014

A035343 Triangle of coefficients in expansion of (1 + x + x^2 + x^3 + x^4)^n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 18, 19, 18, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 52, 68, 80, 85, 80, 68, 52, 35, 20, 10, 4, 1, 1, 5, 15, 35, 70, 121, 185, 255, 320, 365, 381, 365, 320, 255, 185, 121, 70, 35, 15, 5, 1, 1, 6, 21, 56, 126, 246, 426, 666
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^k in (1 + x + x^2 + x^3 + x^4)^n is the number of distinct ways in which k unlabeled objects can be distributed in n labeled urns allowing at most 4 objects to fall in each urn. - N-E. Fahssi, Mar 16 2008
The n-th row has 4n+1 terms (A016813). - Michel Marcus, Sep 08 2013
Number of lattice paths from (0,0) to (n,k) using steps (1,0), (1,1), (1,2), (1,3), (1,4). - Nicholas Ham, Sep 14 2018
T(n,k) is the number of ways to obtain a sum of n+k when throwing a 5-sided die n times. - Feryal Alayont, Dec 30 2024

Examples

			Triangle begins:
n\k [0]  [1]  [2]  [3]  [4]  [5]  [6]  [7]  [8]  [9]  [10] [11] [12]
[0] 1;
[1] 1,   1,   1,   1,   1;
[2] 1,   2,   3,   4,   5,   4,   3,   2,   1;
[3] 1,   3,   6,   10,  15,  18,  19,  18,  15,  10,  6,   3,   1;
[4] ...
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77-78, 16. for q=5.
  • D. C. Fielder and C. O. Alford, Pascal's triangle: top gun or just one of the gang?, in G E Bergum et al., eds., Applications of Fibonacci Numbers Vol. 4 1991 pp. 77-90 (Kluwer).

Crossrefs

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 5-nomials as a table
    r := 5:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • Mathematica
    Flatten[Table[CoefficientList[(1 + x + x^2 + x^3 + x^4)^n, x], {n, 0, 10}]] (* T. D. Noe, Apr 04 2011 *)
  • Maxima
    pentanomial(n,k):=coeff(expand((1+x+x^2+x^3+x^4)^n),x,k);
    create_list(pentanomial(n,k),n,0,6,k,0,4*n); /* Emanuele Munarini, Mar 15 2011 */
    
  • PARI
    row(n) = Vec(((1 + x + x^2 + x^3 + x^4)^n) + O(x^(4*n+1)))
    trianglerows(n) = for(k=0, n-1, print(row(k)))
    /* Print initial 5 rows of triangle as follows */
    trianglerows(5) \\ Felix Fröhlich, Aug 26 2018

Formula

T(n,k) = Sum_{i = 0..floor(k/5)} (-1)^i*binomial(n,i)*binomial(n+k-1-5*i,n-1) for n >= 0 and 0 <= k <= 4*n. - Peter Bala, Sep 07 2013

A063260 Sextinomial (also called hexanomial) coefficient array.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 25, 27, 27, 25, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 80, 104, 125, 140, 146, 140, 125, 104, 80, 56, 35, 20, 10, 4, 1, 1, 5, 15, 35, 70, 126, 205, 305, 420, 540, 651, 735, 780
Offset: 0

Views

Author

Wolfdieter Lang, Jul 24 2001

Keywords

Comments

The sequence of step width of this staircase array is [1,5,5,...], hence the degree sequence for the row polynomials is [0,5,10,15,...]=A008587.
The column sequences (without leading zeros) are for k=0..5 those of the lower triangular array A007318 (Pascal) and for k=6..9: A062989, A063262-4. Row sums give A000400 (powers of 6). Central coefficients give A063419; see also A018901.
This can be used to calculate the number of occurrences of a given roll of n six-sided dice, where k is the index: k=0 being the lowest possible roll (i.e., n) and n*6 being the highest roll.

Examples

			The irregular table T(n, k) begins:
n\k 0 1 2  3  4  5  6  7  8  9 10 11 12 13 14 15
1:  1
2:  1 1 1  1  1  1
3:  1 2 3  4  5  6  5  4  3  2  1
4:  1 3 6 10 15 21 25 27 27 25 21 15 10  6  3  1
...reformatted - _Wolfdieter Lang_, Oct 31 2015
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77,78.

Crossrefs

The q-nomial arrays for q=2..5 are: A007318 (Pascal), A027907, A008287, A035343 and for q=7: A063265, A171890, A213652, A213651.
Columns for k=0..9 (with some shifts) are: A000012, A000027, A000217, A000292, A000332, A000389, A062989, A063262, A063263, A063264.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 6-nomials as a table
    r := 6:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • Mathematica
    Flatten[Table[CoefficientList[(1 + x + x^2 + x^3 + x^4 + x^5)^n, x], {n, 0, 25}]] (* T. D. Noe, Apr 04 2011 *)
  • PARI
    concat(vector(5,k,Vec(sum(j=0,5,x^j)^k)))  \\ M. F. Hasler, Jun 17 2012

Formula

G.f. for row n: (Sum_{j=0..5} x^j)^n.
G.f. for column k: (x^(ceiling(k/5)))*N6(k, x)/(1-x)^(k+1) with the row polynomials from the staircase array A063261(k, m) and with N6(6,x) = 5 - 10*x + 10*x^2 - 5*x^3 + x^4.
T(n, k) = 0 if n=-1 or k<0 or k >= 5*n + 1; T(0, 0)=1; T(n, k) = Sum_{j=0..5} T(n-1, k-j) else.
T(n, k) = Sum_{i = 0..floor(k/6)} (-1)^i*binomial(n,i)*binomial(n+k-1-6*i,n-1) for n >= 0 and 0 <= k <= 5*n. - Peter Bala, Sep 07 2013
T(n, k) = Sum_{i = max(0,ceiling((k-2*n)/3)).. min(n,k/3)} binomial(n,i)*trinomial(n,k-3*i) for n >= 0 and 0 <= k <= 5*n. - Matthew Monaghan, Sep 30 2015

Extensions

More terms and corrected recurrence from Nicholas M. Makin (NickDMax(AT)yahoo.com), Sep 13 2002

A005725 Quadrinomial coefficients.

Original entry on oeis.org

1, 1, 3, 10, 31, 101, 336, 1128, 3823, 13051, 44803, 154518, 534964, 1858156, 6472168, 22597760, 79067375, 277164295, 973184313, 3422117190, 12049586631, 42478745781, 149915252028, 529606271560, 1872653175556, 6627147599476, 23471065878276, 83186110269928
Offset: 0

Views

Author

Keywords

Comments

Coefficient of x^n in (1+x+x^2+x^3)^n.
Number of lattice paths from (0,0) to (n,n) using steps (1,0), (1,1), (1,2), (1,3). - Joerg Arndt, Jul 05 2011

Examples

			For n=2, (x^3 + x^2 + x + 1)^2 = x^6 + 2x^5 + 3x^4 + 4x^3 + 3x^2 + 2x + 1, and the coefficient of x^n = x^2 is 3, so a(2) = 3. - _Michael B. Porter_, Aug 15 2016
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A008287.
Column k=3 of A305161.

Programs

  • Magma
    P:=PolynomialRing(Integers()); [ Coefficients((1+x+x^2+x^3)^n)[n+1]: n in [0..25] ]; // Bruno Berselli, Jul 05 2011
    
  • Maple
    seq(add(binomial(n,2*k)*binomial(n,k), k=0..floor(n/2)), n=0..30 ); # Detlef Pauly (dettodet(AT)yahoo.de), Nov 09 2001
    a := n -> add(binomial(n,j)*binomial(n,2*j),j=0..n): seq(a(n), n=1..25); # Zerinvary Lajos, Feb 12 2007
    seq(coeff(series(RootOf((16*x^3+8*x^2+11*x-4)*A^3+(3-2*x)*A+1, A), x=0, n+1), x, n), n=0..30);  # Mark van Hoeij, Apr 30 2013
  • Mathematica
    a[n_] := Coefficient[(1+x+x^2+x^3)^n, x^n]; a[0] = 1; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 15 2011 *)
    Table[HypergeometricPFQ[{1/2 - n/2, -n, -n/2}, {1/2, 1}, -1], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 04 2016 *)
  • Maxima
    quadrinomial(n,k):=coeff(expand((1+x+x^2+x^3)^n),x,k); makelist(quadrinomial(n,n),n,0,12); /* Emanuele Munarini, Mar 15 2011 */
    
  • PARI
    a(n)=my(x='x); polcoeff((x^3+x^2+x+1)^n,n) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from math import comb
    def A005725(n): return sum((-1 if k&1 else 1)*comb(n,k)*comb((n-(k<<1)<<1)-1,n-(k<<2)) for k in range((n>>2)+1)) if n else 1 # Chai Wah Wu, Aug 09 2025

Formula

a(n) = Sum_{i+j+k=n, 0<=k<=j<=i<=n} C(n,i)*C(i,j)*C(j,k). - Benoit Cloitre, Jun 06 2004
G.f.: A(x) where (16*x^3+8*x^2+11*x-4)*A(x)^3+(3-2*x)*A(x)+1 = 0. - Mark van Hoeij, Apr 30 2013
Recurrence: 2*n*(2*n-1)*(13*n-19)*a(n) = (143*n^3 - 352*n^2 + 251*n - 54)*a(n-1) + 4*(n-1)*(26*n^2 - 51*n + 15)*a(n-2) + 16*(n-2)*(n-1)*(13*n-6)*a(n-3). - Vaclav Kotesovec, Aug 10 2013
a(n) ~ sqrt((39+7*39^(2/3)/c+39^(1/3)*c)/156) * ((b+11+217/b)/12)^n/sqrt(Pi*n), where b = (6371+624*sqrt(78))^(1/3), c = (117+2*sqrt(78))^(1/3). - Vaclav Kotesovec, Aug 10 2013
a(n) = A008287(n, n). - Sean A. Irvine, Aug 15 2016
a(n) = hypergeom([1/2-n/2, -n, -n/2], [1/2, 1], -1). - Vladimir Reshetnikov, Oct 04 2016
From Peter Bala, Mar 31 2020: (Start)
a(n) = Sum_{k = 0..floor(n/4)} (-1)^k*C(n,k)*C(2*n-4*k-1,n-4*k).
a(p) == 1 (mod p^2) for any prime p >= 3. More generally, we may have a(p^k) == a(p^(k-1)) (mod p^(2*k)) for k >= 2 and any prime p >= 3.
The sequence defined by b(n) := [x^n] ( F(x)/F(-x) )^n, where F(x) = 1 + x + x^2 + x^3, may satisfy the stronger supercongruences b(p) == 2 (mod p^3) for prime p >= 5 (checked up to p = 499). (End)
a(n) = Sum_{k = 0..floor(n/2)} binomial(n,k)*binomial(n,2*k). - Peter Bala, Mar 16 2023

Extensions

More terms from James Sellers, Jul 12 2000

A063265 Septinomial (also called heptanomial) coefficient array.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 33, 36, 37, 36, 33, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 116, 149, 180, 206, 224, 231, 224, 206, 180, 149, 116, 84, 56, 35
Offset: 0

Views

Author

Wolfdieter Lang, Jul 24 2001

Keywords

Comments

The sequence of step width of this staircase array is [1,6,6,...], hence the degree sequence for the row polynomials is [0,6,12,18,...]= A008588.
The column sequences (without leading zeros) are for k=0..6 those of the lower triangular array A007318 (Pascal) and for k=7..9: A063267, A063417, A063418. Row sums give A000420 (powers of 7). Central coefficients give A025012.

Examples

			Triangle begins:
  {1};
  {1, 1, 1, 1, 1, 1, 1};
  {1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1};
  ...
N7(k,x)= 1 for k=0..6, N7(7,x)= 6-15*x+20*x^2-15*x^3+6*x^4-x^5 (from A063266).
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, pp. 77,78.

Crossrefs

The q-nomial arrays are for q=2..8: A007318 (Pascal), A027907, A008287, A035343, A063260, A063265, A171890.

Programs

  • Maple
    #Define the r-nomial coefficients for r = 1, 2, 3, ...
    rnomial := (r,n,k) -> add((-1)^i*binomial(n,i)*binomial(n+k-1-r*i,n-1), i = 0..floor(k/r)):
    #Display the 7-nomials as a table
    r := 7:  rows := 10:
    for n from 0 to rows do
    seq(rnomial(r,n,k), k = 0..(r-1)*n)
    end do;
    # Peter Bala, Sep 07 2013
  • Mathematica
    Flatten[Table[CoefficientList[(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)^n, x], {n, 0, 25}]] (* T. D. Noe, Apr 04 2011 *)

Formula

a(n, k)=0 if n=-1 or k<0 or k >= 6*n; a(0, 0)=1; a(n, k)= sum(a(n-1, k-j), j=0..6) else.
G.f. for row n: (sum(x^j, j=0..6))^n.
G.f. for column k: (x^(ceiling(k/6)))*N7(k, x)/(1-x)^(k+1) with the row polynomials of the staircase array A063266(k, m).
T(n,k) = Sum_{i = 0..floor(k/7)} (-1)^i*binomial(n,i)*binomial(n+k-1-7*i,n-1) for n >= 0 and 0 <= k <= 6*n. - Peter Bala, Sep 07 2013

A005721 Central quadrinomial coefficients.

Original entry on oeis.org

1, 4, 44, 580, 8092, 116304, 1703636, 25288120, 379061020, 5724954544, 86981744944, 1327977811076, 20356299454276, 313095240079600, 4829571309488760, 74683398325804080, 1157402982351003420, 17971185794898859248
Offset: 0

Views

Author

Keywords

Comments

Sum of squares of entries in the n-th row of triangle of quadrinomial coefficients A008287 (Pascal triangle of order 4). - Adi Dani, Jul 03 2011
Central coefficients in triangle A008287 ((1 + x + x^2 + x^3)^n), see link. - Zagros Lalo, Sep 25 2018

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 78.
  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 601, 602.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    List([0..20],n->Sum([0..Int(3*n/4)],k->(-1)^k*Binomial(2*n,k)*Binomial(5*n-4*k-1,3*n-4*k))); # Muniru A Asiru, Sep 26 2018
    
  • Magma
    [(&+[(-1)^k*Binomial(2*n,k)*Binomial(5*n-4*k-1,3*n-4*k): k in [0..Floor(3*n/4)]]): n in [0..30]]; // G. C. Greubel, Oct 06 2018
  • Maple
    F := (t^2-1)*(6*t+t^2+1)^(1/2)/(3*t^3+13*t^2+t-1); G := t/((t+1)^2*(6*t+t^2+1));
    Ginv := RootOf(numer(G-x),t); series(eval(F,t=Ginv),x=0,20);
    seq(coeff((1+x+x^2+x^3)^(2*n),x,3*n),n=0..50); # Robert Israel, Nov 01 2015
  • Mathematica
    Table[Sum[(-1)^k*Binomial[2*n,k]*Binomial[5*n-4*k-1,3*n-4*k],{k,0,3*n/4}],{n,0,25}] (* Adi Dani, Jul 03 2011 *)
    RecurrenceTable[{128*(n-1)*(2*n-3)*(2*n-1)*(5*n-1)*a[n-2] -8*(2*n-1)*(145*n^3-319*n^2+201*n-30)*a[n-1]+3*n*(3*n-2)*(3*n-1)*(5*n-6)*a[n]==0,
    a[0]==1,a[1]==4},a,{n,0,5000}] (* Bradley Klee, Jun 25 2018 *)
    a[n_] := a[n] = Sum[(2*n)!/((j - n)!*(3*n + i - 2*j)!*(j - 2*i)!*i!), {i, 0, n}, {j, n, 2*n}]; Table[a[n], {n, 0, 20}] (* Zagros Lalo, Sep 25 2018 *)
  • PARI
    a(n)={local(v=Vec((1+x+x^2+x^3)^n));sum(k=1,#v, v[k]^2);}
    
  • PARI
    a(n)=sum(k=0,3*n/4, (-1)^k*binomial(2*n,k)*binomial(5*n-4*k-1,3*n-4*k));
    
  • PARI
    vector(30, n, n--; polcoeff((1+x+x^2+x^3)^(2*n), (6*n)>>1)) \\ Altug Alkan, Nov 01 2015
    

Formula

a(n) = A005190(2*n) = A008287(2*n, 3*n).
G.f.: Let Z(x) be a solution of (-1+16*x)*(32*x-27)^2*Z^6+9*(-9+64*x)*(32*x-27)*Z^4+81*(80*x-27)*Z^2+729 = 0, with Z(0)=1. Compute a Puiseux series for Z(x) at x=0, then Z(x) in C[[x^(1/3)]]. Remove all non-integer powers of x. The result is the generating function for A005721. - Mark van Hoeij, Oct 29 2011
G.f.: F(G^(-1)(x)) where F(t) = (t^2-1)*(6*t+t^2+1)^(1/2)/(3*t^3+13*t^2+t-1) and G(t) = t/((t+1)^2*(6*t+t^2+1)). - Mark van Hoeij, Oct 30 2011
From Bradley Klee, Jun 25 2018: (Start)
128*(n-1)*(2*n-3)*(2*n-1)*(5*n-1)*a(n-2) - 8*(2*n-1)*(145*n^3-319*n^2+201*n-30)*a(n-1) + 3*n*(3*n-2)*(3*n-1)*(5*n-6)*a(n) = 0.
G.f. G(x) satisfies a Picard-Fuchs type differential equation, 0 = Sum_{m=0..5, n=0..3} M_{m,n} x^m*(d^n/dx^n G(x)), with integer matrix:
M={{ 24, -6, 0, 0},
{-768, 1488, -54, 0},
{6144, -16128, 2520, -27},
{ 0, 55296, -29568, 896},
{ 0, 0, 49152, -7936},
{ 0, 0, 0, 8192}}(End)
a(n) = sum_{k=0..floor(3n/4)} (-1)^k binomial(2n,k) * binomial(5n-4k-1,3n-4k). - Muniru A Asiru, Sep 26 2018
a(n) = Sum_{i=0..n} Sum_{j=n..2n}(f); f= ( (2*n)!/((j - n)!*(3*n + i - 2*j)!*(j - 2*i)!*i!) ); f=0 for (3*n + i - 2*j)<0 or (j - 2*i)<0. See also formula in Links section. - Zagros Lalo, Sep 27 2018
Showing 1-10 of 38 results. Next