cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 11 results. Next

A000931 Padovan sequence (or Padovan numbers): a(n) = a(n-2) + a(n-3) with a(0) = 1, a(1) = a(2) = 0.

Original entry on oeis.org

1, 0, 0, 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, 616, 816, 1081, 1432, 1897, 2513, 3329, 4410, 5842, 7739, 10252, 13581, 17991, 23833, 31572, 41824, 55405, 73396, 97229, 128801, 170625
Offset: 0

Views

Author

Keywords

Comments

Number of compositions of n into parts congruent to 2 mod 3 (offset -1). - Vladeta Jovovic, Feb 09 2005
a(n) is the number of compositions of n into parts that are odd and >= 3. Example: a(10)=3 counts 3+7, 5+5, 7+3. - David Callan, Jul 14 2006
Referred to as N0102 in R. K. Guy's "Anyone for Twopins?" - Rainer Rosenthal, Dec 05 2006
Zagier conjectures that a(n+3) is the maximum number of multiple zeta values of weight n > 1 which are linearly independent over the rationals. - Jonathan Sondow and Sergey Zlobin (sirg_zlobin(AT)mail.ru), Dec 20 2006
Starting with offset 6: (1, 1, 2, 2, 3, 4, 5, ...) = INVERT transform of A106510: (1, 1, -1, 0, 1, -1, 0, 1, -1, ...). - Gary W. Adamson, Oct 10 2008
Starting with offset 7, the sequence 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, ... is called the Fibonacci quilt sequence by Catral et al., in Fib. Q. 2017. - N. J. A. Sloane, Dec 24 2021
Triangle A145462: right border = A000931 starting with offset 6. Row sums = Padovan sequence starting with offset 7. - Gary W. Adamson, Oct 10 2008
Starting with offset 3 = row sums of triangle A146973 and INVERT transform of [1, -1, 2, -2, 3, -3, ...]. - Gary W. Adamson, Nov 03 2008
a(n+5) corresponds to the diagonal sums of "triangle": 1; 1; 1,1; 1,1; 1,2,1; 1,2,1; 1,3,3,1; 1,3,3,1; 1,4,6,4,1; ..., rows of Pascal's triangle (A007318) repeated. - Philippe Deléham, Dec 12 2008
With offset 3: (1, 0, 1, 1, 1, 2, 2, ...) convolved with the tribonacci numbers prefaced with a "1": (1, 1, 1, 2, 4, 7, 13, ...) = the tribonacci numbers, A000073. (Cf. triangle A153462.) - Gary W. Adamson, Dec 27 2008
a(n) is also the number of strings of length (n-8) from an alphabet {A, B} with no more than one A or 2 B's consecutively. (E.g., n = 4: {ABAB,ABBA,BABA,BABB,BBAB} and a(4+8) = 5.) - Toby Gottfried, Mar 02 2010
p(n):=A000931(n+3), n >= 1, is the number of partitions of the numbers {1,2,3,...,n} into lists of length two or three containing neighboring numbers. The 'or' is inclusive. For n=0 one takes p(0)=1. For details see the W. Lang link. There the explicit formula for p(n) (analog of the Binet-de Moivre formula for Fibonacci numbers) is also given. Padovan sequences with different inputs are also considered there. - Wolfdieter Lang, Jun 15 2010
Equals the INVERTi transform of Fibonacci numbers prefaced with three 1's, i.e., (1 + x + x^2 + x^3 + x^4 + 2x^5 + 3x^6 + 5x^7 + 8x^8 + 13x^9 + ...). - Gary W. Adamson, Apr 01 2011
When run backwards gives (-1)^n*A050935(n).
a(n) is the top left entry of the n-th power of the 3 X 3 matrix [0, 0, 1; 1, 0, 1; 0, 1, 0] or of the 3 X 3 matrix [0, 1, 0; 0, 0, 1; 1, 1, 0]. - R. J. Mathar, Feb 03 2014
Figure 4 of Brauchart et al., 2014, shows a way to "visualize the Padovan sequence as cuboid spirals, where the dimensions of each cuboid made up by the previous ones are given by three consecutive numbers in the sequence". - N. J. A. Sloane, Mar 26 2014
a(n) is the number of closed walks from a vertex of a unidirectional triangle containing an opposing directed edge (arc) between the second and third vertices. Equivalently the (1,1) entry of A^n where the adjacency matrix of digraph is A=(0,1,0;0,0,1;1,1,0). - David Neil McGrath, Dec 19 2014
Number of compositions of n-3 (n >= 4) into 2's and 3's. Example: a(12)=5 because we have 333, 3222, 2322, 2232, and 2223. - Emeric Deutsch, Dec 28 2014
The Hoffman (2015) paper "offers significant evidence that the number of quantities needed to generate the weight-n multiple harmonic sums mod p is" a(n). - N. J. A. Sloane, Jun 24 2016
a(n) gives the number of compositions of n-5 into odd parts where the order of the 1's does not matter. For example, a(11)=4 counts the following compositions of 6: (5,1)=(1,5), (3,3), (3,1,1,1)=(1,3,1,1)=(1,1,3,1)=(1,1,1,3), (1,1,1,1,1,1). - Gregory L. Simay, Aug 04 2016
For n > 6, a(n) is the number of maximal matchings in the (n-5)-path graph, maximal independent vertex sets and minimal vertex covers in the (n-6)-path graph, and minimal edge covers in the (n-5)-pan graph and (n-3)-path graphs. - Eric W. Weisstein, Mar 30, Aug 03, and Aug 07 2017
From James Mitchell and Wilf A. Wilson, Jul 21 2017: (Start)
a(2n + 5) + 2n - 4, n > 2, is the number of maximal subsemigroups of the monoid of order-preserving mappings on a set with n elements.
a(n + 6) + n - 3, n > 3, is the number of maximal subsemigroups of the monoid of order-preserving or reversing mappings on a set with n elements.
(End)
Has the property that the largest of any four consecutive terms equals the sum of the two smallest. - N. J. A. Sloane, Aug 29 2017 [David Nacin points out that there are many sequences with this property, such as 1,1,1,2,1,1,1,2,1,1,1,2,... or 2,3,4,5,2,3,4,5,2,3,4,5,... or 2,2,1,3,3, 4,1,4, 5,5,1,6,6, 7,1,7, 8,8,1,9,9, 10,1,10, ... (spaces added for clarity), and a conjecture I made here in 2017 was simply wrong. I have deleted it. - N. J. A. Sloane, Oct 23 2018]
a(n) is also the number of maximal cliques in the (n+6)-path complement graph. - Eric W. Weisstein, Apr 12 2018
a(n+8) is the number of solus bitstrings of length n with no runs of 3 zeros. - Steven Finch, Mar 25 2020
Named after the architect Richard Padovan (b. 1935). - Amiram Eldar, Jun 08 2021
Shannon et al. (2006) credit a French architecture student Gérard Cordonnier with the discovery of these numbers.
For n >= 3, a(n) is the number of sequences of 0s and 1s of length (n-2) that begin with a 0, end with a 0, contain no two consecutive 0s, and contain no three consecutive 1s. - Yifan Xie, Oct 20 2022
For n >= 2, a(n+5) is the number of ways to tile the 1xn board with dominoes and squares (ie. size 1x1) such that are either none or one squares between dominoes, none or one squares at both ends of the board, and there is at least one domino. For example, for n=6, a(11)=4 since the tilings are |2|2, |22|, 2|2| and 222 (where 2 represents a domino and | a square). - Enrique Navarrete, Aug 31 2024

