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

A096252 Array read by rows, starting with n=0: row n lists A057077(n+1)*8^(n+1)/2, A057077(n+2)*8^(n+1)/2, A057077(n+1)*8^(n+1).

Original entry on oeis.org

4, -4, 8, -32, -32, -64, -256, 256, -512, 2048, 2048, 4096, 16384, -16384, 32768, -131072, -131072, -262144, -1048576, 1048576, -2097152, 8388608, 8388608, 16777216, 67108864, -67108864, 134217728, -536870912, -536870912, -1073741824
Offset: 0

Views

Author

Creighton Dement, Jul 31 2004

Keywords

Comments

a(n) = ves( ('i + 'ii' + 'ij' + 'ik')^n ) a(n) = ves( ('j + 'jj' + 'ji' + 'jk')^n ) a(n) = ves( ('k + 'kk' + 'ki' + 'kj')^n ).
The elements x = 'i + 'ii' + 'ij' + 'ik'; y = 'j + 'jj' + 'ji' + 'jk'; and z = 'k + 'kk' + 'ki' + 'kj' are elements of the ring generated from the quaternion factor space Q X Q / {(1,1), (-1,-1)}. Each is represented by a gray shaded area of "Floret's cube". The elements x/2, y/2, z/2 are members of a group, itself a subset of the real algebra generated from Q X Q / {(1,1), (-1,-1)}, which is isomorphic to Q X C_3 (order 24).
This sequence is the term-wise sum of three sequences: a(n) = ves(x^n) = jes(x^n) + les(x^n) + tes(x^n), where jes(x^n)=(1, -6, 8, -24, 16, 0, -64, 384, -512, 1536, -1024, 0, 4096, -24576, 32768, -98304, ...), les(x^n)=(3, 0, 0, 0, -48, 0 -192, 0, 0, 0, 3072, 0, 12288, 0, 0, 0, ...), tes(x^n)=(0, 2, 0, -8, 0, -64, 0, -128, 0, 512, 0, 4096, 0, 8192, 0, -32768, ...). Concerning "les"- notice that if (..., s, 0, 0, 0, t, ...), then t = -16s and if (..., s, 0, t, ...), then t = 4s.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[4(1-x-2x^2-4x^3)/(1-4x^2+16x^4),{x,0,40}],x] (* or *) LinearRecurrence[ {0,4,0,-16},{4,-4,8,-32},40] (* Harvey P. Dale, Feb 15 2024 *)
  • Sage
    [(-1)^(floor((floor(n/3)+((n%3)%2)+1)/2)) * 8^(floor(n/3)+1) / 2^(((n+1)^2)%3) for n in range(30)]
    # Danny Rorabaugh, May 13 2016

Formula

a(n)= 4*a(n-2)-16*a(n-4). G.f.: 4*(1-x-2*x^2-4*x^3)/(1-4*x^2+16*x^4). - R. J. Mathar, Nov 26 2008
a(n) = (-1)^(floor((floor(n/3)+((n mod 3) mod 2)+1)/2)) * 8^(floor(n/3)+1) / 2^(((n+1)^2) mod 3). - Danny Rorabaugh, May 13 2016
a(n) = 4*(-1)^floor((n+1)/2)*A138230(n). - R. J. Mathar, May 21 2019

Extensions

Edited with clearer definition by Omar E. Pol, Dec 29 2008

A000009 Expansion of Product_{m >= 1} (1 + x^m); number of partitions of n into distinct parts; number of partitions of n into odd parts.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 18, 22, 27, 32, 38, 46, 54, 64, 76, 89, 104, 122, 142, 165, 192, 222, 256, 296, 340, 390, 448, 512, 585, 668, 760, 864, 982, 1113, 1260, 1426, 1610, 1816, 2048, 2304, 2590, 2910, 3264, 3658, 4097, 4582, 5120, 5718, 6378
Offset: 0

Views

Author

Keywords

Comments

Partitions into distinct parts are sometimes called "strict partitions".
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
The result that number of partitions of n into distinct parts = number of partitions of n into odd parts is due to Euler.
Bijection: given n = L1* 1 + L2*3 + L3*5 + L7*7 + ..., a partition into odd parts, write each Li in binary, Li = 2^a1 + 2^a2 + 2^a3 + ... where the aj's are all different, then expand n = (2^a1 * 1 + ...)*1 + ... by removing the brackets and we get a partition into distinct parts. For the reverse operation, just keep splitting any even number into halves until no evens remain.
Euler transform of period 2 sequence [1,0,1,0,...]. - Michael Somos, Dec 16 2002
Number of different partial sums 1+[1,2]+[1,3]+[1,4]+..., where [1,x] indicates a choice. E.g., a(6)=4, as we can write 1+1+1+1+1+1, 1+2+3, 1+2+1+1+1, 1+1+3+1. - Jon Perry, Dec 31 2003
a(n) is the sum of the number of partitions of x_j into at most j parts, where j is the index for the j-th triangular number and n-T(j)=x_j. For example; a(12)=partitions into <= 4 parts of 12-T(4)=2 + partitions into <= 3 parts of 12-T(3)=6 + partitions into <= 2 parts of 12-T(2)=9 + partitions into 1 part of 12-T(1)=11 = (2)(11) + (6)(51)(42)(411)(33)(321)(222) + (9)(81)(72)(63)(54)+(11) = 2+7+5+1 = 15. - Jon Perry, Jan 13 2004
Number of partitions of n where if k is the largest part, all parts 1..k are present. - Jon Perry, Sep 21 2005
Jack Grahl and Franklin T. Adams-Watters prove this claim of Jon Perry's by observing that the Ferrers dual of a "gapless" partition is guaranteed to have distinct parts; since the Ferrers dual is an involution, this establishes a bijection between the two sets of partitions. - Allan C. Wechsler, Sep 28 2021
The number of connected threshold graphs having n edges. - Michael D. Barrus (mbarrus2(AT)uiuc.edu), Jul 12 2007
Starting with offset 1 = row sums of triangle A146061 and the INVERT transform of A000700 starting: (1, 0, 1, -1, 1, -1, 1, -2, 2, -2, 2, -3, 3, -3, 4, -5, ...). - Gary W. Adamson, Oct 26 2008
Number of partitions of n in which the largest part occurs an odd number of times and all other parts occur an even number of times. (Such partitions are the duals of the partitions with odd parts.) - David Wasserman, Mar 04 2009
Equals A035363 convolved with A010054. The convolution square of A000009 = A022567 = A000041 convolved with A010054. A000041 = A000009 convolved with A035363. - Gary W. Adamson, Jun 11 2009
Considering all partitions of n into distinct parts: there are A140207(n) partitions of maximal size which is A003056(n), and A051162(n) is the greatest number occurring in these partitions. - Reinhard Zumkeller, Jun 13 2009
Equals left border of triangle A091602 starting with offset 1. - Gary W. Adamson, Mar 13 2010
Number of symmetric unimodal compositions of n+1 where the maximal part appears once. Also number of symmetric unimodal compositions of n where the maximal part appears an odd number of times. - Joerg Arndt, Jun 11 2013
Because for these partitions the exponents of the parts 1, 2, ... are either 0 or 1 (j^0 meaning that part j is absent) one could call these partitions also 'fermionic partitions'. The parts are the levels, that is the positive integers, and the occupation number is either 0 or 1 (like Pauli's exclusion principle). The 'fermionic states' are denoted by these partitions of n. - Wolfdieter Lang, May 14 2014
The set of partitions containing only odd parts forms a monoid under the product described in comments to A047993. - Richard Locke Peterson, Aug 16 2018
Ewell (1973) gives a number of recurrences. - N. J. A. Sloane, Jan 14 2020
a(n) equals the number of permutations p of the set {1,2,...,n+1}, written in one line notation as p = p_1p_2...p_(n+1), satisfying p_(i+1) - p_i <= 1 for 1 <= i <= n, (i.e., those permutations that, when read from left to right, never increase by more than 1) whose major index maj(p) := Sum_{p_i > p_(i+1)} i equals n. For example, of the 16 permutations on 5 letters satisfying p_(i+1) - p_i <= 1, 1 <= i <= 4, there are exactly two permutations whose major index is 4, namely, 5 3 4 1 2 and 2 3 4 5 1. Hence a(4) = 2. See the Bala link in A007318 for a proof. - Peter Bala, Mar 30 2022
Conjecture: Each positive integer n can be written as a_1 + ... + a_k, where a_1,...,a_k are strict partition numbers (i.e., terms of the current sequence) with no one dividing another. This has been verified for n = 1..1350. - Zhi-Wei Sun, Apr 14 2023
Conjecture: For each integer n > 7, a(n) divides none of p(n), p(n) - 1 and p(n) + 1, where p(n) is the number of partitions of n given by A000041. This has been verified for n up to 10^5. - Zhi-Wei Sun, May 20 2023 [Verified for n <= 2*10^6. - Vaclav Kotesovec, May 23 2023]
The g.f. Product_{k >= 0} 1 + x^k = Product_{k >= 0} 1 - x^k + 2*x^k == Product_{k >= 0} 1 - x^k == Sum_{k in Z} (-1)^k*x^(k*(3*k-1)/2) (mod 2) by Euler's pentagonal number theorem. It follows that a(n) is odd iff n = k*(3*k - 1)/2 for some integer k, i.e., iff n is a generalized pentagonal number A001318. - Peter Bala, Jan 07 2025

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + 5*x^7 + 6*x^8 + 8*x^9 + ...
G.f. = q + q^25 + q^49 + 2*q^73 + 2*q^97 + 3*q^121 + 4*q^145 + 5*q^169 + ...
The partitions of n into distinct parts (see A118457) for small n are:
  1: 1
  2: 2
  3: 3, 21
  4: 4, 31
  5: 5, 41, 32
  6: 6, 51, 42, 321
  7: 7, 61, 52, 43, 421
  8: 8, 71, 62, 53, 521, 431
  ...
From _Reinhard Zumkeller_, Jun 13 2009: (Start)
a(8)=6, A140207(8)=#{5+2+1,4+3+1}=2, A003056(8)=3, A051162(8)=5;
a(9)=8, A140207(9)=#{6+2+1,5+3+1,4+3+2}=3, A003056(9)=3, A051162(9)=6;
a(10)=10, A140207(10)=#{4+3+2+1}=1, A003056(10)=4, A051162(10)=4. (End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.
  • George E. Andrews, The Theory of Partitions, Cambridge University Press, 1998, p. 19.
  • George E. Andrews, Number Theory, Dover Publications, 1994, Theorem 12-3, pp. 154-5, and (13-1-1) p. 163.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; see p. 196.
  • T. J. I'a. Bromwich, Introduction to the Theory of Infinite Series, Macmillan, 2nd. ed. 1949, p. 116, Problem 18.
  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 99.
  • William Dunham, The Mathematical Universe, pp. 57-62, J. Wiley, 1994.
  • Leonhard Euler, De partitione numerorum, Novi commentarii academiae scientiarum Petropolitanae 3 (1750/1), 1753, reprinted in: Commentationes Arithmeticae. (Opera Omnia. Series Prima: Opera Mathematica, Volumen Secundum), 1915, Lipsiae et Berolini, 254-294.
  • Ian P. Goulden and David M. Jackson, Combinatorial Enumeration, Wiley, N.Y., 1983, (2.5.1).
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 86.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 277, Theorems 344, 346.
  • Carlos J. Moreno and Samuel S. Wagstaff, Jr., Sums of Squares of Integers, Chapman and Hall, 2006, p. 253.
  • Srinivasa Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. See Table V on page 309.
  • 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 288-290.

Crossrefs

Apart from the first term, equals A052839-1. The rows of A053632 converge to this sequence. When reduced modulo 2 equals the absolute values of A010815. The positions of odd terms given by A001318.
a(n) = Sum_{n=1..m} A097306(n, m), row sums of triangle of number of partitions of n into m odd parts.
Cf. A001318, A000041, A000700, A003724, A004111, A007837, A010815, A035294, A068049, A078408, A081360, A088670, A109950, A109968, A132312, A146061, A035363, A010054, A057077, A089806, A091602, A237515, A118457 (the partitions), A118459 (partition lengths), A015723 (total number of parts), A230957 (boustrophedon transform).
Cf. A167377 (complement).
Cf. A067659 (odd number of parts), A067661 (even number of parts).
Number of r-regular partitions for r = 2 through 12: A000009, A000726, A001935, A035959, A219601, A035985, A261775, A104502, A261776, A328545, A328546.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral)
    a000009 n = a000009_list !! n
    a000009_list = map (pM 1) [0..] where
       pM = memo2 integral integral p
       p _ 0 = 1
       p k m | m < k     = 0
             | otherwise = pM (k + 1) (m - k) + pM (k + 1) m
    -- Reinhard Zumkeller, Sep 09 2015, Nov 05 2013
    
  • Julia
    # uses A010815
    using Memoize
    @memoize function A000009(n)
        n == 0 && return 1
        s = sum((-1)^k*A000009(n - k^2) for k in 1:isqrt(n))
        A010815(n) - 2*s
    end # Peter Luschny, Sep 09 2021
  • Magma
    Coefficients(&*[1+x^m:m in [1..100]])[1..100] where x is PolynomialRing(Integers()).1; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    N := 100; t1 := series(mul(1+x^k,k=1..N),x,N); A000009 := proc(n) coeff(t1,x,n); end;
    spec := [ P, {P=PowerSet(N), N=Sequence(Z,card>=1)} ]: [ seq(combstruct[count](spec, size=n), n=0..58) ];
    spec := [ P, {P=PowerSet(N), N=Sequence(Z,card>=1)} ]: combstruct[allstructs](spec, size=10); # to get the actual partitions for n=10
    A000009 := proc(n)
        local x,m;
        product(1+x^m,m=1..n+1) ;
        expand(%) ;
        coeff(%,x,n) ;
    end proc: # R. J. Mathar, Jun 18 2016
    lim := 99; # Enlarge if more terms are needed.
    simplify(expand(QDifferenceEquations:-QPochhammer(-1, x, lim)/2, x)):
    seq(coeff(%, x, n), n=0..55); # Peter Luschny, Nov 17 2016
    # Alternative:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*add(
         `if`(d::odd, d, 0), d=numtheory[divisors](j)), j=1..n)/n)
        end:
    seq(a(n), n=0..55);  # Alois P. Heinz, Jun 24 2025
  • Mathematica
    PartitionsQ[Range[0, 60]] (* Harvey Dale, Jul 27 2009 *)
    a[ n_] := SeriesCoefficient[ Product[ 1 + x^k, {k, n}], {x, 0, n}]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / Product[ 1 - x^k, {k, 1, n, 2}], {x, 0, n}]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := With[ {t = Log[q] / (2 Pi I)}, SeriesCoefficient[ q^(-1/24) DedekindEta[2 t] / DedekindEta[ t], {q, 0, n}]]; (* Michael Somos, Jul 06 2011 *)
    a[ n_] := SeriesCoefficient[ 1 / QPochhammer[ x, x^2], {x, 0, n}]; (* Michael Somos, May 24 2013 *)
    a[ n_] := SeriesCoefficient[ Series[ QHypergeometricPFQ[ {q}, {q x}, q, - q x], {q, 0, n}] /. x -> 1, {q, 0, n}]; (* Michael Somos, Mar 04 2014 *)
    a[ n_] := SeriesCoefficient[ QHypergeometricPFQ[{}, {}, q, -1] / 2, {q, 0, n}]; (* Michael Somos, Mar 04 2014 *)
    nmax = 60; CoefficientList[Series[Exp[Sum[(-1)^(k+1)/k*x^k/(1-x^k), {k, 1, nmax}]], {x, 0, nmax}], x] (* Vaclav Kotesovec, Aug 25 2015 *)
    nmax = 100; poly = ConstantArray[0, nmax + 1]; poly[[1]] = 1; poly[[2]] = 1; Do[Do[poly[[j + 1]] += poly[[j - k + 1]], {j, nmax, k, -1}];, {k, 2, nmax}]; poly (* Vaclav Kotesovec, Jan 14 2017 *)
  • Maxima
    num_distinct_partitions(60,list); /* Emanuele Munarini, Feb 24 2014 */
    
  • Maxima
    h(n):=if oddp(n)=true then 1 else 0;
    S(n,m):=if n=0 then 1 else if nVladimir Kruchinin, Sep 07 2014 */
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod( k=1, n, 1 + x^k, 1 + x * O(x^n)), n))}; /* Michael Somos, Nov 17 1999 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A) / eta(x + A), n))};
    
  • PARI
    {a(n) = my(c); forpart(p=n, if( n<1 || p[1]<2, c++; for(i=1, #p-1, if( p[i+1] > p[i]+1, c--; break)))); c}; /* Michael Somos, Aug 13 2017 */
    
  • PARI
    lista(nn) = {q='q+O('q^nn); Vec(eta(q^2)/eta(q))} \\ Altug Alkan, Mar 20 2018
    
  • Python
    # uses A010815
    from functools import lru_cache
    from math import isqrt
    @lru_cache(maxsize=None)
    def A000009(n): return 1 if n == 0 else A010815(n)+2*sum((-1)**(k+1)*A000009(n-k**2) for k in range(1,isqrt(n)+1)) # Chai Wah Wu, Sep 08 2021
    
  • Python
    import numpy as np
    n = 1000
    arr = np.zeros(n,dtype=object)
    arr[0] = 1
    for i in range(1,n):
        arr[i:] += arr[:n-i]
    print(arr) # Yigit Oktar, Jul 12 2025
    
  • SageMath
    # uses[EulerTransform from A166861]
    a = BinaryRecurrenceSequence(0, 1)
    b = EulerTransform(a)
    print([b(n) for n in range(56)]) # Peter Luschny, Nov 11 2020
    