Examples

			G.f. = 1 + x^3 + x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + 3*x^10 + 4*x^11 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, p. 47, ex. 4.
  • Minerva Catral, Pari L. Ford, Pamela E. Harris, Steven J. Miller, Dawn Nelson, Zhao Pan, and Huanzhong Xu, Legal Decompositions Arising from Non-positive Linear Recurrences, Fib. Quart., 55:3 (2017), 252-275. [Note that there is an earlier version of this paper, with only five authors, on the arXiv in 2016. Note to editors: do not merge these two citations. - N. J. A. Sloane, Dec 24 2021]
  • Richard K. Guy, "Anyone for Twopins?" in D. A. Klarner, editor, The Mathematical Gardner. Prindle, Weber and Schmidt, Boston, 1981, pp. 10-11.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • A. G. Shannon, P. G. Anderson and A. F. Horadam, Properties of Cordonnier, Perrin and Van der Laan numbers, International Journal of Mathematical Education in Science and Technology, Volume 37:7 (2006), 825-831. See P_n.
  • 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).
  • Ian Stewart, L'univers des nombres, "La sculpture et les nombres", pp. 19-20, Belin-Pour La Science, Paris, 2000.
  • Hans van der Laan, Het plastische getal. XV lessen over de grondslagen van de architectonische ordonnantie. Leiden, E.J. Brill, 1967.
  • Don Zagier, Values of zeta functions and their applications, in First European Congress of Mathematics (Paris, 1992), Vol. II, A. Joseph et al. (eds.), Birkhäuser, Basel, 1994, pp. 497-512.

Crossrefs

The following are basically all variants of the same sequence: A000931, A078027, A096231, A124745, A133034, A134816, A164001, A182097, A228361 and probably A020720. However, each one has its own special features and deserves its own entry.
Closely related to A001608.
Doubling every term gives A291289.

Programs

  • GAP
    a:=[1,0,0];; for n in [4..50] do a[n]:=a[n-2]+a[n-3]; od; a; # G. C. Greubel, Dec 30 2019
    
  • Haskell
    a000931 n = a000931_list !! n
    a000931_list = 1 : 0 : 0 : zipWith (+) a000931_list (tail a000931_list)
    -- Reinhard Zumkeller, Feb 10 2011
    
  • Magma
    I:=[1,0,0]; [n le 3 select I[n] else Self(n-2) + Self(n-3): n in [1..60]]; // Vincenzo Librandi, Jul 21 2015
    
  • Maple
    A000931 := proc(n) option remember; if n = 0 then 1 elif n <= 2 then 0 else procname(n-2)+procname(n-3); fi; end;
    A000931:=-(1+z)/(-1+z^2+z^3); # Simon Plouffe in his 1992 dissertation; gives sequence without five leading terms
    a[0]:=1; a[1]:=0; a[2]:=0; for n from 3 to 50 do a[n]:=a[n-2]+a[n-3]; end do; # Francesco Daddi, Aug 04 2011
  • Mathematica
    CoefficientList[Series[(1-x^2)/(1-x^2-x^3), {x, 0, 50}], x]
    a[0]=1; a[1]=a[2]=0; a[n_]:= a[n]= a[n-2] + a[n-3]; Table[a[n], {n, 0, 50}] (* Robert G. Wilson v, May 04 2006 *)
    LinearRecurrence[{0,1,1}, {1,0,0}, 50] (* Harvey P. Dale, Jan 10 2012 *)
    Table[RootSum[-1 -# +#^3 &, 5#^n -6#^(n+1) +4#^(n+2) &]/23, {n,0,50}] (* Eric W. Weisstein, Nov 09 2017 *)
  • PARI
    Vec((1-x^2)/(1-x^2-x^3) + O(x^50)) \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    {a(n) = if( n<0, polcoeff(1/(1+x-x^3) + x * O(x^-n), -n), polcoeff( (1 - x^2)/(1-x^2-x^3) + x * O(x^n), n))}; /* Michael Somos, Sep 18 2012 */
    
  • Python
    def aupton(nn):
        alst = [1, 0, 0]
        for n in range(3, nn+1): alst.append(alst[n-2]+alst[n-3])
        return alst
    print(aupton(49)) # Michael S. Branicky, Mar 28 2022
  • Sage
    def A000931_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x^2)/(1-x^2-x^3) ).list()
    A000931_list(50) # G. C. Greubel, Dec 30 2019
    

Formula

G.f.: (1-x^2)/(1-x^2-x^3).
a(n) is asymptotic to r^n / (2*r+3) where r = 1.3247179572447... = A060006, the real root of x^3 = x + 1. - Philippe Deléham, Jan 13 2004
a(n)^2 + a(n+2)^2 + a(n+6)^2 = a(n+1)^2 + a(n+3)^2 + a(n+4)^2 + a(n+5)^2 (Barniville, Question 16884, Ed. Times 1911).
a(n+5) = a(0) + a(1) + ... + a(n).
a(n) = central and lower right terms in the (n-3)-th power of the 3 X 3 matrix M = [0 1 0 / 0 0 1 / 1 1 0]. E.g., a(13) = 7. M^10 = [3 5 4 / 4 7 5 / 5 9 7]. - Gary W. Adamson, Feb 01 2004
G.f.: 1/(1 - x^3 - x^5 - x^7 - x^9 - ...). - Jon Perry, Jul 04 2004
a(n+4) = Sum_{k=0..floor((n-1)/2)} binomial(floor((n+k-2)/3), k). - Paul Barry, Jul 06 2004
a(n+3) = Sum_{k=0..floor(n/2)} binomial(k, n-2k). - Paul Barry, Sep 17 2004, corrected by Greg Dresden and Zi Ye, Jul 06 2021
a(n+3) is diagonal sum of A026729 (as a number triangle), with formula a(n+3) = Sum_{k=0..floor(n/2)} Sum_{i=0..n-k} (-1)^(n-k+i)*binomial(n-k, i)*binomial(i+k, i-k). - Paul Barry, Sep 23 2004
a(n) = a(n-1) + a(n-5) = A003520(n-4) + A003520(n-13) = A003520(n-3) - A003520(n-9). - Henry Bottomley, Jan 30 2005
a(n+3) = Sum_{k=0..floor(n/2)} binomial((n-k)/2, k)(1+(-1)^(n-k))/2. - Paul Barry, Sep 09 2005
The sequence 1/(1-x^2-x^3) (a(n+3)) is given by the diagonal sums of the Riordan array (1/(1-x^3), x/(1-x^3)). The row sums are A000930. - Paul Barry, Feb 25 2005
a(n) = A023434(n-7) + 1 for n >= 7. - David Callan, Jul 14 2006
a(n+5) corresponds to the diagonal sums of A030528. The binomial transform of a(n+5) is A052921. a(n+5) = Sum_{k=0..floor(n/2)} Sum_{k=0..n} (-1)^(n-k+i)*binomial(n-k, i)binomial(i+k+1, 2k+1). - Paul Barry, Jun 21 2004
r^(n-1) = (1/r)*a(n) + r*a(n+1) + a(n+2), where r = 1.32471... is the real root of x^3 - x - 1 = 0. Example: r^8 = (1/r)*a(9) + r*a(10) + a(11) = (1/r)*2 + r*3 + 4 = 9.483909... - Gary W. Adamson, Oct 22 2006
a(n) = (r^n)/(2r+3) + (s^n)/(2s+3) + (t^n)/(2t+3) where r, s, t are the three roots of x^3-x-1. - Keith Schneider (schneidk(AT)email.unc.edu), Sep 07 2007
a(n) = -k*a(n-1) + a(n-2) + (k+1)a(n-2) + k*a(n-4), n > 3, for any value of k. - Gary Detlefs, Sep 13 2010
From Francesco Daddi, Aug 04 2011: (Start)
a(0) + a(2) + a(4) + a(6) + ... + a(2*n) = a(2*n+3).
a(0) + a(3) + a(6) + a(9) + ... + a(3*n) = a(3*n+2)+1.
a(0) + a(5) + a(10) + a(15) + ... + a(5*n) = a(5*n+1)+1.
a(0) + a(7) + a(14) + a(21) + ... + a(7*n) = (a(7*n) + a(7*n+1) + 1)/2. (End)
a(n+3) = Sum_{k=0..floor((n+1)/2)} binomial((n+k)/3,k), where binomial((n+k)/3,k)=0 for noninteger (n+k)/3. - Nikita Gogin, Dec 07 2012
a(n) = A182097(n-3) for n > 2. - Jonathan Sondow, Mar 14 2014
a(n) = the k-th difference of a(n+5k) - a(n+5k-1), k>=1. For example, a(10)=3 => a(15)-a(14) => 2nd difference of a(20)-a(19) => 3rd difference of a(25)-a(24)... - Bob Selcoe, Mar 18 2014
Construct the power matrix T(n,j) = [A^*j]*[S^*(j-1)] where A=(0,0,1,0,1,0,1,...) and S=(0,1,0,0,...) or A063524. [* is convolution operation] Define S^*0=I with I=(1,0,0,...). Then a(n) = Sum_{j=1...n} T(n,j). - David Neil McGrath, Dec 19 2014
If x=a(n), y=a(n+1), z=a(n+2), then x^3 + 2*y*x^2 - z^2*x - 3*y*z*x + y^2*x + y^3 - y^2*z + z^3 = 1. - Alexander Samokrutov, Jul 20 2015
For the sequence shifted by 6 terms, a(n) = Sum_{k=ceiling(n/3)..ceiling(n/2)} binomial(k+1,3*k-n) [Doslic-Zubac]. - N. J. A. Sloane, Apr 23 2017
From Joseph M. Shunia, Jan 21 2020: (Start)
a(2n) = 2*a(n-1)*a(n) + a(n)^2 + a(n+1)^2, for n > 8.
a(2n-1) = 2*a(n)*a(n+1) + a(n-1)^2, for n > 8.
a(2n+1) = 2*a(n+1)*a(n+2) + a(n)^2, for n > 7. (End)
0*a(0) + 1*a(1) + 2*a(2) + ... + n*a(n) = n*a(n+5) - a(n+9) + 2. - Greg Dresden and Zi Ye, Jul 02 2021
From Greg Dresden and Zi Ye, Jul 06 2021: (Start)
2*a(n) = a(n+2) + a(n-5) for n >= 5.
3*a(n) = a(n+4) - a(n-9) for n >= 9.
4*a(n) = a(n+5) - a(n-9) for n >= 9. (End)