Formula

G.f.: Product_{m>=1} (1 + x^m) = 1/Product_{m>=0} (1-x^(2m+1)) = Sum_{k>=0} Product_{i=1..k} x^i/(1-x^i) = Sum_{n>=0} x^(n*(n+1)/2) / Product_{k=1..n} (1-x^k).
G.f.: Sum_{n>=0} x^n*Product_{k=1..n-1} (1+x^k) = 1 + Sum_{n>=1} x^n*Product_{k>=n+1} (1+x^k). - Joerg Arndt, Jan 29 2011
Product_{k>=1} (1+x^(2k)) = Sum_{k>=0} x^(k*(k+1))/Product_{i=1..k} (1-x^(2i)) - Euler (Hardy and Wright, Theorem 346).
Asymptotics: a(n) ~ exp(Pi l_n / sqrt(3)) / ( 4 3^(1/4) l_n^(3/2) ) where l_n = (n-1/24)^(1/2) (Ayoub).
For n > 1, a(n) = (1/n)*Sum_{k=1..n} b(k)*a(n-k), with a(0)=1, b(n) = A000593(n) = sum of odd divisors of n; cf. A000700. - Vladeta Jovovic, Jan 21 2002
a(n) = t(n, 0), t as defined in A079211.
a(n) = Sum_{k=0..n-1} A117195(n,k) = A117192(n) + A117193(n) for n>0. - Reinhard Zumkeller, Mar 03 2006
a(n) = A026837(n) + A026838(n) = A118301(n) + A118302(n); a(A001318(n)) = A051044(n); a(A090864(n)) = A118303(n). - Reinhard Zumkeller, Apr 22 2006
Expansion of 1 / chi(-x) = chi(x) / chi(-x^2) = f(-x) / phi(x) = f(x) / phi(-x^2) = psi(x) / f(-x^2) = f(-x^2) / f(-x) = f(-x^4) / psi(-x) in powers of x where phi(), psi(), chi(), f() are Ramanujan theta functions. - Michael Somos, Mar 12 2011
G.f. is a period 1 Fourier series which satisfies f(-1 / (1152 t)) = 2^(-1/2) / f(t) where q = exp(2 Pi i t). - Michael Somos, Aug 16 2007
Expansion of q^(-1/24) * eta(q^2) / eta(q) in powers of q.
Expansion of q^(-1/24) 2^(-1/2) f2(t) in powers of q = exp(2 Pi i t) where f2() is a Weber function. - Michael Somos, Oct 18 2007
Given g.f. A(x), then B(x) = x * A(x^3)^8 satisfies 0 = f(B(x), B(x^2)) where f(u, v) = v - u^2 + 16*u*v^2 . - Michael Somos, May 31 2005
Given g.f. A(x), then B(x) = x * A(x^8)^3 satisfies 0 = f(B(x), B(x^3)) where f(u, v) = (u^3 - v) * (u + v^3) - 9 * u^3 * v^3. - Michael Somos, Mar 25 2008
From Evangelos Georgiadis, Andrew V. Sutherland, Kiran S. Kedlaya (egeorg(AT)mit.edu), Mar 03 2009: (Start)
a(0)=1; a(n) = 2*(Sum_{k=1..floor(sqrt(n))} (-1)^(k+1) a(n-k^2)) + sigma(n) where sigma(n) = (-1)^j if (n=(j*(3*j+1))/2 OR n=(j*(3*j-1))/2) otherwise sigma(n)=0 (simpler: sigma = A010815). (End)
From Gary W. Adamson, Jun 13 2009: (Start)
The product g.f. = (1/(1-x))*(1/(1-x^3))*(1/(1-x^5))*...; = (1,1,1,...)*
(1,0,0,1,0,0,1,0,0,1,...)*(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,...) * ...; =
a*b*c*... where a, a*b, a*b*c, ... converge to A000009:
1, 1, 1, 2, 2, 2, 3, 3, 3, 4, ... = a*b
1, 1, 1, 2, 2, 3, 4, 4, 5, 6, ... = a*b*c
1, 1, 1, 2, 2, 3, 4, 5, 6, 7, ... = a*b*c*d
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, ... = a*b*c*d*e
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, ... = a*b*c*d*e*f
... (cf. analogous example in A000041). (End)
a(A004526(n)) = A172033(n). - Reinhard Zumkeller, Jan 23 2010
a(n) = P(n) - P(n-2) - P(n-4) + P(n-10) + P(n-14) + ... + (-1)^m P(n-2p_m) + ..., where P(n) is the partition function (A000041) and p_m = m(3m-1)/2 is the m-th generalized pentagonal number (A001318). - Jerome Malenfant, Feb 16 2011
a(n) = A054242(n,0) = A201377(n,0). - Reinhard Zumkeller, Dec 02 2011
More precise asymptotics: a(n) ~ exp(Pi*sqrt((n-1/24)/3)) / (4*3^(1/4)*(n-1/24)^(3/4)) * (1 + (Pi^2-27)/(24*Pi*sqrt(3*(n-1/24))) + (Pi^4-270*Pi^2-1215)/(3456*Pi^2*(n-1/24))). - Vaclav Kotesovec, Nov 30 2015
a(n) = A067661(n) + A067659(n). Wolfdieter Lang, Jan 18 2016
From Vaclav Kotesovec, May 29 2016: (Start)
a(n) ~ exp(Pi*sqrt(n/3))/(4*3^(1/4)*n^(3/4)) * (1 + (Pi/(48*sqrt(3)) - (3*sqrt(3))/(8*Pi))/sqrt(n) + (Pi^2/13824 - 5/128 - 45/(128*Pi^2))/n).
a(n) ~ exp(Pi*sqrt(n/3) + (Pi/(48*sqrt(3)) - 3*sqrt(3)/(8*Pi))/sqrt(n) - (1/32 + 9/(16*Pi^2))/n) / (4*3^(1/4)*n^(3/4)).
(End)
a(n) = A089806(n)*A010815(floor(n/2)) + a(n-1) + a(n-2) - a(n-5) - a(n-7) + a(n-12) + ... + A057077(m-1)*a(n-A001318(m)) + ..., where n > A001318(m). - Gevorg Hmayakyan, Jul 07 2016
a(n) ~ Pi*BesselI(1, Pi*sqrt((n+1/24)/3)) / sqrt(24*n+1). - Vaclav Kotesovec, Nov 08 2016
a(n) = A000041(n) - A047967(n). - R. J. Mathar, Nov 20 2017
Sum_{n>=1} 1/a(n) = A237515. - Amiram Eldar, Nov 15 2020
From Peter Bala, Jan 15 2021: (Start)
G.f.: (1 + x)*Sum_{n >= 0} x^(n*(n+3)/2)/Product_{k = 1..n} (1 - x^k) =
(1 + x)*(1 + x^2)*Sum_{n >= 0} x^(n*(n+5)/2)/Product_{k = 1..n} (1 - x^k) = (1 + x)*(1 + x^2)*(1 + x^3)*Sum_{n >= 0} x^(n*(n+7)/2)/Product_{k = 1..n} (1 - x^k) = ....
G.f.: (1/2)*Sum_{n >= 0} x^(n*(n-1)/2)/Product_{k = 1..n} (1 - x^k) =
(1/2)*(1/(1 + x))*Sum_{n >= 0} x^((n-1)*(n-2)/2)/Product_{k = 1..n} (1 - x^k) = (1/2)*(1/((1 + x)*(1 + x^2)))*Sum_{n >= 0} x^((n-2)*(n-3)/2)/Product_{k = 1..n} (1 - x^k) = ....
G.f.: Sum_{n >= 0} x^n/Product_{k = 1..n} (1 - x^(2*k)) = (1/(1 - x)) * Sum_{n >= 0} x^(3*n)/Product_{k = 1..n} (1 - x^(2*k)) = (1/((1 - x)*(1 - x^3))) * Sum_{n >= 0} x^(5*n)/Product_{k = 1..n} (1 - x^(2*k)) = (1/((1 - x)*(1 - x^3)*(1 - x^5))) * Sum_{n >= 0} x^(7*n)/Product_{k = 1..n} (1 - x^(2*k)) = .... (End)
From Peter Bala, Feb 02 2021: (Start)
G.f.: A(x) = Sum_{n >= 0} x^(n*(2*n-1))/Product_{k = 1..2*n} (1 - x^k). (Set z = x and q = x^2 in Mc Laughlin et al. (2019 ArXiv version), Section 1.3, Identity 7.)
Similarly, A(x) = Sum_{n >= 0} x^(n*(2*n+1))/Product_{k = 1..2*n+1} (1 - x^k). (End)
a(n) = A001227(n) + A238005(n) + A238006(n). - R. J. Mathar, Sep 08 2021
G.f.: A(x) = exp ( Sum_{n >= 1} x^n/(n*(1 - x^(2*n))) ) = exp ( Sum_{n >= 1} (-1)^(n+1)*x^n/(n*(1 - x^n)) ). - Peter Bala, Dec 23 2021
Sum_{n>=0} a(n)/exp(Pi*n) = exp(Pi/24)/2^(1/8) = A292820. - Simon Plouffe, May 12 2023 [Proof: Sum_{n>=0} a(n)/exp(Pi*n) = phi(exp(-2*Pi)) / phi(exp(-Pi)), where phi(q) is the Euler modular function. We have phi(exp(-2*Pi)) = exp(Pi/12) * Gamma(1/4) / (2 * Pi^(3/4)) and phi(exp(-Pi)) = exp(Pi/24) * Gamma(1/4) / (2^(7/8) * Pi^(3/4)), see formulas (14) and (13) in I. Mező, 2013. - Vaclav Kotesovec, May 12 2023]
a(2*n) = Sum_{j=1..n} p(n+j, 2*j) and a(2*n+1) = Sum_{j=1..n+1} p(n+j,2*j-1), where p(n, s) is the number of partitions of n having exactly s parts. - Gregory L. Simay, Aug 30 2023