Extensions

Edited by Charles R Greathouse IV, Mar 17 2010
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A101950 Product of A049310 and A007318 as lower triangular matrices.

Original entry on oeis.org

1, 1, 1, 0, 2, 1, -1, 1, 3, 1, -1, -2, 3, 4, 1, 0, -4, -2, 6, 5, 1, 1, -2, -9, 0, 10, 6, 1, 1, 3, -9, -15, 5, 15, 7, 1, 0, 6, 3, -24, -20, 14, 21, 8, 1, -1, 3, 18, -6, -49, -21, 28, 28, 9, 1, -1, -4, 18, 36, -35, -84, -14, 48, 36, 10, 1, 0, -8, -4, 60, 50, -98, -126, 6, 75, 45, 11, 1, 1, -4, -30, 20, 145, 36, -210
Offset: 0

Views

Author

Paul Barry, Dec 22 2004

Keywords

Comments

A Chebyshev and Pascal product.
Row sums are n+1, diagonal sums the constant sequence 1 resp. A023434(n+1). Riordan array (1/(1-x+x^2),x/(1-x+x^2)).
Apart from signs, identical with A104562.
Subtriangle of the triangle given by [0,1,-1,1,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 27 2010
The Fi1 and Fi2 sums lead to A004525 and the Gi1 sums lead to A077889, see A180662 for the definitions of these triangle sums. - Johannes W. Meijer, Aug 06 2011
Also the convolution triangle of the inverse of 6th cyclotomic polynomial A010892. - Peter Luschny, Oct 08 2022

Examples

			Triangle begins:
   1,
   1, 1,
   0, 2, 1,
  -1, 1, 3, 1,
  -1,-2, 3, 4, 1,
  ...
Triangle [0,1,-1,1,0,0,0,0,...] DELTA [1,0,0,0,0,0,...] begins : 1 ; 0,1 ; 0,1,1 ; 0,0,2,1 ; 0,-1,1,3,1 ; 0,-1,-2,3,4,1 ; ... - _Philippe Deléham_, Jan 27 2010
		

Crossrefs

Programs

  • Maple
    A101950 := proc(n,k) local j,k1: add((-1)^((n-j)/2)*binomial((n+j)/2,j)*(1+(-1)^(n+j))* binomial(j,k)/2, j=0..n) end: seq(seq(A101950(n,k),k=0..n), n=0..11); # Johannes W. Meijer, Aug 06 2011
    # Uses function PMatrix from A357368. Adds a row on top and a column to the left.
    PMatrix(10, n -> [0, 1, 1, 0, -1,-1][irem(n, 6) + 1]); # Peter Luschny, Oct 08 2022
  • Mathematica
    T[0, 0] = 1; T[n_, k_] /; k>n || k<0 = 0; T[n_, k_] := T[n, k] = T[n-1, k-1]+T[n-1, k]-T[n-2, k]; Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Mar 07 2014, after Philippe Deléham *)

Formula

T(n, k) = Sum_{j=0..n} (-1)^((n-j)/2)*C((n+j)/2,j)*(1+(-1)^(n+j))*C(j,k)/2.
T(0,0) = 1, T(n,k) = 0,if k>n or if k<0, T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k). - Philippe Deléham, Jan 26 2010
p(n,x) = (x+1)*p(n-1,x)-p(n-2,x) with p(0,x) = 1 and p(1,x) = x+1 [Dias].
G.f.: 1/(1-x-x^2-y*x). - Philippe Deléham, Feb 10 2012
T(n,0) = A010892(n), T(n+1,1) = A099254(n), T(n+2,2) = A128504(n). - Philippe Deléham, Mar 07 2014
T(n,k) = C(n,k)*hypergeom([(k-n)/2, (k-n+1)/2], [-n], 4) for n>=1. - Peter Luschny, Apr 25 2016

Extensions

Typo in formula corrected and information added by Johannes W. Meijer, Aug 06 2011

A004070 Table of Whitney numbers W(n,k) read by antidiagonals, where W(n,k) is maximal number of pieces into which n-space is sliced by k hyperplanes, n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 2, 4, 4, 1, 1, 2, 4, 7, 5, 1, 1, 2, 4, 8, 11, 6, 1, 1, 2, 4, 8, 15, 16, 7, 1, 1, 2, 4, 8, 16, 26, 22, 8, 1, 1, 2, 4, 8, 16, 31, 42, 29, 9, 1, 1, 2, 4, 8, 16, 32, 57, 64, 37, 10, 1, 1, 2, 4, 8, 16, 32, 63, 99, 93, 46, 11, 1, 1, 2, 4, 8, 16, 32, 64, 120, 163
Offset: 0

Views

Author

Keywords

Comments

As a number triangle, this is given by T(n,k)=sum{j=0..n, C(n,j)(-1)^(n-j)sum{i=0..j, C(j+k,i-k)}}. - Paul Barry, Aug 23 2004
As a number triangle, this is the Riordan array (1/(1-x), x(1+x)) with T(n,k)=sum{i=0..n, binomial(k,i-k)}. Diagonal sums are then A023434(n+1). - Paul Barry, Feb 16 2005
Form partial sums across rows of square array of binomial coefficients A026729; see also A008949. - Philippe Deléham, Aug 28 2005
Square array A026729 -> Partial sums across rows
1 0 0 0 0 0 0 . . . . 1 1 1 1 1 1 1 . . . . . .
1 1 0 0 0 0 0 . . . . 1 2 2 2 2 2 2 . . . . . .
1 2 1 0 0 0 0 . . . . 1 3 4 4 4 4 4 . . . . . .
1 3 3 1 0 0 0 . . . . 1 4 7 8 8 8 8 . . . . . .
For other Whitney numbers see A007799.
W(n,k) is the number of length k binary sequences containing no more than n 1's. - Geoffrey Critzer, Mar 15 2010
From Emeric Deutsch, Jun 15 2010: (Start)
Viewed as a number triangle, T(n,k) is the number of internal nodes of the Fibonacci tree of order n+2 at level k. A Fibonacci tree of order n (n>=2) is a complete binary tree whose left subtree is the Fibonacci tree of order n-1 and whose right subtree is the Fibonacci tree of order n-2; each of the Fibonacci trees of order 0 and 1 is defined as a single node.
(End)
Named after the American mathematician Hassler Whitney (1907-1989). - Amiram Eldar, Jun 13 2021

Examples

			Table W(n,k) begins:
  1 1 1 1  1  1  1 ...
  1 2 3 4  5  6  7 ...
  1 2 4 7 11 16 22 ...
  1 2 4 8 15 26 42 ...
W(2,4) = 11 because there are 11 length 4 binary sequences containing no more than 2 1's: {0, 0, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 1, 0, 0}, {0, 1, 0, 1}, {0, 1, 1, 0}, {1, 0, 0, 0}, {1, 0, 0, 1}, {1, 0, 1, 0}, {1, 1, 0, 0}. - _Geoffrey Critzer_, Mar 15 2010
Table T(n, k) begins:
  1
  1  1
  1  2  1
  1  2  3  1
  1  2  4  4  1
  1  2  4  7  5  1
  1  2  4  8 11  6  1
...
		

References

  • Donald E. Knuth, The Art of Computer Programming, Vol. 3, 2nd edition, Addison-Wesley, Reading, MA, 1998, p. 417.

Crossrefs

Cf. A007799. As a triangle, mirror A052509.
Rows converge to powers of two (A000079). Subdiagonals include A000225, A000295, A002662, A002663, A002664, A035038, A035039, A035040, A035041, A035042. Antidiagonal sums are A000071.

Programs

  • Mathematica
    Transpose[ Table[Table[Sum[Binomial[n, k], {k, 0, m}], {m, 0, 15}], {n, 0, 15}]] // Grid (* Geoffrey Critzer, Mar 15 2010 *)
    T[ n_, k_] := Sum[ Binomial[n, j] (-1)^(n - j) Sum[ Binomial[j + k, i - k], {i, 0, j}], {j, 0, n}]; (* Michael Somos, May 31 2016 *)
  • PARI
    /* array read by antidiagonals up coordinate index functions */
    t1(n) = binomial(floor(3/2 + sqrt(2+2*n)), 2) - (n+1); /* A025581 */
    t2(n) = n - binomial(floor(1/2 + sqrt(2+2*n)), 2); /* A002262 */
    /* define the sequence array function for A004070 */
    W(n, k) = sum(i=0, n, binomial(k, i));
    /* visual check ( origin 0,0 ) */
    printp(matrix(7, 7, n, k, W(n-1, k-1)));
    /* print the sequence entries by antidiagonals going up ( origin 0,0 ) */
    print1("S A004070 "); for(n=0, 32, print1(W(t1(n), t2(n))","));
    print1("T A004070 "); for(n=33, 61, print1(W(t1(n), t2(n))","));
    print1("U A004070 "); for(n=62, 86, print1(W(t1(n), t2(n))",")); /* Michael Somos, Apr 28 2000 */
    
  • PARI
    T(n, k)=sum(m=0, n-k, binomial(k, m)) \\ Jianing Song, May 30 2022

Formula