A007814 Exponent of highest power of 2 dividing n, a.k.a. the binary carry sequence, the ruler sequence, or the 2-adic valuation of n.

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
Offset: 1

Views

Author

John Tromp, Dec 11 1996

Keywords

Comments

This sequence is an exception to my usual rule that when every other term of a sequence is 0 then those 0's should be omitted. In this case we would get A001511. - N. J. A. Sloane
To construct the sequence: start with 0,1, concatenate to get 0,1,0,1. Add + 1 to last term gives 0,1,0,2. Concatenate those 4 terms to get 0,1,0,2,0,1,0,2. Add + 1 to last term etc. - Benoit Cloitre, Mar 06 2003
The sequence is invariant under the following two transformations: increment every element by one (1, 2, 1, 3, 1, 2, 1, 4, ...), put a zero in front and between adjacent elements (0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, ...). The intermediate result is A001511. - Ralf Hinze (ralf(AT)informatik.uni-bonn.de), Aug 26 2003
Fixed point of the morphism 0->01, 1->02, 2->03, 3->04, ..., n->0(n+1), ..., starting from a(1) = 0. - Philippe Deléham, Mar 15 2004
Fixed point of the morphism 0->010, 1->2, 2->3, ..., n->(n+1), .... - Joerg Arndt, Apr 29 2014
a(n) is also the number of times to repeat a step on an even number in the hailstone sequence referenced in the Collatz conjecture. - Alex T. Flood (whiteangelsgrace(AT)gmail.com), Sep 22 2006
Let F(n) be the n-th Fermat number (A000215). Then F(a(r-1)) divides F(n)+2^k for r = k mod 2^n and r != 1. - T. D. Noe, Jul 12 2007
The following relation holds: 2^A007814(n)*(2*A025480(n-1)+1) = A001477(n) = n. (See functions hd, tl and cons in [Paul Tarau 2009].)
a(n) is the number of 0's at the end of n when n is written in base 2.
a(n+1) is the number of 1's at the end of n when n is written in base 2. - M. F. Hasler, Aug 25 2012
Shows which bit to flip when creating the binary reflected Gray code (bits are numbered from the right, offset is 0). That is, A003188(n) XOR A003188(n+1) == 2^A007814(n). - Russ Cox, Dec 04 2010
The sequence is squarefree (in the sense of not containing any subsequence of the form XX) [Allouche and Shallit]. Of course it contains individual terms that are squares (such as 4). - Comment expanded by N. J. A. Sloane, Jan 28 2019
a(n) is the number of zero coefficients in the n-th Stern polynomial, A125184. - T. D. Noe, Mar 01 2011
Lemma: For n < m with r = a(n) = a(m) there exists n < k < m with a(k) > r. Proof: We have n=b2^r and m=c2^r with b < c both odd; choose an even i between them; now a(i2^r) > r and n < i2^r < m. QED. Corollary: Every finite run of consecutive integers has a unique maximum 2-adic valuation. - Jason Kimberley, Sep 09 2011
a(n-2) is the 2-adic valuation of A000166(n) for n >= 2. - Joerg Arndt, Sep 06 2014
a(n) = number of 1's in the partition having Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product_{j=1..r} p_j-th prime (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. Example: a(24)=3; indeed, the partition having Heinz number 24 = 2*2*2*3 is [1,1,1,2]. - Emeric Deutsch, Jun 04 2015
a(n+1) is the difference between the two largest parts in the integer partition having viabin number n (0 is assumed to be a part). Example: a(20) = 2. Indeed, we have 19 = 10011_2, leading to the Ferrers board of the partition [3,1,1]. For the definition of viabin number see the comment in A290253. - Emeric Deutsch, Aug 24 2017
Apart from being squarefree, as noted above, the sequence has the property that every consecutive subsequence contains at least one number an odd number of times. - Jon Richfield, Dec 20 2018
a(n+1) is the 2-adic valuation of Sum_{e=0..n} u^e = (1 + u + u^2 + ... + u^n), for any u of the form 4k+1 (A016813). - Antti Karttunen, Aug 15 2020
{a(n)} represents the "first black hat" strategy for the game of countably infinitely many hats, with a probability of success of 1/3; cf. the Numberphile link below. - Frederic Ruget, Jun 14 2021
a(n) is the least nonnegative integer k for which there does not exist i+j=n and a(i)=a(j)=k (cf. A322523). - Rémy Sigrist and Jianing Song, Aug 23 2022

Examples

			2^3 divides 24, so a(24)=3.
From _Omar E. Pol_, Jun 12 2009: (Start)
Triangle begins:
  0;
  1,0;
  2,0,1,0;
  3,0,1,0,2,0,1,0;
  4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0;
  5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0;
  6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,...
(End)
		

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 27.
  • K. Atanassov, On the 37th and the 38th Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 5 (1999), No. 2, 83-85.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A011371 (partial sums), A094267 (first differences), A001511 (bisection), A346070 (mod 4).
Bisection of A050605 and |A088705|. Pairwise sums are A050603 and A136480. Difference of A285406 and A281264.
This is Guy Steele's sequence GS(1, 4) (see A135416). Cf. A053398(1,n). Column/row 1 of table A050602.
Cf. A007949 (3-adic), A235127 (4-adic), A112765 (5-adic), A122841 (6-adic), A214411 (7-adic), A244413 (8-adic), A122840 (10-adic).
Cf. A086463 (Dgf at s=2).