W(n, k) = Sum_{i=0..n} binomial(k, i). - Bill Gosper
W(n, k) = if k=0 or n=0 then 1 else W(n, k-1)+W(n-1, k-1). - David Broadhurst, Jan 05 2000
The table W(n,k) = A000012 * A007318(transform), where A000012 = (1; 1,1; 1,1,1; ...). - Gary W. Adamson, Nov 15 2007
E.g.f. for row n: (1 + x + x^2/2! + ... + x^n/n!)* exp(x). - Geoffrey Critzer, Mar 15 2010
G.f.: 1 / (1 - x - x*y*(1 - x^2)) = Sum_{0 <= k <= n} x^n * y^k * T(n, k). - Michael Somos, May 31 2016
W(n, n) = 2^n. - Michael Somos, May 31 2016
From Jianing Song, May 30 2022: (Start)
T(n, 0) = T(n, n) = 1 for n >= 0; T(n, k) = T(n-1, k-1) + T(n-2, k-1) for k=1, 2, ..., n-1, n >= 2.
T(n, k) = Sum_{m=0..n-k} binomial(k, m).
T(n,k) = 2^k for 0 <= k <= floor(n/2). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 20 2000

A171861 Expansion of x*(1+x+x^2) / ( (x-1)*(x^3+x^2-1) ).

Original entry on oeis.org

1, 2, 4, 6, 9, 13, 18, 25, 34, 46, 62, 83, 111, 148, 197, 262, 348, 462, 613, 813, 1078, 1429, 1894, 2510, 3326, 4407, 5839, 7736, 10249, 13578, 17988, 23830, 31569, 41821, 55402, 73393, 97226, 128798, 170622, 226027, 299423, 396652, 525453, 696078, 922108
Offset: 1

Views

Author

Ed Pegg Jr, Oct 16 2010

Keywords

Comments

Number of wins in Penney's game if the two players start HHT and TTT and HHT beats TTT.
HHT beats TTT 70% of the time. - Geoffrey Critzer, Mar 01 2014

Examples

			a(n) enumerates length n+2 sequences on {H,T} that end in HHT but do not contain the contiguous subsequence TTT.
a(3)=4 because we have: TTHHT, THHHT, HTHHT, HHHHT.
a(4)=6 because we have: TTHHHT, THTHHT, THHHHT, HTTHHT, HTHHHT, HHHHHT. - _Geoffrey Critzer_, Mar 01 2014
		

Crossrefs

Related sequences are A000045 (HHH beats HHT, HTT beats TTH), A006498 (HHH beats HTH), A023434 (HHH beats HTT), A000930 (HHH beats THT, HTH beats HHT), A000931 (HHH beats TTH), A077868 (HHT beats HTH), A002620 (HHT beats HTT), A000012 (HHT beats THH), A004277 (HHT beats THT), A070550 (HTH beats HHH), A000027 (HTH beats HTT), A097333 (HTH beats THH), A040000 (HTH beats TTH), A068921 (HTH beats TTT), A054405 (HTT beats HHH), A008619 (HTT beats HHT), A038718 (HTT beats THT), A128588 (HTT beats TTT).
Cf. A164315 (essentially the same sequence).

Programs

  • Maple
    A171861 := proc(n) option remember; if n <=4 then op(n,[1,2,4,6]); else procname(n-1)+procname(n-2)-procname(n-4) ; end if; end proc:
  • Mathematica
    nn=44;CoefficientList[Series[x(1+x+x^2)/(1-x-x^2+x^4),{x,0,nn}],x] (* Geoffrey Critzer, Mar 01 2014 *)
  • PARI
    a(n)=([0,1,0,0; 0,0,1,0; 0,0,0,1; -1,0,1,1]^(n-1)*[1;2;4;6])[1,1] \\ Charles R Greathouse IV, Oct 03 2016

Formula

a(n) = a(n-1) +a(n-2) -a(n-4) = A000931(n+10)-3 = A134816(n+6)-3 = A078027(n+12)-3.
a(n) = A164315(n-1). - Alois P. Heinz, Oct 12 2017

A077905 Expansion of 1/(1 - x^2 - x^3 + x^4).

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 0, 1, 2, -1, 3, 0, 0, 4, -3, 4, 1, -3, 8, -6, 4, 5, -10, 15, -9, 0, 16, -24, 25, -8, -15, 41, -48, 34, 8, -55, 90, -81, 27, 64, -144, 172, -107, -36, 209, -315, 280, -70, -244, 525, -594, 351, 175, -768, 1120, -944, 177, 944, -1887, 2065, -1120, -766, 2832, -3951, 3186, -353, -3597, 6784, -7136
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Examples

			G.f. = 1 + x^2 + x^3 + 2*x^5 + x^7 + 2*x^8 - x^9 + 3*x^10 + 4*x^13 + ...
		

Crossrefs

Cf. A023434.

Programs

  • Mathematica
    CoefficientList[ Series[1/((1 - x) (1 + x - x^3)), {x, 0, 68}], x] (* Robert G. Wilson v, Oct 29 2011 *)

Formula

a(n) = sum(k=1..n/2, sum(j=0..k, binomial(j,n-4*k+2*j)*(-1)^(k-j)*binomial(k,j))), n>0, a(0)=1. - Vladimir Kruchinin, Oct 21 2011
a(-3-n) = -A023434(n) for all n in Z. - Michael Somos, Sep 25 2014

A020716 Pisot sequences E(6,8), P(6,8).

Original entry on oeis.org

6, 8, 11, 15, 20, 27, 36, 48, 64, 85, 113, 150, 199, 264, 350, 464, 615, 815, 1080, 1431, 1896, 2512, 3328, 4409, 5841, 7738, 10251, 13580, 17990, 23832, 31571, 41823, 55404, 73395, 97228, 128800, 170624, 226029, 299425, 396654, 525455, 696080, 922110, 1221536
Offset: 0

Views

Author

Keywords

Crossrefs

This is a subsequence of A023434.
See A008776 for definitions of Pisot sequences.

Programs

  • Magma
    Exy:=[6,8]; [n le 2 select Exy[n] else Floor(Self(n-1)^2/Self(n-2) + 1/2): n in [1..50]]; // Bruno Berselli, Feb 05 2016
    
  • Mathematica
    RecurrenceTable[{a[0]==6, a[1]==8, a[n]== Floor[a[n-1]^2/a[n-2] + 1/2]}, a, {n, 0, 50}] (* Bruno Berselli, Feb 05 2016 *)
    LinearRecurrence[{1,1,0,-1},{6,8,11,15},50] (* Harvey P. Dale, Jul 27 2025 *)
  • PARI
    Vec((6+2*x-3*x^2-4*x^3)/((1-x)*(1-x^2-x^3)) + O(x^50)) \\ Jinyuan Wang, Mar 10 2020

Formula

a(n) = a(n-1) + a(n-2) - a(n-4) (holds at least up to n = 1000 but is not known to hold in general).
Empirical g.f.: (6+2*x-3*x^2-4*x^3) / ((1-x)*(1-x^2-x^3)). - Colin Barker, Jun 05 2016
Theorem: E(6,8) satisfies a(n) = a(n - 1) + a(n - 2) - a(n - 4) for n>=4. Proved using the PtoRv program of Ekhad-Sloane-Zeilberger. This shows that the above conjectures are correct. - N. J. A. Sloane, Sep 10 2016
a(n) = a(n-2) + a(n-3) + 1. - Greg Dresden, May 18 2020

A052954 Expansion of (2-x-x^2-x^3)/((1-x)*(1-x^2-x^3)).

Original entry on oeis.org

2, 1, 2, 2, 2, 3, 3, 4, 5, 6, 8, 10, 13, 17, 22, 29, 38, 50, 66, 87, 115, 152, 201, 266, 352, 466, 617, 817, 1082, 1433, 1898, 2514, 3330, 4411, 5843, 7740, 10253, 13582, 17992, 23834, 31573, 41825, 55406, 73397, 97230, 128802, 170626, 226031, 299427
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

For n > 2, a(n) = floor(sqrt(a(n-3)*a(n-2) + a(n-2)*a(n-1) + a(n-1)*a(n-3))). - Gerald McGarvey, Sep 19 2004

Crossrefs