Programs

  • Haskell
    a007814 n = if m == 0 then 1 + a007814 n' else 0
                where (n', m) = divMod n 2
    -- Reinhard Zumkeller, Jul 05 2013, May 14 2011, Apr 08 2011
    
  • Haskell
    a007814 n | odd n = 0 | otherwise = 1 + a007814 (n `div` 2)
    --  Walt Rorie-Baety, Mar 22 2013
    
  • Magma
    [Valuation(n, 2): n in [1..120]]; // Bruno Berselli, Aug 05 2013
    
  • Maple
    ord := proc(n) local i,j; if n=0 then return 0; fi; i:=0; j:=n; while j mod 2 <> 1 do i:=i+1; j:=j/2; od: i; end proc: seq(ord(n), n=1..111);
    A007814 := n -> padic[ordp](n,2): seq(A007814(n), n=1..111); # Peter Luschny, Nov 26 2010
  • Mathematica
    Table[IntegerExponent[n, 2], {n, 64}] (* Eric W. Weisstein *)
    IntegerExponent[Range[64], 2] (* Eric W. Weisstein, Feb 01 2024 *)
    p=2; Array[ If[ Mod[ #, p ]==0, Select[ FactorInteger[ # ], Function[ q, q[ [ 1 ] ]==p ], 1 ][ [ 1, 2 ] ], 0 ]&, 96 ]
    DigitCount[BitXor[x, x - 1], 2, 1] - 1; a different version based on the same concept: Floor[Log[2, BitXor[x, x - 1]]] (* Jaume Simon Gispert (jaume(AT)nuem.com), Aug 29 2004 *)
    Nest[Join[ #, ReplacePart[ #, Length[ # ] -> Last[ # ] + 1]] &, {0, 1}, 5] (* N. J. Gunther, May 23 2009 *)
    Nest[ Flatten[# /. a_Integer -> {0, a + 1}] &, {0}, 7] (* Robert G. Wilson v, Jan 17 2011 *)
  • PARI
    A007814(n)=valuation(n,2);
    
  • Python
    import math
    def a(n): return int(math.log(n - (n & n - 1), 2)) # Indranil Ghosh, Apr 18 2017
    
  • Python
    def A007814(n): return (~n & n-1).bit_length() # Chai Wah Wu, Jul 01 2022
    
  • R
    sapply(1:100,function(x) sum(gmp::factorize(x)==2)) # Christian N. K. Anderson, Jun 20 2013
    
  • Scheme
    (define (A007814 n) (let loop ((n n) (e 0)) (if (odd? n) e (loop (/ n 2) (+ 1 e))))) ;; Antti Karttunen, Oct 06 2017

Formula

a(n) = A001511(n) - 1.
a(2*n) = A050603(2*n) = A001511(n).
a(n) = A091090(n-1) + A036987(n-1) - 1.
a(n) = 0 if n is odd, otherwise 1 + a(n/2). - Reinhard Zumkeller, Aug 11 2001
Sum_{k=1..n} a(k) = n - A000120(n). - Benoit Cloitre, Oct 19 2002
G.f.: A(x) = Sum_{k>=1} x^(2^k)/(1-x^(2^k)). - Ralf Stephan, Apr 10 2002
G.f. A(x) satisfies A(x) = A(x^2) + x^2/(1-x^2). A(x) = B(x^2) = B(x) - x/(1-x), where B(x) is the g.f. for A001151. - Franklin T. Adams-Watters, Feb 09 2006
Totally additive with a(p) = 1 if p = 2, 0 otherwise.
Dirichlet g.f.: zeta(s)/(2^s-1). - Ralf Stephan, Jun 17 2007
Define 0 <= k <= 2^n - 1; binary: k = b(0) + 2*b(1) + 4*b(2) + ... + 2^(n-1)*b(n-1); where b(x) are 0 or 1 for 0 <= x <= n - 1; define c(x) = 1 - b(x) for 0 <= x <= n - 1; Then: a(k) = c(0) + c(0)*c(1) + c(0)*c(1)*c(2) + ... + c(0)*c(1)...c(n-1); a(k+1) = b(0) + b(0)*b(1) + b(0)*b(1)*b(2) + ... + b(0)*b(1)...b(n-1). - Arie Werksma (werksma(AT)tiscali.nl), May 10 2008
a(n) = floor(A002487(n - 1) / A002487(n)). - Reikku Kulon, Oct 05 2008
Sum_{k=1..n} (-1)^A000120(n-k)*a(k) = (-1)^(A000120(n)-1)*(A000120(n) - A000035(n)). - Vladimir Shevelev, Mar 17 2009
a(A001147(n) + A057077(n-1)) = a(2*n). - Vladimir Shevelev, Mar 21 2009
For n>=1, a(A004760(n+1)) = a(n). - Vladimir Shevelev, Apr 15 2009
2^(a(n)) = A006519(n). - Philippe Deléham, Apr 22 2009
a(n) = A063787(n) - A000120(n). - Gary W. Adamson, Jun 04 2009
a(C(n,k)) = A000120(k) + A000120(n-k) - A000120(n). - Vladimir Shevelev, Jul 19 2009
a(n!) = n - A000120(n). - Vladimir Shevelev, Jul 20 2009
v_{2}(n) = Sum_{r>=1} (r / 2^(r+1)) Sum_{k=0..2^(r+1)-1} e^(2(k*Pi*i(n+2^r))/(2^(r+1))). - A. Neves, Sep 28 2010, corrected Oct 04 2010
a(n) mod 2 = A096268(n-1). - Robert G. Wilson v, Jan 18 2012
a(A005408(n)) = 1; a(A016825(n)) = 3; A017113(a(n)) = 5; A051062(a(n)) = 7; a(n) = (A037227(n)-1)/2. - Reinhard Zumkeller, Jun 30 2012
a((2*n-1)*2^p) = p, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 04 2013
a(n) = A067255(n,1). - Reinhard Zumkeller, Jun 11 2013
a(n) = log_2(n - (n AND n-1)). - Gary Detlefs, Jun 13 2014
a(n) = 1 + A000120(n-1) - A000120(n), where A000120 is the Hamming weight function. - Stanislav Sykora, Jul 14 2014
A053398(n,k) = a(A003986(n-1,k-1)+1); a(n) = A053398(n,1) = A053398(n,n) = A053398(2*n-1,n) = Min_{k=1..n} A053398(n,k). - Reinhard Zumkeller, Aug 04 2014
a((2*x-1)*2^n) = a((2*y-1)*2^n) for positive n, x and y. - Juri-Stepan Gerasimov, Aug 04 2016
a(n) = A285406(n) - A281264(n). - Ralf Steiner, Apr 18 2017
a(n) = A000005(n)/(A000005(2*n) - A000005(n)) - 1. - conjectured by Velin Yanev, Jun 30 2017, proved by Nicholas Stearns, Sep 11 2017
Equivalently to above formula, a(n) = A183063(n) / A001227(n), i.e., a(n) is the number of even divisors of n divided by number of odd divisors of n. - Franklin T. Adams-Watters, Oct 31 2018
a(n)*(n mod 4) = 2*floor(((n+1) mod 4)/3). - Gary Detlefs, Feb 16 2019
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1. - Amiram Eldar, Jul 11 2020
a(n) = 2*Sum_{j=1..floor(log_2(n))} frac(binomial(n, 2^j)*2^(j-1)/n). - Dario T. de Castro, Jul 08 2022
a(n) = A070939(n) - A070939(A030101(n)). - Andrew T. Porter, Dec 16 2022
a(n) = floor((gcd(n, 2^n)^(n+1) mod (2^(n+1)-1)^2)/(2^(n+1)-1)) (see Lemma 3.4 from Mazzanti's 2002 article). - Lorenzo Sauras Altuzarra, Mar 10 2024
a(n) = 1 - A088705(n). - Chai Wah Wu, Sep 18 2024

Extensions

Formula index adapted to the offset of A025480 by R. J. Mathar, Jul 20 2010
Edited by Ralf Stephan, Feb 08 2014

A000312 a(n) = n^n; number of labeled mappings from n points to themselves (endofunctions).

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177, 39346408075296537575424, 1978419655660313589123979
Offset: 0

Views

Author

Keywords

Comments

Also number of labeled pointed rooted trees (or vertebrates) on n nodes.
For n >= 1 a(n) is also the number of n X n (0,1) matrices in which each row contains exactly one entry equal to 1. - Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001
Also the number of labeled rooted trees on (n+1) nodes such that the root is lower than its children. Also the number of alternating labeled rooted ordered trees on (n+1) nodes such that the root is lower than its children. - Cedric Chauve (chauve(AT)lacim.uqam.ca), Mar 27 2002
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i, j)!)) * ((n!/(n - p(i)))!/(Product_{j=1..d(i)} m(i, j)!)). - Thomas Wieder, May 18 2005
All rational solutions to the equation x^y = y^x, with x < y, are given by x = A000169(n+1)/A000312(n), y = A000312(n+1)/A007778(n), where n = 1, 2, 3, ... . - Nick Hobson, Nov 30 2006
a(n) is the total number of leaves in all (n+1)^(n-1) trees on {0,1,2,...,n} rooted at 0. For example, with edges directed away from the root, the trees on {0,1,2} are {0->1,0->2},{0->1->2},{0->2->1} and contain a total of a(2)=4 leaves. - David Callan, Feb 01 2007
Limit_{n->infinity} A000169(n+1)/a(n) = exp(1). Convergence is slow, e.g., it takes n > 74 to get one decimal place correct and n > 163 to get two of them. - Alonso del Arte, Jun 20 2011
Also smallest k such that binomial(k, n) is divisible by n^(n-1), n > 0. - Michel Lagneau, Jul 29 2013
For n >= 2 a(n) is represented in base n as "one followed by n zeros". - R. J. Cano, Aug 22 2014
Number of length-n words over the alphabet of n letters. - Joerg Arndt, May 15 2015
Number of prime parking functions of length n+1. - Rui Duarte, Jul 27 2015
The probability density functions p(x, m=q, n=q, mu=1) = A000312(q)*E(x, q, q) and p(x, m=q, n=1, mu=q) = (A000312(q)/A000142(q-1))*x^(q-1)*E(x, q, 1), with q >= 1, lead to this sequence, see A163931, A274181 and A008276. - Johannes W. Meijer, Jun 17 2016
Satisfies Benford's law [Miller, 2015]. - N. J. A. Sloane, Feb 12 2017
A signed version of this sequence apart from the first term (1, -4, -27, 256, 3125, -46656, ...), has the following property: for every prime p == 1 (mod 2n), (-1)^(n(n-1)/2)*n^n = A057077(n)*a(n) is always a 2n-th power residue modulo p. - Jianing Song, Sep 05 2018
From Juhani Heino, May 07 2019: (Start)
n^n is both Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)
and Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)*i.
The former is the familiar binomial distribution of a throw of n n-sided dice, according to how many times a required side appears, 0 to n. The latter is the same but each term is multiplied by its amount. This means that if the bank pays the player 1 token for each die that has the chosen side, it is always a fair game if the player pays 1 token to enter - neither bank nor player wins on average.
Examples:
2-sided dice (2 coins): 4 = 1 + 2 + 1 = 1*0 + 2*1 + 1*2 (0 omitted from now on);
3-sided dice (3 long triangular prisms): 27 = 8 + 12 + 6 + 1 = 12*1 + 6*2 + 1*3;
4-sided dice (4 long square prisms or 4 tetrahedrons): 256 = 81 + 108 + 54 + 12 + 1 = 108*1 + 54*2 + 12*3 + 1*4;
5-sided dice (5 long pentagonal prisms): 3125 = 1024 + 1280 + 640 + 160 + 20 + 1 = 1280*1 + 640*2 + 160*3 + 20*4 + 1*5;
6-sided dice (6 cubes): 46656 = 15625 + 18750 + 9375 + 2500 + 375 + 30 + 1 = 18750*1 + 9375*2 + 2500*3 + 375*4 + 30*5 + 1*6.
(End)
For each n >= 1 there is a graph on a(n) vertices whose largest independent set has size n and whose independent set sequence is constant (specifically, for each k=1,2,...,n, the graph has n^n independent sets of size k). There is no graph of smaller order with this property (Ball et al. 2019). - David Galvin, Jun 13 2019
For n >= 2 and 1 <= k <= n, a(n)*(n + 1)/4 + a(n)*(k - 1)*(n + 1 - k)/2*n is equal to the sum over all words w = w(1)...w(n) of length n over the alphabet {1, 2, ..., n} of the following quantity: Sum_{i=1..w(k)} w(i). Inspired by Problem 12432 in the AMM (see links). - Sela Fried, Dec 10 2023
Also, dimension of the unique cohomology group of the smallest interval containing the poset of partitions decorated by Perm, i.e. the poset of pointed partitions. - Bérénice Delcroix-Oger, Jun 25 2025

Examples

			G.f. = 1 + x + 4*x^2 + 27*x^3 + 256*x^4 + 3125*x^5 + 46656*x^6 + 823543*x^7 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, pp. 62, 63, 87.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 173, #39.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.37)
  • 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

First column of triangle A055858. Row sums of A066324.
Cf. A001923 (partial sums), A002109 (partial products), A007781 (first differences), A066588 (sum of digits).
Cf. A056665, A081721, A130293, A168658, A275549-A275558 (various classes of endofunctions).

Programs

  • Haskell
    a000312 n = n ^ n
    a000312_list = zipWith (^) [0..] [0..]  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    A000312 := n->n^n: seq(A000312(n), n=0..17);
  • Mathematica
    Array[ #^# &, 16] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Table[Sum[StirlingS2[n, i] i! Binomial[n, i], {i, 0, n}], {n, 0, 20}] (* Geoffrey Critzer, Mar 17 2009 *)
    a[ n_] := If[ n < 1, Boole[n == 0], n^n]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (1 + LambertW[-x]), {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[n < 0, 0, n! SeriesCoefficient[ Nest[ 1 / (1 - x / (1 - Integrate[#, x])) &, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, With[{m = n + 1}, m! SeriesCoefficient[ InverseSeries[ Series[ (x - 1) Log[1 - x], {x, 0, m}]], m]]]; (* Michael Somos, May 24 2014 *)
  • Maxima
    A000312[n]:=if n=0 then 1 else n^n$
    makelist(A000312[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
    
  • PARI
    {a(n) = n^n};
    
  • PARI
    is(n)=my(b,k=ispower(n,,&b));if(k,for(e=1,valuation(k,b), if(k/b^e == e, return(1)))); n==1 \\ Charles R Greathouse IV, Jan 14 2013
    
  • PARI
    {a(n) = my(A = 1 + O(x)); if( n<0, 0, for(k=1, n, A = 1 / (1 - x / (1 - intformal( A)))); n! * polcoeff( A, n))}; /* Michael Somos, May 24 2014 */
    
  • Python
    def A000312(n): return n**n # Chai Wah Wu, Nov 07 2022

Formula

a(n-1) = -Sum_{i=1..n} (-1)^i*i*n^(n-1-i)*binomial(n, i). - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
E.g.f.: 1/(1 + W(-x)), W(x) = principal branch of Lambert's function.
a(n) = Sum_{k>=0} binomial(n, k)*Stirling2(n, k)*k! = Sum_{k>=0} A008279(n,k)*A048993(n,k) = Sum_{k>=0} A019538(n,k)*A007318(n,k). - Philippe Deléham, Dec 14 2003
E.g.f.: 1/(1 - T), where T = T(x) is Euler's tree function (see A000169).
a(n) = A000169(n+1)*A128433(n+1,1)/A128434(n+1,1). - Reinhard Zumkeller, Mar 03 2007
Comment on power series with denominators a(n): Let f(x) = 1 + Sum_{n>=1} x^n/n^n. Then as x -> infinity, f(x) ~ exp(x/e)*sqrt(2*Pi*x/e). - Philippe Flajolet, Sep 11 2008
E.g.f.: 1 - exp(W(-x)) with an offset of 1 where W(x) = principal branch of Lambert's function. - Vladimir Kruchinin, Sep 15 2010
a(n) = (n-1)*a(n-1) + Sum_{i=1..n} binomial(n, i)*a(i-1)*a(n-i). - Vladimir Shevelev, Sep 30 2010
With an offset of 1, the e.g.f. is the compositional inverse ((x - 1)*log(1 - x))^(-1) = x + x^2/2! + 4*x^3/3! + 27*x^4/4! + .... - Peter Bala, Dec 09 2011
a(n) = denominator((1 + 1/n)^n) for n > 0. - Jean-François Alcover, Jan 14 2013
a(n) = A089072(n,n) for n > 0. - Reinhard Zumkeller, Mar 18 2013
a(n) = (n-1)^(n-1)*(2*n) + Sum_{i=1..n-2} binomial(n, i)*(i^i*(n-i-1)^(n-i-1)), n > 1, a(0) = 1, a(1) = 1. - Vladimir Kruchinin, Nov 28 2014
log(a(n)) = lim_{k->infinity} k*(n^(1+1/k) - n). - Richard R. Forberg, Feb 04 2015
From Ilya Gutkovskiy, Jun 18 2016: (Start)
Sum_{n>=1} 1/a(n) = 1.291285997... = A073009.
Sum_{n>=1} 1/a(n)^2 = 1.063887103... = A086648.
Sum_{n>=1} n!/a(n) = 1.879853862... = A094082. (End)
A000169(n+1)/a(n) -> e, as n -> oo. - Daniel Suteu, Jul 23 2016
a(n) = n!*Product_{k=1..n} binomial(n, k)/Product_{k=1..n-1} binomial(n-1, k) = n!*A001142(n)/A001142(n-1). - Tony Foster III, Sep 05 2018
a(n-1) = abs(p_n(2-n)), for n > 2, the single local extremum of the n-th row polynomial of A055137 with Bagula's sign convention. - Tom Copeland, Nov 15 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = A083648. - Amiram Eldar, Jun 25 2021
Limit_{n->oo} (a(n+1)/a(n) - a(n)/a(n-1)) = e (see Brothers/Knox link). - Harlan J. Brothers, Oct 24 2021
Conjecture: a(n) = Sum_{i=0..n} A048994(n, i) * A048993(n+i, n) for n >= 0; proved by Mike Earnest, see link at A354797. - Werner Schulte, Jun 19 2022

A039599 Triangle formed from even-numbered columns of triangle of expansions of powers of x in terms of Chebyshev polynomials U_n(x).

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 5, 9, 5, 1, 14, 28, 20, 7, 1, 42, 90, 75, 35, 9, 1, 132, 297, 275, 154, 54, 11, 1, 429, 1001, 1001, 637, 273, 77, 13, 1, 1430, 3432, 3640, 2548, 1260, 440, 104, 15, 1, 4862, 11934, 13260, 9996, 5508, 2244, 663, 135, 17, 1
Offset: 0

Views

Author

Keywords

Comments

T(n,k) is the number of lattice paths from (0,0) to (n,n) with steps E = (1,0) and N = (0,1) which touch but do not cross the line x - y = k and only situated above this line; example: T(3,2) = 5 because we have EENNNE, EENNEN, EENENN, ENEENN, NEEENN. - Philippe Deléham, May 23 2005
The matrix inverse of this triangle is the triangular matrix T(n,k) = (-1)^(n+k)* A085478(n,k). - Philippe Deléham, May 26 2005
Essentially the same as A050155 except with a leading diagonal A000108 (Catalan numbers) 1, 1, 2, 5, 14, 42, 132, 429, .... - Philippe Deléham, May 31 2005
Number of Grand Dyck paths of semilength n and having k downward returns to the x-axis. (A Grand Dyck path of semilength n is a path in the half-plane x>=0, starting at (0,0), ending at (2n,0) and consisting of steps u=(1,1) and d=(1,-1)). Example: T(3,2)=5 because we have u(d)uud(d),uud(d)u(d),u(d)u(d)du,u(d)duu(d) and duu(d)u(d) (the downward returns to the x-axis are shown between parentheses). - Emeric Deutsch, May 06 2006
Riordan array (c(x),x*c(x)^2) where c(x) is the g.f. of A000108; inverse array is (1/(1+x),x/(1+x)^2). - Philippe Deléham, Feb 12 2007
The triangle may also be generated from M^n*[1,0,0,0,0,0,0,0,...], where M is the infinite tridiagonal matrix with all 1's in the super and subdiagonals and [1,2,2,2,2,2,2,...] in the main diagonal. - Philippe Deléham, Feb 26 2007
Inverse binomial matrix applied to A124733. Binomial matrix applied to A089942. - Philippe Deléham, Feb 26 2007
Number of standard tableaux of shape (n+k,n-k). - Philippe Deléham, Mar 22 2007
From Philippe Deléham, Mar 30 2007: (Start)
This triangle belongs to the family of triangles defined by: T(0,0)=1, T(n,k)=0 if k<0 or if k>n, T(n,0)=x*T(n-1,0)+T(n-1,1), T(n,k)=T(n-1,k-1)+y*T(n-1,k)+T(n-1,k+1) for k>=1. Other triangles arise by choosing different values for (x,y):
(0,0) -> A053121; (0,1) -> A089942; (0,2) -> A126093; (0,3) -> A126970
(1,0) -> A061554; (1,1) -> A064189; (1,2) -> A039599; (1,3) -> A110877;
(1,4) -> A124576; (2,0) -> A126075; (2,1) -> A038622; (2,2) -> A039598;
(2,3) -> A124733; (2,4) -> A124575; (3,0) -> A126953; (3,1) -> A126954;
(3,2) -> A111418; (3,3) -> A091965; (3,4) -> A124574; (4,3) -> A126791;
(4,4) -> A052179; (4,5) -> A126331; (5,5) -> A125906. (End)
The table U(n,k) = Sum_{j=0..n} T(n,j)*k^j is given in A098474. - Philippe Deléham, Mar 29 2007
Sequence read mod 2 gives A127872. - Philippe Deléham, Apr 12 2007
Number of 2n step walks from (0,0) to (2n,2k) and consisting of step u=(1,1) and d=(1,-1) and the path stays in the nonnegative quadrant. Example: T(3,0)=5 because we have uuuddd, uududd, ududud, uduudd, uuddud; T(3,1)=9 because we have uuuudd, uuuddu, uuudud, ududuu, uuduud, uduudu, uudduu, uduuud, uududu; T(3,2)=5 because we have uuuuud, uuuudu, uuuduu, uuduuu, uduuuu; T(3,3)=1 because we have uuuuuu. - Philippe Deléham, Apr 16 2007, Apr 17 2007, Apr 18 2007
Triangular matrix, read by rows, equal to the matrix inverse of triangle A129818. - Philippe Deléham, Jun 19 2007
Let Sum_{n>=0} a(n)*x^n = (1+x)/(1-mx+x^2) = o.g.f. of A_m, then Sum_{k=0..n} T(n,k)*a(k) = (m+2)^n. Related expansions of A_m are: A099493, A033999, A057078, A057077, A057079, A005408, A002878, A001834, A030221, A002315, A033890, A057080, A057081, A054320, A097783, A077416, A126866, A028230, A161591, for m=-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, respectively. - Philippe Deléham, Nov 16 2009
The Kn11, Kn12, Fi1 and Fi2 triangle sums link the triangle given above with three sequences; see the crossrefs. For the definitions of these triangle sums, see A180662. - Johannes W. Meijer, Apr 20 2011
4^n = (n-th row terms) dot (first n+1 odd integer terms). Example: 4^4 = 256 = (14, 28, 20, 7, 1) dot (1, 3, 5, 7, 9) = (14 + 84 + 100 + 49 + 9) = 256. - Gary W. Adamson, Jun 13 2011
The linear system of n equations with coefficients defined by the first n rows solve for diagonal lengths of regular polygons with N= 2n+1 edges; the constants c^0, c^1, c^2, ... are on the right hand side, where c = 2 + 2*cos(2*Pi/N). Example: take the first 4 rows relating to the 9-gon (nonagon), N = 2*4 + 1; with c = 2 + 2*cos(2*Pi/9) = 3.5320888.... The equations are (1,0,0,0) = 1; (1,1,0,0) = c; (2,3,1,0) = c^2; (5,9,5,1) = c^3. The solutions are 1, 2.53208..., 2.87938..., and 1.87938...; the four distinct diagonal lengths of the 9-gon (nonagon) with edge = 1. (Cf. comment in A089942 which uses the analogous operations but with c = 1 + 2*cos(2*Pi/9).) - Gary W. Adamson, Sep 21 2011
Also called the Lobb numbers, after Andrew Lobb, are a natural generalization of the Catalan numbers, given by L(m,n)=(2m+1)*Binomial(2n,m+n)/(m+n+1), where n >= m >= 0. For m=0, we get the n-th Catalan number. See added reference. - Jayanta Basu, Apr 30 2013
From Wolfdieter Lang, Sep 20 2013: (Start)
T(n, k) = A053121(2*n, 2*k). T(n, k) appears in the formula for the (2*n)-th power of the algebraic number rho(N):= 2*cos(Pi/N) = R(N, 2) in terms of the odd-indexed diagonal/side length ratios R(N, 2*k+1) = S(2*k, rho(N)) in the regular N-gon inscribed in the unit circle (length unit 1). S(n, x) are Chebyshev's S polynomials (see A049310):
rho(N)^(2*n) = Sum_{k=0..n} T(n, k)*R(N, 2*k+1), n >= 0, identical in N > = 1. For a proof see the Sep 21 2013 comment under A053121. Note that this is the unreduced version if R(N, j) with j > delta(N), the degree of the algebraic number rho(N) (see A055034), appears.
For the odd powers of rho(n) see A039598. (End)
Unsigned coefficients of polynomial numerators of Eqn. 2.1 of the Chakravarty and Kodama paper, defining the polynomials of A067311. - Tom Copeland, May 26 2016
The triangle is the Riordan square of the Catalan numbers in the sense of A321620. - Peter Luschny, Feb 14 2023

Examples

			Triangle T(n, k) begins:
  n\k     0     1     2     3     4     5    6   7   8  9
  0:      1
  1:      1     1
  2:      2     3     1
  3:      5     9     5     1
  4:     14    28    20     7     1
  5:     42    90    75    35     9     1
  6:    132   297   275   154    54    11    1
  7:    429  1001  1001   637   273    77   13   1
  8:   1430  3432  3640  2548  1260   440  104  15   1
  9:   4862 11934 13260  9996  5508  2244  663 135  17  1
  ... Reformatted by _Wolfdieter Lang_, Dec 21 2015
From _Paul Barry_, Feb 17 2011: (Start)
Production matrix begins
  1, 1,
  1, 2, 1,
  0, 1, 2, 1,
  0, 0, 1, 2, 1,
  0, 0, 0, 1, 2, 1,
  0, 0, 0, 0, 1, 2, 1,
  0, 0, 0, 0, 0, 1, 2, 1 (End)
From _Wolfdieter Lang_, Sep 20 2013: (Start)
Example for rho(N) = 2*cos(Pi/N) powers:
n=2: rho(N)^4 = 2*R(N,1) + 3*R(N,3) + 1*R(N, 5) =
  2 + 3*S(2, rho(N)) + 1*S(4, rho(N)), identical in N >= 1. For N=4 (the square with only one distinct diagonal), the degree delta(4) = 2, hence R(4, 3) and R(4, 5) can be reduced, namely to R(4, 1) = 1 and R(4, 5) = -R(4,1) = -1, respectively. Therefore, rho(4)^4 =(2*cos(Pi/4))^4 = 2 + 3 -1 = 4. (End)
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 796.
  • T. Myers and L. Shapiro, Some applications of the sequence 1, 5, 22, 93, 386, ... to Dyck paths and ordered trees, Congressus Numerant., 204 (2010), 93-104.

Crossrefs

Row sums: A000984.
Triangle sums (see the comments): A000958 (Kn11), A001558 (Kn12), A088218 (Fi1, Fi2).

Programs

  • Magma
    /* As triangle */ [[Binomial(2*n, k+n)*(2*k+1)/(k+n+1): k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Oct 16 2015
    
  • Maple
    T:=(n,k)->(2*k+1)*binomial(2*n,n-k)/(n+k+1): for n from 0 to 12 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form # Emeric Deutsch, May 06 2006
    T := proc(n, k) option remember; if k = n then 1 elif k > n then 0 elif k = 0 then T(n-1, 0) + T(n-1,1) else T(n-1, k-1) + 2*T(n-1, k) + T(n-1, k+1) fi end:
    seq(seq(T(n, k), k = 0..n), n = 0..9) od; # Peter Luschny, Feb 14 2023
  • Mathematica
    Table[Abs[Differences[Table[Binomial[2 n, n + i], {i, 0, n + 1}]]], {n, 0,7}] // Flatten (* Geoffrey Critzer, Dec 18 2011 *)
    Join[{1},Flatten[Table[Binomial[2n-1,n-k]-Binomial[2n-1,n-k-2],{n,10},{k,0,n}]]] (* Harvey P. Dale, Dec 18 2011 *)
    Flatten[Table[Binomial[2*n,m+n]*(2*m+1)/(m+n+1),{n,0,9},{m,0,n}]] (* Jayanta Basu, Apr 30 2013 *)
  • PARI
    a(n, k) = (2*n+1)/(n+k+1)*binomial(2*k, n+k)
    trianglerows(n) = for(x=0, n-1, for(y=0, x, print1(a(y, x), ", ")); print(""))
    trianglerows(10) \\ Felix Fröhlich, Jun 24 2016
  • Sage
    # Algorithm of L. Seidel (1877)
    # Prints the first n rows of the triangle
    def A039599_triangle(n) :
        D = [0]*(n+2); D[1] = 1
        b = True ; h = 1
        for i in range(2*n-1) :
            if b :
                for k in range(h,0,-1) : D[k] += D[k-1]
                h += 1
            else :
                for k in range(1,h, 1) : D[k] += D[k+1]
            if b : print([D[z] for z in (1..h-1)])
            b = not b
    A039599_triangle(10)  # Peter Luschny, May 01 2012
    

Formula

T(n,k) = C(2*n-1, n-k) - C(2*n-1, n-k-2), n >= 1, T(0,0) = 1.
From Emeric Deutsch, May 06 2006: (Start)
T(n,k) = (2*k+1)*binomial(2*n,n-k)/(n+k+1).
G.f.: G(t,z)=1/(1-(1+t)*z*C), where C=(1-sqrt(1-4*z))/(2*z) is the Catalan function. (End)
The following formulas were added by Philippe Deléham during 2003 to 2009: (Start)
Triangle T(n, k) read by rows; given by A000012 DELTA A000007, where DELTA is Deléham's operator defined in A084938.
T(n, k) = C(2*n, n-k)*(2*k+1)/(n+k+1). Sum(k>=0; T(n, k)*T(m, k) = A000108(n+m)); A000108: numbers of Catalan.
T(n, 0) = A000108(n); T(n, k) = 0 if k>n; for k>0, T(n, k) = Sum_{j=1..n} T(n-j, k-1)*A000108(j).
T(n, k) = A009766(n+k, n-k) = A033184(n+k+1, 2k+1).
G.f. for column k: Sum_{n>=0} T(n, k)*x^n = x^k*C(x)^(2*k+1) where C(x) = Sum_{n>=0} A000108(n)*x^n is g.f. for Catalan numbers, A000108.
T(0, 0) = 1, T(n, k) = 0 if n<0 or n=1, T(n, k) = T(n-1, k-1) + 2*T(n-1, k) + T(n-1, k+1).
a(n) + a(n+1) = 1 + A000108(m+1) if n = m*(m+3)/2; a(n) + a(n+1) = A039598(n) otherwise.
T(n, k) = A050165(n, n-k).
Sum_{j>=0} T(n-k, j)*A039598(k, j) = A028364(n, k).
Matrix inverse of the triangle T(n, k) = (-1)^(n+k)*binomial(n+k, 2*k) = (-1)^(n+k)*A085478(n, k).
Sum_{k=0..n} T(n, k)*x^k = A000108(n), A000984(n), A007854(n), A076035(n), A076036(n) for x = 0, 1, 2, 3, 4.
Sum_{k=0..n} (2*k+1)*T(n, k) = 4^n.
T(n, k)*(-2)^(n-k) = A114193(n, k).
Sum_{k>=h} T(n,k) = binomial(2n,n-h).
Sum_{k=0..n} T(n,k)*5^k = A127628(n).
Sum_{k=0..n} T(n,k)*7^k = A115970(n).
T(n,k) = Sum_{j=0..n-k} A106566(n+k,2*k+j).
Sum_{k=0..n} T(n,k)*6^k = A126694(n).
Sum_{k=0..n} T(n,k)*A000108(k) = A007852(n+1).
Sum_{k=0..floor(n/2)} T(n-k,k) = A000958(n+1).
Sum_{k=0..n} T(n,k)*(-1)^k = A000007(n).
Sum_{k=0..n} T(n,k)*(-2)^k = (-1)^n*A064310(n).
T(2*n,n) = A126596(n).
Sum_{k=0..n} T(n,k)*(-x)^k = A000007(n), A126983(n), A126984(n), A126982(n), A126986(n), A126987(n), A127017(n), A127016(n), A126985(n), A127053(n) for x=1,2,3,4,5,6,7,8,9,10 respectively.
Sum_{j>=0} T(n,j)*binomial(j,k) = A116395(n,k).
T(n,k) = Sum_{j>=0} A106566(n,j)*binomial(j,k).
T(n,k) = Sum_{j>=0} A127543(n,j)*A038207(j,k).
Sum_{k=0..floor(n/2)} T(n-k,k)*A000108(k) = A101490(n+1).
T(n,k) = A053121(2*n,2*k).
Sum_{k=0..n} T(n,k)*sin((2*k+1)*x) = sin(x)*(2*cos(x))^(2*n).
T(n,n-k) = Sum_{j>=0} (-1)^(n-j)*A094385(n,j)*binomial(j,k).
Sum_{j>=0} A110506(n,j)*binomial(j,k) = Sum_{j>=0} A110510(n,j)*A038207(j,k) = T(n,k)*2^(n-k).
Sum_{j>=0} A110518(n,j)*A027465(j,k) = Sum_{j>=0} A110519(n,j)*A038207(j,k) = T(n,k)*3^(n-k).
Sum_{k=0..n} T(n,k)*A001045(k) = A049027(n), for n>=1.
Sum_{k=0..n} T(n,k)*a(k) = (m+2)^n if Sum_{k>=0} a(k)*x^k = (1+x)/(x^2-m*x+1).
Sum_{k=0..n} T(n,k)*A040000(k) = A001700(n).
Sum_{k=0..n} T(n,k)*A122553(k) = A051924(n+1).
Sum_{k=0..n} T(n,k)*A123932(k) = A051944(n).
Sum_{k=0..n} T(n,k)*k^2 = A000531(n), for n>=1.
Sum_{k=0..n} T(n,k)*A000217(k) = A002457(n-1), for n>=1.
Sum{j>=0} binomial(n,j)*T(j,k)= A124733(n,k).
Sum_{k=0..n} T(n,k)*x^(n-k) = A000012(n), A000984(n), A089022(n), A035610(n), A130976(n), A130977(n), A130978(n), A130979(n), A130980(n), A131521(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 respectively.
Sum_{k=0..n} T(n,k)*A005043(k) = A127632(n).
Sum_{k=0..n} T(n,k)*A132262(k) = A089022(n).
T(n,k) + T(n,k+1) = A039598(n,k).
T(n,k) = A128899(n,k)+A128899(n,k+1).
Sum_{k=0..n} T(n,k)*A015518(k) = A076025(n), for n>=1. Also Sum_{k=0..n} T(n,k)*A015521(k) = A076026(n), for n>=1.
Sum_{k=0..n} T(n,k)*(-1)^k*x^(n-k) = A033999(n), A000007(n), A064062(n), A110520(n), A132863(n), A132864(n), A132865(n), A132866(n), A132867(n), A132869(n), A132897(n) for x = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Sum_{k=0..n} T(n,k)*(-1)^(k+1)*A000045(k) = A109262(n), A000045:= Fibonacci numbers.
Sum_{k=0..n} T(n,k)*A000035(k)*A016116(k) = A143464(n).
Sum_{k=0..n} T(n,k)*A016116(k) = A101850(n).
Sum_{k=0..n} T(n,k)*A010684(k) = A100320(n).
Sum_{k=0..n} T(n,k)*A000034(k) = A029651(n).
Sum_{k=0..n} T(n,k)*A010686(k) = A144706(n).
Sum_{k=0..n} T(n,k)*A006130(k-1) = A143646(n), with A006130(-1)=0.
T(n,2*k)+T(n,2*k+1) = A118919(n,k).
Sum_{k=0..j} T(n,k) = A050157(n,j).
Sum_{k=0..2} T(n,k) = A026012(n); Sum_{k=0..3} T(n,k)=A026029(n).
Sum_{k=0..n} T(n,k)*A000045(k+2) = A026671(n).
Sum_{k=0..n} T(n,k)*A000045(k+1) = A026726(n).
Sum_{k=0..n} T(n,k)*A057078(k) = A000012(n).
Sum_{k=0..n} T(n,k)*A108411(k) = A155084(n).
Sum_{k=0..n} T(n,k)*A057077(k) = 2^n = A000079(n).
Sum_{k=0..n} T(n,k)*A057079(k) = 3^n = A000244(n).
Sum_{k=0..n} T(n,k)*(-1)^k*A011782(k) = A000957(n+1).
(End)
T(n,k) = Sum_{j=0..k} binomial(k+j,2j)*(-1)^(k-j)*A000108(n+j). - Paul Barry, Feb 17 2011
Sum_{k=0..n} T(n,k)*A071679(k+1) = A026674(n+1). - Philippe Deléham, Feb 01 2014
Sum_{k=0..n} T(n,k)*(2*k+1)^2 = (4*n+1)*binomial(2*n,n). - Werner Schulte, Jul 22 2015
Sum_{k=0..n} T(n,k)*(2*k+1)^3 = (6*n+1)*4^n. - Werner Schulte, Jul 22 2015
Sum_{k=0..n} (-1)^k*T(n,k)*(2*k+1)^(2*m) = 0 for 0 <= m < n (see also A160562). - Werner Schulte, Dec 03 2015
T(n,k) = GegenbauerC(n-k,-n+1,-1) - GegenbauerC(n-k-1,-n+1,-1). - Peter Luschny, May 13 2016
T(n,n-2) = A014107(n). - R. J. Mathar, Jan 30 2019
T(n,n-3) = n*(2*n-1)*(2*n-5)/3. - R. J. Mathar, Jan 30 2019
T(n,n-4) = n*(n-1)*(2*n-1)*(2*n-7)/6. - R. J. Mathar, Jan 30 2019
T(n,n-5) = n*(n-1)*(2*n-1)*(2*n-3)*(2*n-9)/30. - R. J. Mathar, Jan 30 2019

Extensions

Corrected by Philippe Deléham, Nov 26 2009, Dec 14 2009

A006950 G.f.: Product_{k>=1} (1 + x^(2*k - 1)) / (1 - x^(2*k)).

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 7, 10, 13, 16, 21, 28, 35, 43, 55, 70, 86, 105, 130, 161, 196, 236, 287, 350, 420, 501, 602, 722, 858, 1016, 1206, 1431, 1687, 1981, 2331, 2741, 3206, 3740, 4368, 5096, 5922, 6868, 7967, 9233, 10670, 12306, 14193, 16357, 18803, 21581
Offset: 0

Views

Author

Keywords

Comments

Also the number of partitions of n in which all odd parts are distinct. There is no restriction on the even parts. E.g., a(9)=13 because "9 = 8+1 = 7+2 = 6+3 = 6+2+1 = 5+4 = 5+3+1 = 5+2+2 = 4+4+1 = 4+3+2 = 4+2+2+1 = 3+2+2+2 = 2+2+2+2+1". - Noureddine Chair, Feb 03 2005
Number of partitions of n in which each even part occurs with even multiplicity. There is no restriction on the odd parts.
Also the number of partitions of n into parts not congruent to 2 mod 4. - James Sellers, Feb 08 2002
Coincides with the sequence of numbers of nilpotent conjugacy classes in the Lie algebras o(n) of skew-symmetric n X n matrices, n=0,1,2,3,... (the cases n=0,1 being degenerate). This sequence, A015128 and A000041 together cover the nilpotent conjugacy classes in the classical A,B,C,D series of Lie algebras. - Alexander Elashvili, Sep 08 2003
Poincaré series [or Poincare series] (or Molien series) for symmetric invariants in F_2(b_1, b_2, ... b_n) ⊗ E(e_1, e_2, ... e_n) with b_i 2-dimensional, e_i one-dimensional and the permutation action of S_n, in the case n=2.
Equals polcoeff inverse of A010054 with alternate signs. - Gary W. Adamson, Mar 15 2010
It appears that this sequence is related to the generalized hexagonal numbers (A000217) in the same way as the partition numbers A000041 are related to the generalized pentagonal numbers A001318. (See the table in comments section of A195825.) Conjecture: this is 1 together with the row sums of triangle A195836, also column 1 of A195836, also column 2 of the square array A195825. - Omar E. Pol, Oct 09 2011
Since this is also column 2 of A195825 so the sequence contains only one plateau [1, 1, 1] of level 1 and length 3. For more information see A210843. - Omar E. Pol, Jun 27 2012
Convolution of A035363 and A000700. - Vaclav Kotesovec, Aug 17 2015
Also the number of ways to stack n triangles in a valley (pointing upwards or downwards depending on row parity). - Seiichi Manyama, Jul 07 2018

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 5*x^6 + 7*x^7 + 10*x^8 + 13*x^9 + ...
G.f. = q^-1 + q^7 + q^15 + 2*q^23 + 3*q^31 + 4*q^39 + 5*q^47 + 7*q^55 + 10*q^63 + ...
From _Seiichi Manyama_, Jul 07 2018: (Start)
n | the ways to stack n triangles in a valley
--+------------------------------------------------------
1 | *---*
  |  \ /
  |   *
  |
2 |   *
  |  / \
  | *---*
  |  \ /
  |   *
  |
3 |   *---*     *---*
  |  / \ /       \ / \
  | *---*         *---*
  |  \ /           \ /
  |   *             *
  |
4 |     *                       *
  |    / \                     / \
  |   *---*     *---*---*     *---*
  |  / \ /       \ / \ /       \ / \
  | *---*         *---*         *---*
  |  \ /           \ /           \ /
  |   *             *             *
  |
5 |     *---*         *         *         *---*
  |    / \ /         / \       / \         \ / \
  |   *---*     *---*---*     *---*---*     *---*
  |  / \ /       \ / \ /       \ / \ /       \ / \
  | *---*         *---*         *---*         *---*
  |  \ /           \ /           \ /           \ /
  |   *             *             *             *
  |
6 |       *
  |      / \
  |     *---*         *---*     *   *     *---*
  |    / \ /         / \ /     / \ / \     \ / \
  |   *---*     *---*---*     *---*---*     *---*---*
  |  / \ /       \ / \ /       \ / \ /       \ / \ /
  | *---*         *---*         *---*         *---*
  |  \ /           \ /           \ /           \ /
  |   *             *             *             *
  |   *
  |  / \
  | *---*
  |  \ / \
  |   *---*
  |    \ / \
  |     *---*
  |      \ /
  |       *
(End)
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 2004; p. 108.
  • M. D. Hirschhorn, The Power of q, Springer, 2017. See pod, page 297.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See also Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).
Cf. A163203.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+`if`(i>n, 0, b(n-i, i-irem(i, 2)))))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 06 2013
  • Mathematica
    CoefficientList[ Series[ Product[(1 + x^(2k - 1))/(1 - x^(2k)), {k, 25}], {x, 0, 50}], x] (* Robert G. Wilson v, Jun 28 2012 *)
    CoefficientList[Series[x*QPochhammer[-1/x, x^2] / ((1+x)*QPochhammer[x^2, x^2]), {x, 0, 50}], x] (* Vaclav Kotesovec, Aug 17 2015 *)
    CoefficientList[Series[2*(-x)^(1/8) / EllipticTheta[2, 0, Sqrt[-x]], {x, 0, 50}], x] (* Vaclav Kotesovec, Aug 17 2015 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i-Mod[i, 2]]]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 11 2018, after Alois P. Heinz *)
  • PARI
    {a(n)=polcoeff(exp(sum(m=1, n+1, sumdiv(m, d, (-1)^(m-d)*d)*x^m/m)+x*O(x^n)), n)} \\ Paul D. Hanna, Jul 22 2009
    (GW-BASIC)
    ' A program with two A-numbers (Note that here A000217 are the generalized hexagonal numbers):
    10 Dim A000217(100), A057077(100), a(100): a(0)=1
    20 For n = 1 to 51: For j = 1 to n
    30 If A000217(j) <= n then a(n) = a(n) + A057077(j-1)*a(n - A000217(j))
    40 Next j: Print a(n-1);: Next n ' Omar E. Pol, Jun 10 2012

Formula

a(n) = (1/n)*Sum_{k=1..n} (-1)^(k+1)*A002129(k)*a(n-k), n > 1, a(0)=1. - Vladeta Jovovic, Feb 05 2002
G.f.: 1/Sum_{k>=0} (-x)^(k*(k+1)/2). - Vladeta Jovovic, Sep 22 2002 [corrected by Vaclav Kotesovec, Aug 17 2015]
a(n) = A059777(n-1)+A059777(n), n > 0. - Vladeta Jovovic, Sep 22 2002
G.f.: Product_{m>=1} (1+x^m)^(if A001511(m) > 1, A001511(m)-1 else A001511(m)). - Jon Perry, Apr 15 2005
Expansion of 1 / psi(-x) in powers of x where psi() is a Ramanujan theta function.
Expansion of q^(1/8) * eta(q^2) / (eta(q) * eta(q^4)) in powers of q.
Convolution inverse of A106459. - Michael Somos, Nov 02 2005
G.f.: exp( Sum_{n>=1} [Sum_{d|n} (-1)^(n-d)*d] * x^n/n ). - Paul D. Hanna, Jul 22 2009
a(n) ~ (8*n+1) * cosh(sqrt(8*n-1)*Pi/4) / (16*sqrt(2)*n^2) - sinh(sqrt(8*n-1)*Pi/4) / (2*Pi*n^(3/2)) ~ exp(Pi*sqrt(n/2))/(4*sqrt(2)*n) * (1 - (2/Pi + Pi/16)/sqrt(2*n) + (3/16 + Pi^2/1024)/n). - Vaclav Kotesovec, Aug 17 2015, extended Jan 09 2017
Can be computed recursively by Sum_{j>=0} (-1)^(ceiling(j/2)) a(n - j(j+1)/2) = 0, for n > 0. [Merca, Theorem 4.3] - Eric M. Schmidt, Sep 21 2017
a(n) = A000041(n) - A085642(n), for n >= 1. - Wouter Meeussen, Dec 20 2017

Extensions

G.f. and more terms from Vladeta Jovovic, Feb 05 2002

A009545 Expansion of e.g.f. sin(x)*exp(x).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Also first of the two associated sequences a(n) and b(n) built from a(0)=0 and b(0)=1 with the formulas a(n) = a(n-1) + b(n-1) and b(n) = -a(n-1) + b(n-1). The initial terms of the second sequence b(n) are 1, 1, 0, -2, -4, -4, 0, 8, 16, 16, 0, -32, -64, -64, 0, 128, 256, ... The points Mn(a(n)+b(n)*I) of the complex plane are located on the spiral logarithmic rho = 2*(1/2)^(2*theta)/Pi) and on the straight lines drawn from the origin with slopes: infinity, 1/2, 0, -1/2. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 30 2007
A000225: (1, 3, 7, 15, 31, ...) = 2^n - 1 = INVERT transform of A009545 starting (1, 2, 2, 0, -4, -8, ...). (Cf. comments in A144081). - Gary W. Adamson, Sep 10 2008
Pisano period lengths: 1, 1, 8, 1, 4, 8, 24, 1, 24, 4, 40, 8, 12, 24, 8, 1, 16, 24, 72, 4, ... - R. J. Mathar, Aug 10 2012
The variant 0, 1, -2, 2, 0, -4, 8, -8, 0, 16, -32, 32, 0, -64, (with different signs) is the Lucas U(-2,2) sequence. - R. J. Mathar, Jan 08 2013
(1+i)^n = A146559(n) + a(n)*i where i = sqrt(-1). - Philippe Deléham, Feb 13 2013
This is the Lucas U(2,2) sequence. - Raphie Frank, Nov 28 2015
{A146559, A009545} are the difference analogs of {cos(x),sin(x)} (cf. [Shevelev] link). - Vladimir Shevelev, Jun 08 2017

Crossrefs

Cf. A009116. For minor variants of this sequence see A108520, A084102, A099087.
a(2*n) = A056594(n)*2^n, n >= 1, a(2*n+1) = A057077(n)*2^n.
This is the next term in the sequence A015518, A002605, A000129, A000079, A001477.
Cf. A000225, A144081. - Gary W. Adamson, Sep 10 2008
Cf. A146559.

Programs

  • Magma
    I:=[0,1,2,2]; [n le 4 select I[n] else -4*Self(n-4): n in [1..60]]; // Vincenzo Librandi, Nov 29 2015
    
  • Maple
    t1 := sum(n*x^n, n=0..100): F := series(t1/(1+x*t1), x, 100): for i from 0 to 50 do printf(`%d, `, coeff(F, x, i)) od: # Zerinvary Lajos, Mar 22 2009
    G(x):=exp(x)*sin(x): f[0]:=G(x): for n from 1 to 54 do f[n]:=diff(f[n-1],x) od: x:=0: seq(f[n],n=0..50 ); # Zerinvary Lajos, Apr 05 2009
    A009545 := n -> `if`(n<2, n, 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], 2)):
    seq(simplify(A009545(n)), n=0..50); # Peter Luschny, Dec 17 2015
  • Mathematica
    nn=104; Range[0,nn-1]! CoefficientList[Series[Sin[x]Exp[x], {x,0,nn}], x] (* T. D. Noe, May 26 2007 *)
    Join[{a=0,b=1},Table[c=2*b-2*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 17 2011 *)
    f[n_] := (1 + I)^(n - 2) + (1 - I)^(n - 2); Array[f, 51, 0] (* Robert G. Wilson v, May 30 2011 *)
    LinearRecurrence[{2,-2},{0,1},110] (* Harvey P. Dale, Oct 13 2011 *)
  • PARI
    x='x+O('x^66); Vec(serlaplace(exp(x)*sin(x))) /* Joerg Arndt, Apr 24 2011 */
    
  • PARI
    x='x+O('x^100); concat(0, Vec(x/(1-2*x+2*x^2))) \\ Altug Alkan, Dec 04 2015
    
  • Python
    def A009545(n): return ((0, 1, 2, 2)[n&3]<<((n>>1)&-2))*(-1 if n&4 else 1) # Chai Wah Wu, Feb 16 2024
  • Sage
    [lucas_number1(n,2,2) for n in range(0, 51)] # Zerinvary Lajos, Apr 23 2009
    
  • Sage
    def A146559():
        x, y = 0, -1
        while True:
            yield x
            x, y = x - y, x + y
    a = A146559(); [next(a) for i in range(40)]  # Peter Luschny, Jul 11 2013
    

Formula

a(0)=0; a(1)=1; a(2)=2; a(3)=2; a(n) = -4*a(n-4), n>3. - Larry Reeves (larryr(AT)acm.org), Aug 24 2000
Imaginary part of (1+i)^n. - Marc LeBrun
G.f.: x/(1 - 2*x + 2*x^2).
E.g.f.: sin(x)*exp(x).
a(n) = S(n-1, sqrt(2))*(sqrt(2))^(n-1) with S(n, x)= U(n, x/2) Chebyshev's polynomials of the 2nd kind, Cf. A049310, S(-1, x) := 0.
a(n) = ((1+i)^n - (1-i)^n)/(2*i) = 2*a(n-1) - 2*a(n-2) (with a(0)=0 and a(1)=1). - Henry Bottomley, May 10 2001
a(n) = (1+i)^(n-2) + (1-i)^(n-2). - Benoit Cloitre, Oct 28 2002
a(n) = Sum_{k=0..n-1} (-1)^floor(k/2)*binomial(n-1, k). - Benoit Cloitre, Jan 31 2003
a(n) = 2^(n/2)sin(Pi*n/4). - Paul Barry, Sep 17 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k+1)*(-1)^k. - Paul Barry, Sep 20 2003
a(n+1) = Sum_{k=0..n} 2^k*A109466(n,k). - Philippe Deléham, Nov 13 2006
a(n) = 2*((1/2)^(2*theta(n)/Pi))*cos(theta(n)) where theta(4*p+1) = p*Pi + Pi/2, theta(4*p+2) = p*Pi + Pi/4, theta(4*p+3) = p*Pi - Pi/4, theta(4*p+4) = p*Pi - Pi/2, or a(0)=0, a(1)=1, a(2)=2, a(3)=2, and for n>3 a(n)=-4*a(n-4). Same formulas for the second sequence replacing cosines with sines. For example: a(0) = 0, b(0) = 1; a(1) = 0+1 = 1, b(1) = -0+1 = 1; a(2) = 1+1 = 2, b(2) = -1+1 = 0; a(3) = 2+0 = 2, b(3) = -2+0 = -2. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 30 2007
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), n > 3, which implies the sequence is identical to its fourth differences. Binomial transform of 0, 1, 0, -1. - Paul Curtz, Dec 21 2007
Logarithm g.f. arctan(x/(1-x)) = Sum_{n>0} a(n)/n*x^n. - Vladimir Kruchinin, Aug 11 2010
a(n) = A046978(n) * A016116(n). - Paul Curtz, Apr 24 2011
E.g.f.: exp(x) * sin(x) = x + x^2/(G(0)-x); G(k) = 2k + 1 + x - x*(2k+1)/(4k+3+x+x^2*(4k+3)/( (2k+2)*(4k+5) - x^2 - x*(2k+2)*(4k+5)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Nov 15 2011
a(n) = Im( (1+i)^n ) where i=sqrt(-1). - Stanislav Sykora, Jun 11 2012
G.f.: x*U(0) where U(k) = 1 + x*(k+3) - x*(k+1)/U(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 10 2012
G.f.: G(0)*x/(2*(1-x)), where G(k) = 1 + 1/(1 - x*(k+1)/(x*(k+2) + 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 25 2013
G.f.: x + x^2*W(0), where W(k) = 1 + 1/(1 - x*(k+1)/( x*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 28 2013
G.f.: Q(0)*x/2, where Q(k) = 1 + 1/(1 - x*(4*k+2 - 2*x)/( x*(4*k+4 - 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 06 2013
a(n) = (A^n - B^n)/(A - B), where A = 1 + i and B = 1 - i; A and B are solutions of x^2 - 2*x + 2 = 0. - Raphie Frank, Nov 28 2015
a(n) = 2^(n-1)*hypergeom([1-n/2, (1-n)/2], [1-n], 2) for n >= 2. - Peter Luschny, Dec 17 2015
a(k+m) = a(k)*A146559(m) + a(m)*A146559(k). - Vladimir Shevelev, Jun 08 2017

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997
More terms from Larry Reeves (larryr(AT)acm.org), Aug 24 2000
Definition corrected by Joerg Arndt, Apr 24 2011

A195825 Square array T(n,k) read by antidiagonals, n>=0, k>=1, which arises from a generalization of Euler's Pentagonal Number Theorem.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 5, 2, 1, 1, 1, 7, 3, 1, 1, 1, 1, 11, 4, 2, 1, 1, 1, 1, 15, 5, 3, 1, 1, 1, 1, 1, 22, 7, 4, 2, 1, 1, 1, 1, 1, 30, 10, 4, 3, 1, 1, 1, 1, 1, 1, 42, 13, 5, 4, 2, 1, 1, 1, 1, 1, 1, 56, 16, 7, 4, 3, 1, 1, 1, 1, 1, 1, 1, 77, 21, 10, 4
Offset: 0

Views

Author

Omar E. Pol, Sep 24 2011

Keywords

Comments

In the infinite square array the column k is related to the generalized m-gonal numbers, where m = k+4. For example: the first column is related to the generalized pentagonal numbers A001318. The second column is related to the generalized hexagonal numbers A000217 (note that A000217 is also the entry for the triangular numbers). And so on ... (see the program in which A195152 is a table of generalized m-gonal numbers).
In the following table Euler's Pentagonal Number Theorem is represented by the entries A001318, A195310, A175003 and A000041 (see below the first row of the table):
========================================================
. Column k of
. this square
. Generalized Triangle Triangle array A195825
k m m-gonal "A" "B" [row sums of
. numbers triangle "B"
. with a(0)=1]
========================================================
...
It appears that column 2 of the square array is A006950.
It appears that column 3 of the square array is A036820.
Conjecture: if k is odd then column k contains (k+1)/2 plateaus whose levels are the first (k+1)/2 terms of A210843 and whose lengths are k+1, k-1, k-3, k-5, ... 2. Otherwise, if k is even then column k contains k/2 plateaus whose levels are the first k/2 terms of A210843 and whose lengths are k+1, k-1, k-3, k-5, ... 3. The sequence A210843 gives the levels of the plateaus of column k, when k -> infinity. For the visualization of the plateaus see the graph of a column, for example see the graph of A210964. - Omar E. Pol, Jun 21 2012

Examples

			Array begins:
    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, ...
    3,  2,  1,  1,  1,  1,  1,  1,  1,  1, ...
    5,  3,  2,  1,  1,  1,  1,  1,  1,  1, ...
    7,  4,  3,  2,  1,  1,  1,  1,  1,  1, ...
   11,  5,  4,  3,  2,  1,  1,  1,  1,  1, ...
   15,  7,  4,  4,  3,  2,  1,  1,  1,  1, ...
   22, 10,  5,  4,  4,  3,  2,  1,  1,  1, ...
   30, 13,  7,  4,  4,  4,  3,  2,  1,  1, ...
   42, 16, 10,  5,  4,  4,  4,  3,  2,  1, ...
   56, 21, 12,  7,  4,  4,  4,  4,  3,  2, ...
   77, 28, 14, 10,  5,  4,  4,  4,  4,  3, ...
  101, 35, 16, 12,  7,  4,  4,  4,  4,  4, ...
  135, 43, 21, 13, 10,  5,  4,  4,  4,  4, ...
  176, 55, 27, 14, 12,  7,  4,  4,  4,  4, ...
  ...
Column 1 is A000041 which starts: [1, 1], 2, 3, 5, 7, 11, ... The column contains only one plateau: [1, 1] which has level 1 and length 2.
Column 3 is A036820 which starts: [1, 1, 1, 1], 2, 3, [4, 4], 5, 7, 10, ... The column contains two plateaus: [1, 1, 1, 1], [4, 4], which have levels 1, 4 and lengths 4, 2.
Column 6 is A195850 which starts: [1, 1, 1, 1, 1, 1, 1], 2, 3, [4, 4, 4, 4, 4], 5, 7, 10, 12, [13, 13, 13], 14, 16, 21, ... The column contains three plateaus: [1, 1, 1, 1, 1, 1, 1], [4, 4, 4, 4, 4], [13, 13, 13], which have levels 1, 4, 13 and lengths 7, 5, 3.
		

Crossrefs

For another version see A211970.

Formula

Column k is asymptotic to exp(Pi*sqrt(2*n/(k+2))) / (8*sin(Pi/(k+2))*n). - Vaclav Kotesovec, Aug 14 2017

A054320 Expansion of g.f.: (1 + x)/(1 - 10*x + x^2).

Original entry on oeis.org

1, 11, 109, 1079, 10681, 105731, 1046629, 10360559, 102558961, 1015229051, 10049731549, 99482086439, 984771132841, 9748229241971, 96497521286869, 955226983626719, 9455772314980321, 93602496166176491, 926569189346784589, 9172089397301669399, 90794324783669909401
Offset: 0

Views

Author

Keywords

Comments

Chebyshev's even-indexed U-polynomials evaluated at sqrt(3).
a(n)^2 is a star number (A003154).
Any k in the sequence has the successor 5*k + 2*sqrt(3(2*k^2 + 1)). - Lekraj Beedassy, Jul 08 2002
{a(n)} give the values of x solving: 3*y^2 - 2*x^2 = 1. Corresponding values of y are given by A072256(n+1). x + y = A001078(n+1). - Richard R. Forberg, Nov 21 2013
The aerated sequence (b(n))n>=1 = [1, 0, 11, 0, 109, 0, 1079, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -8, Q = -1 of the 3-parameter family of divisibility sequences found by Williams and Guy. See A100047. - Peter Bala, Mar 22 2015

Examples

			a(1)^2 = 121 is the 5th star number (A003154).
		

Crossrefs

A member of the family A057078, A057077, A057079, A005408, A002878, A001834, A030221, A002315, A033890, A057080, A057081, A054320, which are the expansions of (1+x) / (1-kx+x^2) with k = -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. - Philippe Deléham, May 04 2004
Cf. A138281. Cf. A100047.
Cf. A142238.

Programs

  • GAP
    a:=[1,11];; for n in [3..30] do a[n]:=10*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Jul 22 2019
  • Magma
    I:=[1,11]; [n le 2 select I[n] else 10*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
    
  • Mathematica
    CoefficientList[Series[(1+x)/(1-10x+x^2), {x,0,30}], x] (* Vincenzo Librandi, Mar 22 2015 *)
    a[c_, n_] := Module[{},
       p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
       d := Numerator[Convergents[Sqrt[c], n p]];
       t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
       Return[t];
    ] (* Complement of A142238 *)
    a[3/2, 20] (* Gerry Martens, Jun 07 2015 *)
  • PARI
    a(n)=subst(poltchebi(n+1)-poltchebi(n),x,5)/4;
    

Formula

(a(n)-1)^2 + a(n)^2 + (a(n)+1)^2 = b(n)^2 + (b(n)+1)^2 = c(n), where b(n) is A031138 and c(n) is A007667.
a(n) = 10*a(n-1) - a(n-2).
a(n) = (sqrt(6) - 2)/4*(5 + 2*sqrt(6))^(n+1) - (sqrt(6) + 2)/4*(5 - 2*sqrt(6))^(n+1).
a(n) = U(2*(n-1), sqrt(3)) = S(n-1, 10) + S(n-2, 10) with Chebyshev's U(n, x) and S(n, x) := U(n, x/2) polynomials and S(-1, x) := 0. S(n, 10) = A004189(n+1), n >= 0.
6*a(n)^2 + 3 is a square. Limit_{n->oo} a(n)/a(n-1) = 5 + 2*sqrt(6). - Gregory V. Richardson, Oct 13 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i), then (-1)^n*q(n, -12) = a(n). - Benoit Cloitre, Nov 10 2002
a(n) = L(n,-10)*(-1)^n, where L is defined as in A108299; see also A072256 for L(n,+10). - Reinhard Zumkeller, Jun 01 2005
From Reinhard Zumkeller, Mar 12 2008: (Start)
(sqrt(2) + sqrt(3))^(2*n+1) = a(n)*sqrt(2) + A138288(n)*sqrt(3);
a(n) = A138288(n) + A001078(n).
a(n) = A001079(n) + 3*A001078(n). (End)
a(n) = A142238(2n) = A041006(2n)/2 = A041038(2n)/4. - M. F. Hasler, Feb 14 2009
a(n) = sqrt(A006061(n)). - Zak Seidov, Oct 22 2012
a(n) = sqrt((3*A072256(n)^2 - 1)/2). - T. D. Noe, Oct 23 2012
(sqrt(3) + sqrt(2))^(2*n+1) - (sqrt(3) - sqrt(2))^(2*n+1) = a(n)*sqrt(8). - Bruno Berselli, Oct 29 2019
a(n) = A004189(n)+A004189(n+1). - R. J. Mathar, Oct 01 2021
E.g.f.: exp(5*x)*(2*cosh(2*sqrt(6)*x) + sqrt(6)*sinh(2*sqrt(6)*x))/2. - Stefano Spezia, May 16 2023
From Peter Bala, May 09 2025: (Start)
a(n) = Dir(n, 5), where Dir(n, x) denotes the n-th row polynomial of the triangle A244419.
a(n)^2 - 10*a(n)*a(n+1) + a(n+1)^2 = 12.
More generally, for arbitrary x, a(n+x)^2 - 10*a(n+x)*a(n+x+1) + a(n+x+1)^2 = 12 with a(n) := (sqrt(6) - 2)/4*(5 + 2*sqrt(6))^(n+1) - (sqrt(6) + 2)/4*(5 - 2*sqrt(6))^(n+1) as given above.
a(n+1/2) = sqrt(3) * A001078(n+1).
a(n+3/4) + a(n+1/4) = sqrt(6)*sqrt(sqrt(3) + 1) * A001078(n+1).
a(n+3/4) - a(n+1/4) = sqrt(sqrt(3) - 1) * A001079(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(n) - 1/a(n)) = 1/12 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A004291(n) + 1/A004291(n+1)).
Product_{n >= 1} (a(n) + 1)/(a(n) - 1) = sqrt(3/2) (telescoping product: Product_{n = 1..k} ((a(n) + 1)/(a(n) - 1))^2 = 3/2 * (1 - 1/A171640(k+2))). (End)

Extensions

Chebyshev comments from Wolfdieter Lang, Oct 31 2002

A051159 Triangle read by rows: T(n, k) = binomial(n mod 2, k mod 2) * binomial(n div 2, k div 2), where 'div' denotes integer division.

Original entry on oeis.org

1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 2, 1, 1, 1, 0, 3, 0, 3, 0, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 0, 4, 0, 6, 0, 4, 0, 1, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 1, 0, 5, 0, 10, 0, 10, 0, 5, 0, 1, 1, 1, 5, 5, 10, 10, 10, 10, 5, 5, 1, 1, 1, 0, 6, 0, 15, 0, 20, 0, 15, 0, 6, 0, 1, 1, 1, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1, 1
Offset: 0

Views

Author

Michael Somos, Oct 14 1999

Keywords

Comments

Previous name: Triangular array made of three copies of Pascal's triangle.
Computing each term modulo 2 also gives A047999, i.e., a(n) mod 2 = A007318(n) mod 2 for all n. (The triangle is paritywise isomorphic to Pascal's Triangle.) - Antti Karttunen
5th row/column gives entries of A000217 (triangular numbers C(n+1,2)) repeated twice and every other entry in 6th row/column form A000217. 7th row/column gives entries of A000292 (Tetrahedral (or pyramidal) nos: C(n+3,3)) repeated twice and every other entry in 8th row/column form A000292. 9th row/column gives entries of A000332 (binomial coefficients binomial(n,4)) repeated twice and every other entry in 10th row/column form A000332. 11th row/column gives entries of A000389 (binomial coefficients C(n,5)) repeated twice and every other entry in 12th row/column form A000389. - Gerald McGarvey, Aug 21 2004
If Sum_{k=0..n} A(k)*T(n,k) = B(n), the sequence B is the S-D transform of the sequence A. - Philippe Deléham, Aug 02 2006
Number of n-bead black-white reversible strings with k black beads; also binary grids; string is palindromic. - Yosu Yurramendi, Aug 07 2008
Row sums give A016116(n+1). - Yosu Yurramendi, Aug 07 2008 [corrected by Petros Hadjicostas, Nov 04 2017]
Coefficients in expansion of (x + y)^n where x and y anticommute (y x = -x y), that is, q-binomial coefficients when q = -1. - Michael Somos, Feb 16 2009
The sequence of coefficients of a general polynomial recursion that links at w=2 to the Pascal triangle is here w=0. Row sums are {1, 2, 2, 4, 4, 8, 8, 16, 16, 32, 32, 64, ...}. - Roger L. Bagula and Gary W. Adamson, Dec 04 2009
T(n,k) is the number of palindromic compositions of n+1 with exactly k+1 parts. T(6,4) = 3 because we have the following compositions of n+1=7 with length k+1=5: 1+1+3+1+1, 2+1+1+1+2, 1+2+1+2+1. - Geoffrey Critzer, Mar 15 2014 [corrected by Petros Hadjicostas, Nov 03 2017]
Let P(n,k) be the number of palindromic compositions of n with exactly k parts. MacMahon (1893) was the first to prove that P(n,k) = T(n-1,k-1), where T(n,k) are the numbers in this sequence (see the comment above by G. Critzer). He actually proved that, for 1 <= s <= m, we have P(2*m,2*s) = P(2*m,2*s-1) = P(2*m-1, 2*s-1) = bin(m-1, s-1), but P(2*m-1, 2*s) = 0. For the current sequence, this can be translated into T(2*m-1, 2*s-1) = T(2*m-1,2*s-2) = T(2*m-2, 2*s-2) = bin(m-1,s-1), but T(2m-2, 2*s-1) = 0 (valid again for 1 <= s <= m). - Petros Hadjicostas, Nov 03 2017
T is the infinite lower triangular matrix for this sequence; define two others, U and V; let U(n,k)=e_k(-1,2,-3,...,(-1)^n n), where e_k is the k-th elementary symmetric polynomial, and let V be the diagonal matrix A057077 (periodic sequence 1,1,-1,-1). Clearly V^-1 = V. Conjecture: U = U^-1, T = U . V, T^-1 = V . U, and |T| = |U|. - George Beck, Dec 16 2017
Let T*(n,k)=T(n,k) except when n is odd and k=(n+1)/2, where T*(n,k) = T(n,k)+2^((n-1)/2). Thus, T*(n,k) is the number of non-isomorphic symmetric stairs with n cells and k steps, i.e., k-1 changes of direction. See A016116. - Christian Barrientos and Sarah Minion, Jul 29 2018

Examples

			Triangle starts:
{1},
{1,  1},
{1,  0,  1},
{1,  1,  1,  1},
{1,  0,  2,  0,  1},
{1,  1,  2,  2,  1,  1},
{1,  0,  3,  0,  3,  0,  1},
{1,  1,  3,  3,  3,  3,  1,  1},
{1,  0,  4,  0,  6,  0,  4,  0,  1},
{1,  1,  4,  4,  6,  6,  4,  4,  1,  1},
{1,  0,  5,  0, 10,  0, 10,  0,  5,  0,  1},
{1,  1,  5,  5, 10, 10, 10, 10,  5,  5,  1,  1}
... - _Roger L. Bagula_ and _Gary W. Adamson_, Dec 04 2009
		

Crossrefs

Programs

  • Haskell
    a051159 n k = a051159_tabl !! n !! k
    a051159_row n = a051159_tabl !! n
    a051159_tabl = [1] : f [1] [1,1] where
       f us vs = vs : f vs (zipWith (+) ([0,0] ++ us) (us ++ [0,0]))
    -- Reinhard Zumkeller, Apr 25 2013
    
  • Maple
    T:= proc(n, k) option remember; `if`(n=0 and k=0, 1,
          `if`(n<0 or k<0, 0, `if`(irem(n, 2)=1 or
           irem(k, 2)=0, T(n-1, k-1) + T(n-1, k), 0)))
        end:
    seq(seq(T(n, k), k=0..n), n=0..14);  # Alois P. Heinz, Jul 12 2014
  • Mathematica
    T[ n_, k_] := QBinomial[n, k, -1]; (* Michael Somos, Jun 14 2011; since V7 *)
    Clear[p, n, x, a]
    w = 0;
    p[x, 1] := 1;
    p[x_, n_] := p[x, n] = If[Mod[n, 2] == 0, (x + 1)*p[x, n - 1], (x^2 + w*x + 1)^Floor[n/2]]
    a = Table[CoefficientList[p[x, n], x], {n, 1, 12}]
    Flatten[a] (* Roger L. Bagula and Gary W. Adamson, Dec 04 2009 *)
  • PARI
    {T(n, k) = binomial(n%2, k%2) * binomial(n\2, k\2)};
    
  • Python
    from math import comb as binomial
    def T(n, k): return binomial(n%2, k%2) * binomial(n//2, k//2)
    print([T(n, k) for n in range(14) for k in range(n+1)])  # Peter Luschny, Oct 17 2024
  • SageMath
    @cached_function
    def T(n, k):
        if k == 0 or k == n: return 1
        return T(n-1, k-1) + (-1)^k*T(n-1, k)
    for n in (0..12): print([T(n, k) for k in (0..n)]) # Peter Luschny, Jul 06 2021
    

Formula

T(n, k) = T(n-1, k-1) + T(n-1, k) if n odd or k even, else 0. T(0, 0) = 1.
T(n, k) = T(n-2, k-2) + T(n-2, k). T(0, 0) = T(1, 0) = T(1, 1) = 1.
Square array made by setting first row/column to 1's (A(i, 0) = A(0, j) = 1); A(1, 1) = 0; A(1, j) = A(1, j-2); A(i, 1) = A(i-2, 1); other entries A(i, j) = A(i-2, j) + A(i, j-2). - Gerald McGarvey, Aug 21 2004
Sum_{k=0..n} k * T(n,k) = A093968(n); A093968 = S-D transform of A001477. - Philippe Deléham, Aug 02 2006
Equals 2*A034851 - A007318. - Gary W. Adamson, Dec 31 2007. [Corrected by Yosu Yurramendi, Aug 07 2008]
A051160(n, k) = (-1)^floor(k/2) * T(n, k).
Sum_{k = 0..n} T(n,k)*x^k = A000012(n), A016116(n+1), A056487(n), A136859(n+2) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Mar 11 2014
G.f.: (1+x+x*y)/(1-x^2-y^2*x^2). - Philippe Deléham, Mar 11 2014
For n,k >= 1, T(n, k) = 0 when n odd and k even; otherwise, T(n, k) = binomial(floor((n-1)/2), floor((k-1)/2)). - Christian Barrientos, Mar 14 2020
From Werner Schulte, Jun 25 2021: (Start)
T(n,k) = T(n-1,k-1) + (-1)^k * T(n-1,k) for 0 < k < n with initial values T(n,0) = T(n,n) = 1 for n >= 0.
Matrix inverse is T^-1(n,k) = (-1)^((n-k)*(n+k+1)/2) * T(n,k) for 0 <= k <= n. (End)
From Peter Bala, Aug 08 2021: (Start)
Double Riordan array ( 1/(1 - x); x/(1 + x), x/(1 - x) ) in the notation of Davenport et al.
G.f. for column 2*n: (1 + x)*x^(2*n)/(1 - x^2)^(n+1); G.f. for column 2*n+1: x^(2*n+1)/(1 - x^2)^(n+1)
Row polynomials: R(2*n,x) = (1 + x^2)^n; R(2*n+1,x) = (1 + x)*(1 + x^2)^n.
The infinitesimal generator of this triangle has the sequence [1, 0, 1, 0, 1, 0, ...] on the main subdiagonal, the sequence [1, 1, 2, 2, 3, 3, 4, 4, ...] on the diagonal immediately below and zeros elsewhere.
Let T denote this lower triangular array. Then T^a, for a in C, is the double Riordan array ( (1 + a*x)/(1 - a*x^2); x/(1 + a*x), (1 + a*x)/(1 - a*x^2) ) with o.g.f. (1 + x*(a + y))/(1 - x^2*(a + y^2)) = 1 + (a + y)*x + (a + y^2)*x^2 + (a^2 + a*y + a*y^2 + y^3)*x^3 + (a^2 + 2*a*y^2 + y^4)*x^4 + ....
The (2*n)-th row polynomial of T^a is (a + y^2)^n; The (2*n+1)-th row polynomial of T^a is (a + y)*(a + y^2)^n. (End)

Extensions

New name using a formula of the author by Peter Luschny, Oct 17 2024
Showing 1-10 of 92 results. Next