Programs

  • GAP
    a:=[2,1,2,2];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]-a[n-4]; od; a; # G. C. Greubel, Oct 22 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-x^2-x^3)/((1-x)*(1-x^2-x^3)) )); // G. C. Greubel, Oct 22 2019
    
  • Maple
    spec:= [S,{S=Union(Sequence(Prod(Union(Prod(Z,Z),Z),Z)), Sequence(Z))}, unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
    seq(coeff(series((2-x-x^2-x^3)/((1-x)*(1-x^2-x^3)), x, n+1), x, n), n = 0 .. 40); # G. C. Greubel, Oct 22 2019
  • Mathematica
    LinearRecurrence[{1,1,0,-1}, {2,1,2,2}, 40] (* G. C. Greubel, Oct 22 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((2-x-x^2-x^3)/((1-x)*(1-x^2-x^3))) \\ G. C. Greubel, Oct 22 2019
    
  • Sage
    def A052954_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P((2-x-x^2-x^3)/((1-x)*(1-x^2-x^3))).list()
    A052954_list(40) # G. C. Greubel, Oct 22 2019
    

Formula

G.f.: (2-x-x^2-x^3)/((1-x)*(1-x^2-x^3)).
a(n) = a(n-2) + a(n-3) - 1.
a(n) = 1 + Sum_{alpha=RootOf(-1+z^2+z^3)} (1/23)*(3 +7*alpha -2*alpha^2) * alpha^(-1-n).
lim n->inf a(n)/a(n-1) = positive root of 1+x-x^3 (smallest Pisot-Vijayaraghavan number, A060006) - Gerald McGarvey, Sep 19 2004
a(n) = 2*A023434(n+1) - A023434(n) - A023434(n-2) - A023434(n-3). - R. J. Mathar, Nov 28 2011
a(n) = 1 + A000931(n+3). - G. C. Greubel, Oct 22 2019

Extensions

More terms from James Sellers, Jun 05 2000

A260710 Expansion of 1/(1 - x - x^2 - x^4 + x^5 + x^7).

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 16, 25, 43, 69, 116, 188, 313, 511, 846, 1386, 2288, 3756, 6191, 10174, 16756, 27552, 45357, 74604, 122787, 201996, 332414, 546901, 899946, 1480699, 2436459, 4008858, 6596366, 10853563, 17858788, 29384804, 48350401, 79555943, 130902711
Offset: 0

Views

Author

David Neil McGrath, Jul 30 2015

Keywords

Comments

This sequence counts partially ordered partitions of (n) into parts 1,2,3,4 where the order (position) of adjacent pairs of numbers (1,2);(2,3);(3,4) is unimportant. Alternatively the order of the complementary pairs (1,4);(1,3);(2,4) is important.

Examples

			There are 25 partially ordered partitions of 7, i.e., a(7) = 25. These are (43=34),(421=412),(124=214),(241),(142),(4111),(1411),(1141),(1114),(331),(313),(133),(1132=1123),(2131=1231),(1312=1321),(2311=3211),(31111),(13111),(11311),(11131),(11113),(2221=four),(22111=ten),(211111=six),(1111111).
		

Crossrefs

Programs

  • Magma
    I:=[1,1,2,3,6,9,16]; [n le 7 select I[n] else Self(n-1)+Self(n-2)+Self(n-4)-Self(n-5)-Self(n-7): n in [1..40]]; // Vincenzo Librandi, Aug 04 2015
    
  • Mathematica
    LinearRecurrence[{1, 1, 0, 1, -1, 0, -1}, {1, 1, 2, 3, 6, 9, 16}, 50] (* Vincenzo Librandi, Aug 04 2015 *)
  • PARI
    Vec(1/(1 - x - x^2 - x^4 + x^5 + x^7) + O(x^50)) \\ Michel Marcus, Aug 06 2015

Formula

G.f: 1/(1 - x - x^2 - x^4 + x^5 + x^7).
a(n) = a(n-1) + a(n-2) + a(n-4) - a(n-5) - a(n-7).
Construct the matrix array T(n,j) = [A^*j]*[S^*(j-1)] where A=(1,1,0,1,-1,0,-1) and S=(0,1,0,...) (A063524). [* is convolution operation] Define S^*0=I with I=(1,0,...). a(n) = Sum_{j=1..n} T(n,j).

A171997 a(n) = a(n-1) + a(n-2) - floor(a(n-2)/2) - floor(a(n-5)/2); initial terms are 1, 1, 2, 3, 4.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 8, 10, 13, 16, 20, 24, 29, 35, 42, 50, 59, 70, 83, 97, 114, 134, 156, 182, 212, 246, 285, 330, 382, 441, 509, 588, 678, 781, 900, 1037, 1193, 1373, 1580, 1817, 2089, 2402, 2761, 3172, 3645, 4187, 4809, 5523, 6342, 7282, 8360
Offset: 1

Views

Author

Roger L. Bagula, Nov 22 2010

Keywords

Comments

lim_{n -> infinity} a(n+1)/a(n) = 1.14710876512065387719410850648860644150605499412513....
a(n) = A062435(n+2) for n < 15.

Crossrefs

Cf. A062435 (integer part of log(n!)^log(log(1 + n))), A023434 (a(n)=a(n-1)+a(n-2)-a(n-4)), A023435 (a(n)=a(n-1)+a(n-2)-a(n-5)), A023436 (a(n)=a(n-1)+a(n-2)-a(n-6)), A023437 (a(n)=a(n-1)+a(n-2)-a(n-7)), A023438 (a(n)=a(n-1)+a(n-2)-a(n-8)), A023439 (a(n)=a(n-1)+a(n-2)-a(n-9)), A023440 (a(n)=a(n-1)+a(n-2)+a(n-10)), A023441 (a(n)=a(n-1)+a(n-2)-a(n-11)), A023442 (a(n)=a(n-1)+a(n-2)-a(n-12)), A000044 (a(n)=a(n-1)+a(n-2)-a(n-13)), A173199 (a(n)=a(n-1)+a(n-2)-floor(a(n-3)/2)-floor(a(n-8)/2)).

Programs

  • Magma
    I:=[1,1,2,3,4]; [n le 5 select I[n] else Self(n-1) + Self(n-2) - Floor(Self(n-2)/2) - Floor(Self(n-5)/2): n in [1..60]]; // Vincenzo Librandi, Jun 24 2015
  • Mathematica
    f[-3] = 0; f[-2] = 0; f[-1] = 0; f[0] = 1; f[1] = 1;
    f[n_] := f[n] = f[n - 1] + f[n - 2] - Floor[f[n - 2]/2] - Floor[f[n - 5]/2]
    Table[f[n], {n, 0, 50}]

Extensions

Offset changed from 0 to 1 by Klaus Brockhaus, Nov 29 2010

A173254 a(n) = a(n-1) + a(n-2) - [a(n-2)/2] - [a(n-4)/2].

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 9, 11, 13, 16, 19, 22, 26, 29, 33, 37, 41, 46, 51, 56, 62, 67, 73, 79, 85, 92, 99, 106, 114, 121, 129, 137, 145, 154, 163, 172, 182, 191, 201, 211, 221, 232, 243, 254, 266, 277, 289, 301, 313, 326
Offset: 0

Views

Author

Roger L. Bagula, Nov 22 2010

Keywords

Comments

The female population of Rabbits is; a(n)= f[n]-Floor[f[n]/2] Here that is the term: f[n - 2] - Floor[f[n - 2]/2] One natural child birth population limit is death by infection of the mothers. The fourth generation death of old age is the Floor[f[n - 4]/2] term. The resulting sequence approaches a stable population of rabbits at ratio one.
The ratio on the 300th iteration is approaching 1. Henry Bottomley did some of these half floor sequences, but not in the further generations.

Crossrefs

Programs

  • Mathematica
    f[-2] = 0; f[-1] = 0; f[0] = 1; f[1] = 1;
    f[n_] := f[n] = f[n - 1] + f[n - 2] - Floor[f[n - 2]/2] - Floor[f[n - 4]/2]
    Table[f[n], {n, 0, 50}]

Formula

a(n)=a(n-1)+a(n-2)-Floor[a(n-2)/2]-Floor[a(n-4)/2]
Showing 1-10 of 11 results. Next