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-7 of 7 results.

A000295 Eulerian numbers (Euler's triangle: column k=2 of A008292, column k=1 of A173018).

Original entry on oeis.org

0, 0, 1, 4, 11, 26, 57, 120, 247, 502, 1013, 2036, 4083, 8178, 16369, 32752, 65519, 131054, 262125, 524268, 1048555, 2097130, 4194281, 8388584, 16777191, 33554406, 67108837, 134217700, 268435427, 536870882, 1073741793, 2147483616, 4294967263, 8589934558
Offset: 0

Views

Author

Keywords

Comments

There are 2 versions of Euler's triangle:
* A008292 Classic version of Euler's triangle used by Comtet (1974).
* A173018 Version of Euler's triangle used by Graham, Knuth and Patashnik in Concrete Math. (1990).
Euler's triangle rows and columns indexing conventions:
* A008292 The rows and columns of the Eulerian triangle are both indexed starting from 1. (Classic version: used in the classic books by Riordan and Comtet.)
* A173018 The rows and columns of the Eulerian triangle are both indexed starting from 0. (Graham et al.)
Number of Dyck paths of semilength n having exactly one long ascent (i.e., ascent of length at least two). Example: a(4)=11 because among the 14 Dyck paths of semilength 4, the paths that do not have exactly one long ascent are UDUDUDUD (no long ascent), UUDDUUDD and UUDUUDDD (two long ascents). Here U=(1,1) and D=(1,-1). Also number of ordered trees with n edges having exactly one branch node (i.e., vertex of outdegree at least two). - Emeric Deutsch, Feb 22 2004
Number of permutations of {1,2,...,n} with exactly one descent (i.e., permutations (p(1),p(2),...,p(n)) such that #{i: p(i)>p(i+1)}=1). E.g., a(3)=4 because the permutations of {1,2,3} with one descent are 132, 213, 231 and 312.
a(n+1) is the convolution of nonnegative integers (A001477) and powers of two (A000079). - Graeme McRae, Jun 07 2006
Partial sum of main diagonal of A125127. - Jonathan Vos Post, Nov 22 2006
Number of partitions of an n-set having exactly one block of size > 1. Example: a(4)=11 because, if the partitioned set is {1,2,3,4}, then we have 1234, 123|4, 124|3, 134|2, 1|234, 12|3|4, 13|2|4, 14|2|3, 1|23|4, 1|24|3 and 1|2|34. - Emeric Deutsch, Oct 28 2006
k divides a(k+1) for k in A014741. - Alexander Adamchuk, Nov 03 2006
(Number of permutations avoiding patterns 321, 2413, 3412, 21534) minus one. - Jean-Luc Baril, Nov 01 2007, Mar 21 2008
The chromatic invariant of the prism graph P_n for n >= 3. - Jonathan Vos Post, Aug 29 2008
Decimal integer corresponding to the result of XORing the binary representation of 2^n - 1 and the binary representation of n with leading zeros. This sequence and a few others are syntactically similar. For n > 0, let D(n) denote the decimal integer corresponding to the binary number having n consecutive 1's. Then D(n).OP.n represents the n-th term of a sequence when .OP. stands for a binary operator such as '+', '-', '*', 'quotentof', 'mod', 'choose'. We then get the various sequences A136556, A082495, A082482, A066524, A000295, A052944. Another syntactically similar sequence results when we take the n-th term as f(D(n)).OP.f(n). For example if f='factorial' and .OP.='/', we get (A136556)(A000295) ; if f='squaring' and .OP.='-', we get (A000295)(A052944). - K.V.Iyer, Mar 30 2009
Chromatic invariant of the prism graph Y_n.
Number of labelings of a full binary tree of height n-1, such that each path from root to any leaf contains each label from {1,2,...,n-1} exactly once. - Michael Vielhaber (vielhaber(AT)gmail.com), Nov 18 2009
Also number of nontrivial equivalence classes generated by the weak associative law X((YZ)T)=(X(YZ))T on words with n open and n closed parentheses. Also the number of join (resp. meet)-irreducible elements in the pruning-grafting lattice of binary trees with n leaves. - Jean Pallo, Jan 08 2010
Nonzero terms of this sequence can be found from the row sums of the third sub-triangle extracted from Pascal's triangle as indicated below by braces:
1;
1, 1;
{1}, 2, 1;
{1, 3}, 3, 1;
{1, 4, 6}, 4, 1;
{1, 5, 10, 10}, 5, 1;
{1, 6, 15, 20, 15}, 6, 1;
... - L. Edson Jeffery, Dec 28 2011
For integers a, b, denote by a<+>b the least c >= a, such that the Hamming distance D(a,c) = b (note that, generally speaking, a<+>b differs from b<+>a). Then for n >= 3, a(n) = n<+>n. This has a simple explanation: for n >= 3 in binary we have a(n) = (2^n-1)-n = "anti n". - Vladimir Shevelev, Feb 14 2012
a(n) is the number of binary sequences of length n having at least one pair 01. - Branko Curgus, May 23 2012
Nonzero terms are those integers k for which there exists a perfect (Hamming) error-correcting code. - L. Edson Jeffery, Nov 28 2012
a(n) is the number of length n binary words constructed in the following manner: Select two positions in which to place the first two 0's of the word. Fill in all (possibly none) of the positions before the second 0 with 1's and then complete the word with an arbitrary string of 0's or 1's. So a(n) = Sum_{k=2..n} (k-1)*2^(n-k). - Geoffrey Critzer, Dec 12 2013
Without first 0: a(n)/2^n equals Sum_{k=0..n} k/2^k. For example: a(5)=57, 57/32 = 0/1 + 1/2 + 2/4 + 3/8 + 4/16 + 5/32. - Bob Selcoe, Feb 25 2014
The first barycentric coordinate of the centroid of the first n rows of Pascal's triangle, assuming the numbers are weights, is A000295(n+1)/A000337(n). See attached figure. - César Eliud Lozada, Nov 14 2014
Starting (0, 1, 4, 11, ...), this is the binomial transform of (0, 1, 2, 2, 2, ...). - Gary W. Adamson, Jul 27 2015
Also the number of (non-null) connected induced subgraphs in the n-triangular honeycomb rook graph. - Eric W. Weisstein, Aug 27 2017
a(n) is the number of swaps needed in the worst case to transform a binary tree with n full levels into a heap, using (bottom-up) heapify. - Rudy van Vliet, Sep 19 2017
The utility of large networks, particularly social networks, with n participants is given by the terms a(n) of this sequence. This assertion is known as Reed's Law, see the Wikipedia link. - Johannes W. Meijer, Jun 03 2019
a(n-1) is the number of subsets of {1..n} in which the largest element of the set exceeds by at least 2 the next largest element. For example, for n = 5, a(4) = 11 and the 11 sets are {1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {3,5}, {1,2,4}, {1,2,5}, {1,3,5}, {2,3,5}, {1,2,3,5}. - Enrique Navarrete, Apr 08 2020
a(n-1) is also the number of subsets of {1..n} in which the second smallest element of the set exceeds by at least 2 the smallest element. For example, for n = 5, a(4) = 11 and the 11 sets are {1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {3,5}, {1,3,4}, {1,3,5}, {1,4,5}, {2,4,5}, {1,3,4,5}. - Enrique Navarrete, Apr 09 2020
a(n+1) is the sum of the smallest elements of all subsets of {1..n}. For example, for n=3, a(4)=11; the subsets of {1,2,3} are {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1,2,3}, and the sum of smallest elements is 11. - Enrique Navarrete, Aug 20 2020
Number of subsets of an n-set that have more than one element. - Eric M. Schmidt, Mar 13 2021
Number of individual bets in a "full cover" bet on n-1 horses, dogs, etc. in different races. Each horse, etc. can be bet on or not, giving 2^n bets. But, by convention, singles (a bet on only one race) are not included, reducing the total number bets by n. It is also impossible to bet on no horses at all, reducing the number of bets by another 1. A full cover on 4 horses, dogs, etc. is therefore 6 doubles, 4 trebles and 1 four-horse etc. accumulator. In British betting, such a bet on 4 horses etc. is a Yankee; on 5, a super-Yankee. - Paul Duckett, Nov 17 2021
From Enrique Navarrete, May 25 2022: (Start)
Number of binary sequences of length n with at least two 1's.
a(n-1) is the number of ways to choose an odd number of elements greater than or equal to 3 out of n elements.
a(n+1) is the number of ways to split [n] = {1,2,...,n} into two (possibly empty) complementary intervals {1,2,...,i} and {i+1,i+2,...,n} and then select a subset from the first interval (2^i choices, 0 <= i <= n), and one block/cell (i.e., subinterval) from the second interval (n-i choices, 0 <= i <= n).
(End)
Number of possible conjunctions in a system of n planets; for example, there can be 0 conjunctions with one planet, one with two planets, four with three planets (three pairs of planets plus one with all three) and so on. - Wendy Appleby, Jan 02 2023
Largest exponent m such that 2^m divides (2^n-1)!. - Franz Vrabec, Aug 18 2023
It seems that a(n-1) is the number of odd r with 0 < r < 2^n for which there exist u,v,w in the x-independent beginning of the Collatz trajectory of 2^n x + r with u+v = w+1, as detailed in the link "Collatz iteration and Euler numbers?". A better understanding of this might also give a formula for A374527. - Markus Sigg, Aug 02 2024
This sequence has a connection to consecutively halved positional voting (CHPV); see Mendenhall and Switkay. - Hal M. Switkay, Feb 25 2025
a(n) is the number of subsets of size 2 and more of an n-element set. Equivalently, a(n) is the number of (hyper)edges of size 2 and more in a complete hypergraph of n vertices. - Yigit Oktar, Apr 05 2025

Examples

			G.f. = x^2 + 4*x^3 + 11*x^4 + 26*x^5 + 57*x^6 + 120*x^7 + 247*x^8 + 502*x^9 + ...
		

References

  • O. Bottema, Problem #562, Nieuw Archief voor Wiskunde, 28 (1980) 115.
  • L. Comtet, "Permutations by Number of Rises; Eulerian Numbers." Section 6.5 in Advanced Combinatorics: The Art of Finite and Infinite Expansions, rev. enl. ed. Dordrecht, Netherlands: Reidel, pp. 51 and 240-246, 1974.
  • F. N. David and D. E. Barton, Combinatorial Chance. Hafner, NY, 1962, p. 151.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990.
  • D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, Vol. 3, p. 34.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 215.
  • 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

Cf. A008292 (classic version of Euler's triangle used by Comtet (1974)).
Cf. A173018 (version of Euler's triangle used by Graham, Knuth and Patashnik in Concrete Math. (1990)).
Cf. A002662 (partial sums).
Partial sums of A000225.
Row sums of A014473 and of A143291.
Second column of triangles A112493 and A112500.
Sequences A125128 and A130103 are essentially the same.
Column k=1 of A124324.

Programs

  • Haskell
    a000295 n = 2^n - n - 1  -- Reinhard Zumkeller, Nov 25 2013
    
  • Magma
    [2^n-n-1: n in [0..40]]; // Vincenzo Librandi, Jul 29 2015
    
  • Magma
    [EulerianNumber(n, 1): n in [0..40]]; // G. C. Greubel, Oct 02 2024
    
  • Maple
    [ seq(2^n-n-1, n=1..50) ];
    A000295 := -z/(2*z-1)/(z-1)**2; # Simon Plouffe in his 1992 dissertation
    # Grammar specification:
    spec := [S, { B = Set(Z, 1 <= card), C = Sequence(B, 2 <= card), S = Prod(B, C) }, unlabeled]:
    struct := n -> combstruct[count](spec, size = n+1);
    seq(struct(n), n = 0..33); # Peter Luschny, Jul 22 2014
  • Mathematica
    a[n_] = If[n==0, 0, n*(HypergeometricPFQ[{1, 1-n}, {2}, -1] - 1)];
    Table[a[n], {n,0,40}] (* Olivier Gérard, Mar 29 2011 *)
    LinearRecurrence[{4, -5, 2}, {0, 0, 1}, 40] (* Vincenzo Librandi, Jul 29 2015 *)
    Table[2^n -n-1, {n,0,40}] (* Eric W. Weisstein, Nov 16 2017 *)
  • PARI
    a(n)=2^n-n-1 \\ Charles R Greathouse IV, Jun 10 2011
    
  • SageMath
    [2^n -(n+1) for n in range(41)] # G. C. Greubel, Oct 02 2024

Formula

a(n) = 2^n - n - 1.
G.f.: x^2/((1-2*x)*(1-x)^2).
A107907(a(n+2)) = A000079(n+2). - Reinhard Zumkeller, May 28 2005
E.g.f.: exp(x)*(exp(x)-1-x). - Emeric Deutsch, Oct 28 2006
a(0)=0, a(1)=0, a(n) = 3*a(n-1) - 2*a(n-2) + 1. - Miklos Kristof, Mar 09 2005
a(0)=0, a(n) = 2*a(n-1) + n - 1 for all n in Z.
a(n) = Sum_{k=2..n} binomial(n, k). - Paul Barry, Jun 05 2003
a(n+1) = Sum_{i=1..n} Sum_{j=1..i} C(i, j). - Benoit Cloitre, Sep 07 2003
a(n+1) = 2^n*Sum_{k=0..n} k/2^k. - Benoit Cloitre, Oct 26 2003
a(0)=0, a(1)=0, a(n) = Sum_{i=0..n-1} i+a(i) for i > 1. - Gerald McGarvey, Jun 12 2004
a(n+1) = Sum_{k=0..n} (n-k)*2^k. - Paul Barry, Jul 29 2004
a(n) = Sum_{k=0..n} binomial(n, k+2); a(n+2) = Sum_{k=0..n} binomial(n+2, k+2). - Paul Barry, Aug 23 2004
a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k+1)*2^(n-k-2)*(-1/2)^k. - Paul Barry, Oct 25 2004
a(0) = 0; a(n) = Stirling2(n,2) + a(n-1) = A000225(n-1) + a(n-1). - Thomas Wieder, Feb 18 2007
a(n) = A000325(n) - 1. - Jonathan Vos Post, Aug 29 2008
a(0) = 0, a(n) = Sum_{k=0..n-1} 2^k - 1. - Doug Bell, Jan 19 2009
a(n) = A000217(n-1) + A002662(n) for n>0. - Geoffrey Critzer, Feb 11 2009
a(n) = A000225(n) - n. - Zerinvary Lajos, May 29 2009
a(n) = n*(2F1([1,1-n],[2],-1) - 1). - Olivier Gérard, Mar 29 2011
Column k=1 of A173018 starts a'(n) = 0, 1, 4, 11, ... and has the hypergeometric representation n*hypergeom([1, -n+1], [-n], 2). This can be seen as a formal argument to prefer Euler's A173018 over A008292. - Peter Luschny, Sep 19 2014
E.g.f.: exp(x)*(exp(x)-1-x); this is U(0) where U(k) = 1 - x/(2^k - 2^k/(x + 1 - x^2*2^(k+1)/(x*2^(k+1) - (k+1)/U(k+1)))); (continued fraction, 3rd kind, 4-step). - Sergei N. Gladkovskii, Dec 01 2012
a(n) = A079583(n) - A000225(n+1). - Miquel Cerda, Dec 25 2016
a(0) = 0; a(1) = 0; for n > 1: a(n) = Sum_{i=1..2^(n-1)-1} A001511(i). - David Siegers, Feb 26 2019
a(n) = A007814(A028366(n)). - Franz Vrabec, Aug 18 2023
a(n) = Sum_{k=1..floor((n+1)/2)} binomial(n+1, 2*k+1). - Taras Goy, Jan 02 2025

A001715 a(n) = n!/6.

Original entry on oeis.org

1, 4, 20, 120, 840, 6720, 60480, 604800, 6652800, 79833600, 1037836800, 14529715200, 217945728000, 3487131648000, 59281238016000, 1067062284288000, 20274183401472000, 405483668029440000, 8515157028618240000, 187333454629601280000, 4308669456480829440000
Offset: 3

Views

Author

Keywords

Comments

The numbers (4, 20, 120, 840, 6720, ...) arise from the divisor values in the general formula a(n) = n*(n+1)*(n+2)*(n+3)* ... *(n+k)*(n*(n+k) + (k-1)*k/6)/((k+3)!/6) (which covers the following sequences: A000578, A000537, A024166, A101094, A101097, A101102). - Alexander R. Povolotsky, May 17 2008
a(n) is also the number of decreasing 3-cycles in the decomposition of permutations as product of disjoint cycles, a(3)=1, a(4)=4, a(5)=20. - Wenjin Woan, Dec 21 2008
Equals eigensequence of triangle A130128 reflected. - Gary W. Adamson, Dec 23 2008
a(n) is the number of n-permutations having 1, 2, and 3 in three distinct cycles. - Geoffrey Critzer, Apr 26 2009
From Johannes W. Meijer, Oct 20 2009: (Start)
The asymptotic expansion of the higher order exponential integral E(x,m=1,n=4) ~ exp(-x)/x*(1 - 4/x + 20/x^2 - 120/x^3 + 840/x^4 - 6720/x^5 + 60480/x^6 - 604800/x^7 + ...) leads to the sequence given above. See A163931 and A130534 for more information.
(End)

References

  • 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

Programs

Formula

a(n) = A049352(n-2, 1) (first column of triangle).
E.g.f. if offset 0: 1/(1-x)^4.
a(n) = A173333(n,3). - Reinhard Zumkeller, Feb 19 2010
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x/(x + 1/(k+4)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 01 2013
G.f.: W(0), where W(k) = 1 - x*(k+4)/( x*(k+4) - 1/(1 - x*(k+1)/( x*(k+1) - 1/W(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Aug 26 2013
a(n) = A245334(n,n-3) / 4. - Reinhard Zumkeller, Aug 31 2014
From Peter Bala, May 22 2017: (Start)
The o.g.f. A(x) satisfies the Riccati equation x^2*A'(x) + (4*x - 1)*A(x) + 1 = 0.
G.f. as an S-fraction: A(x) = 1/(1 - 4*x/(1 - x/(1 - 5*x/(1 - 2*x/(1 - 6*x/(1 - 3*x/(1 - ... - (n + 3)*x/(1 - n*x/(1 - ... ))))))))) (apply Stokes, 1982).
A(x) = 1/(1 - 3*x - x/(1 - 4*x/(1 - 2*x/(1 - 5*x/(1 - 3*x/(1 - 6*x/(1 - ... - n*x/(1 - (n+3)*x/(1 - ... ))))))))). (End)
H(x) = (1 - (1 + x)^(-3)) / 3 = x - 4 x^2/2! + 20 x^3/3! - ... is an e.g.f. of the signed sequence (n!/4!), which is the compositional inverse of G(x) = (1 - 3*x)^(-1/3) - 1, an e.g.f. for A007559. Cf. A094638, A001710 (for n!/2!), and A001720 (for n!/4!). Cf. columns of A094587, A173333, and A213936 and rows of A138533.- Tom Copeland, Dec 27 2019
E.g.f.: x^3 / (3! * (1 - x)). - Ilya Gutkovskiy, Jul 09 2021
From Amiram Eldar, Jan 15 2023: (Start)
Sum_{n>=3} 1/a(n) = 6*e - 15.
Sum_{n>=3} (-1)^(n+1)/a(n) = 3 - 6/e. (End)

Extensions

More terms from Harvey P. Dale, Aug 12 2012

A125128 a(n) = 2^(n+1) - n - 2, or partial sums of main diagonal of array A125127 of k-step Lucas numbers.

Original entry on oeis.org

1, 4, 11, 26, 57, 120, 247, 502, 1013, 2036, 4083, 8178, 16369, 32752, 65519, 131054, 262125, 524268, 1048555, 2097130, 4194281, 8388584, 16777191, 33554406, 67108837, 134217700, 268435427, 536870882, 1073741793, 2147483616, 4294967263, 8589934558
Offset: 1

Views

Author

Jonathan Vos Post, Nov 22 2006

Keywords

Comments

Essentially a duplicate of A000295: a(n) = A000295(n+1).
Partial sums of main diagonal of array A125127 = L(k,n): k-step Lucas numbers, read by antidiagonals.
Equals row sums of triangle A130128. - Gary W. Adamson, May 11 2007
Row sums of triangle A130330 which is composed of (1,3,7,15,...) in every column, thus: row sums of (1; 3,1; 7,3,1; ...). - Gary W. Adamson, May 24 2007
Row sums of triangle A131768. - Gary W. Adamson, Jul 13 2007
Convolution A130321 * (1, 2, 3, ...). Binomial transform of (1, 3, 4, 4, 4, ...). - Gary W. Adamson, Jul 27 2007
Row sums of triangle A131816. - Gary W. Adamson, Jul 30 2007
A000975 convolved with [1, 2, 2, 2, ...]. - Gary W. Adamson, Jun 02 2009
The eigensequence of a triangle with the triangular series as the left border and the rest 1's. - Gary W. Adamson, Jul 24 2010

Examples

			a(1) = 1 because "1-step Lucas number"(1) = 1.
a(2) = 4 = a(1) + [2-step] Lucas number(2) = 1 + 3.
a(3) = 11 = a(2) + 3-step Lucas number(3) = 1 + 3 + 7.
a(4) = 26 = a(3) + 4-step Lucas number(4) = 1 + 3 + 7 + 15.
a(5) = 57 = a(4) + 5-step Lucas number(5) = 1 + 3 + 7 + 15 + 31.
a(6) = 120 = a(5) + 6-step Lucas number(6) = 1 + 3 + 7 + 15 + 31 + 63.
G.f. = x + 4*x^2 + 11*x^3 + 26*x^4 + 57*x^5 + 120*x^6 + 247*x^7 + 502*x^8 + ...
		

Crossrefs

Programs

  • GAP
    List([1..40], n-> 2^(n+1) -n-2); # G. C. Greubel, Jul 26 2019
  • Magma
    I:=[1, 4, 11]; [n le 3 select I[n] else 4*Self(n-1)-5*Self(n-2)+2*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Jun 28 2012
    
  • Mathematica
    CoefficientList[Series[1/((1-x)^2*(1-2*x)),{x,0,40}],x] (* Vincenzo Librandi, Jun 28 2012 *)
    LinearRecurrence[{4,-5,2},{1,4,11},40] (* Harvey P. Dale, Nov 16 2014 *)
    a[ n_] := With[{m = n + 1}, If[ m < 0, 0, 2^m - (1 + m)]]; (* Michael Somos, Aug 17 2015 *)
  • PARI
    A125128(n)=2<M. F. Hasler, Jul 30 2015
    
  • PARI
    {a(n) = n++; if( n<0, 0, 2^n - (1+n))}; /* Michael Somos, Aug 17 2015 */
    
  • Sage
    [2^(n+1) -n-2 for n in (1..40)] # G. C. Greubel, Jul 26 2019
    

Formula

a(n) = A000295(n+1) = 2^(n+1) - n - 2 = Sum_{i=1..n} A125127(i,i) = Sum_{i=1..n} ((2^i)-1). [Edited by M. F. Hasler, Jul 30 2015]
From Colin Barker, Jun 17 2012: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
G.f.: x/((1-x)^2*(1-2*x)). (End)
a(n) = A000225(n) + A000325(n) - 1. - Miquel Cerda, Aug 07 2016
a(n) = A095151(n) - A000225(n). - Miquel Cerda, Aug 12 2016
E.g.f.: 2*exp(2*x) - (2+x)*exp(x). - G. C. Greubel, Jul 26 2019

Extensions

Edited by M. F. Hasler, Jul 30 2015

A287870 The extended Wythoff array (the Wythoff array with two extra columns) read by antidiagonals downwards.

Original entry on oeis.org

0, 1, 1, 1, 3, 2, 2, 4, 4, 3, 3, 7, 6, 6, 4, 5, 11, 10, 9, 8, 5, 8, 18, 16, 15, 12, 9, 6, 13, 29, 26, 24, 20, 14, 11, 7, 21, 47, 42, 39, 32, 23, 17, 12, 8, 34, 76, 68, 63, 52, 37, 28, 19, 14, 9, 55, 123, 110, 102, 84, 60, 45, 31, 22, 16, 10, 89, 199, 178, 165, 136, 97, 73, 50, 36, 25, 17, 11
Offset: 1

Views

Author

N. J. A. Sloane, Jun 14 2017

Keywords

Comments

From Peter Munn, Apr 28 2025: (Start)
Each row in the Wythoff array, A035513, and this extended array satisfies the Fibonacci recurrence; that is each term after the first 2 is the sum of the preceding 2 terms.
We use F_i to denote the i-th Fibonacci term, A000045(i). In particular, we refer below to F_0 = 0, F_1 = 1 and F_2 = 1 several times. Note that to fully understand the description of the relationship between neighboring columns it is important to distinguish F_1 and F_2, although they have the same integer value. Similarly, the identity of an array term should be understood here as including its position in the array, not only its integer value.
The terms of this extended Wythoff array map 1:1 onto the nonempty finite subsets of Fibonacci terms (from F_0 onwards) that do not include both F_i and F_{i+1} for any i. With this map each term is the sum of its subset image. See the table in the examples.
Full description of the mapping with its relationship to A035513:
The (unextended) Wythoff array A035513 includes every positive integer exactly once. So, using the Zeckendorf representation (see link below), the array terms map 1:1 to nonempty finite subsets of the Fibonacci terms from F_2 onwards -- more precisely, onto those that do not include both F_i and F_{i+1} for any i. (Again, each array term is the sum of the Fibonacci numbers from the relevant subset.)
As shown in the Kimberling 1995 link, when we proceed from one term to the next in a row, the indices of the Fibonacci terms in the corresponding subset are incremented. When we proceed leftwards, the indices are decremented, with the subsets for the leftmost column being those that include F_2.
And when we add 2 columns on the left of the Wythoff array, the mapping continues to decrement the indices, so the corresponding extra subsets have F_0 (new leftmost column) or F_1 as their first Fibonacci term.
Thus the terms of this extended Wythoff array map 1:1 onto the nonempty finite subsets of Fibonacci terms (from F_0 onwards) that do not include both F_i and F_{i+1} for any i. The leftmost column is the nonnegative integers: if we were to remove F_0 (value 0) from the subset for an integer in this column, the subset would form the Zeckendorf representation of the integer, as subsets do in the unextended array.
(End)

Examples

			The extended Wythoff array is the Wythoff array with two extra columns, giving the row number n and A000201(n), separated from the main array by a vertical bar:
   0   1 |  1   2   3    5    8   13   21   34    55    89   144 ...
   1   3 |  4   7  11   18   29   47   76  123   199   322   521 ...
   2   4 |  6  10  16   26   42   68  110  178   288   466   754 ...
   3   6 |  9  15  24   39   63  102  165  267   432   699  1131 ...
   4   8 | 12  20  32   52   84  136  220  356   576   932  1508 ...
   5   9 | 14  23  37   60   97  157  254  411   665  1076  1741 ...
   6  11 | 17  28  45   73  118  191  309  500   809  1309  2118 ...
   7  12 | 19  31  50   81  131  212  343  555   898  1453  2351 ...
   8  14 | 22  36  58   94  152  246  398  644  1042  1686  2728 ...
   9  16 | 25  41  66  107  173  280  453  733  1186  1919  3105 ...
  10  17 | 27  44  71  115  186  301  487  788  1275  2063  3338 ...
  11  19 | 30  49  79 ...
  12  21 | 33  54  87 ...
  13  22 | 35  57  92 ...
  14  24 | 38  62 ...
  15  25 | 40  65 ...
  16  27 | 43  70 ...
  17  29 | 46  75 ...
  18  30 | 48  78 ...
  19  32 | 51  83 ...
  20  33 | 53  86 ...
  21  35 | 56  91 ...
  22  37 | 59  96 ...
  23  38 | 61  99 ...
  24  40 | 64 ...
  25  42 | 67 ...
  26  43 | 69 ...
  27  45 | 72 ...
  28  46 | 74 ...
  29  48 | 77 ...
  30  50 | 80 ...
  31  51 | 82 ...
  32  53 | 85 ...
  33  55 | 88 ...
  34  56 | 90 ...
  35  58 | 93 ...
  36  59 | 95 ...
  37  61 | 98 ...
  38  63 | ...
  ...
From _Peter Munn_, Sep 12 2022: (Start)
In the table below, the array terms are shown in the small box at the bottom right of the cells. At the top of each cell is shown a pattern of Fibonacci terms, with "*" indicating a Fibonacci term that appears below it. Those Fibonacci terms sum to the array term. The pattern never includes "**", which would indicate 2 consecutive Fibonacci terms. Note that a Fibonacci term shown as "1" in the 2nd column is F_1, so it may accompany "2", which is F_3. In other columns a Fibonacci term shown as "1" is F_2 and may not accompany "2".
+----------+-----------+------------+------------+------------+
|      *   |      *    |       *    |       *    |       *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
|       |0 |       | 1 |        | 1 |        | 2 |        | 3 |
|----------+-----------+------------+------------+------------|
|    * *   |    * *    |     * *    |     * *    |     * *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
|    1  |1 |    2  | 3 |     3  | 4 |     5  | 7 |     8  |11 |
|----------+-----------+------------+------------+------------|
|   *  *   |   *  *    |    *  *    |    *  *    |    *  *    |
|   2  0 __|   3  1 ___|    5  1 ___|    8  2 ___|   13  3 ___|
|       |2 |       | 4 |        | 6 |        |10 |        |16 |
|----------+-----------+------------+------------+------------|
|  *   *   |  *   *    |   *   *    |   *   *    |   *   *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
|  3    |3 |  5    | 6 |   8    | 9 |  13    |15 |  21    |24 |
|----------+-----------+------------+------------+------------|
|  * * *   |  * * *    |   * * *    |   * * *    |   * * *    |
|      0   |      1    |       1    |       2    |       3    |
|    1   __|    2   ___|     3   ___|     5   ___|     8   ___|
|  3    |4 |  5    | 8 |   8    |12 |  13    |20 |  21    |32 |
|----------+-----------+------------+------------+------------|
| *    *   | *    *    |  *    *    |  *    *    |  *    *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
| 5     |5 | 8     | 9 | 13     |14 | 21     |23 | 34     |37 |
|----------+-----------+------------+------------+------------|
| *  * *   | *  * *    |  *  * *    |  *  * *    |  *  * *    |
|      0 __|      1 ___|       1 ___|       2 ___|       3 ___|
| 5  1  |6 | 8  2  |11 | 13  3  |17 | 21  5  |28 | 34  8  |45 |
|----------+-----------+------------+------------+------------|
| * *  *   | * *  *    |  * *  *    |  * *  *    |  * *  *    |
|   2  0 __|   3  1 ___|    5  1 ___|    8  2 ___|   13  3 ___|
| 5     |7 | 8     |12 | 13     |19 | 21     |31 | 34     |50 |
+----------+-----------+------------+------------+------------+
If we replace the Fibonacci terms 0, 1, 1, 2, 3, 5, ... in the main part of the cells with the powers of 2 (1, 2, 4, ...) the sums in the small boxes become the terms of A356875. From this may be seen a relationship to A054582.
- - - - -
Each row of the extended Wythoff array satisfies the Fibonacci recurrence, and may be further extended to the left using this recurrence backwards:
... -1   1   0   1 |  1   2    3    5 ...
... -1   2   1   3 |  4   7   11   18 ...
...  0   2   2   4 |  6  10   16   26 ...
...  0   3   3   6 |  9  15   24   39 ...
...  0   4   4   8 | 12  20   32   52 ...
...  1   4   5   9 | 14  23   37   60 ...
...  1   5   6  11 | 17  28   45   73 ...
...  2   5   7  12 | 19  31   50   81 ...
...  2   6   8  14 | 22  36   58   94 ...
    ...
...  5  10  15  25 | 40  65  105  170 ...
    ...
Note that multiples (*2, *3 and *4) of the top (Fibonacci sequence) row appear a little below, but shifted 2 columns to the left. Larger multiples appear further down and shifted further to the left, starting with row 15, where the terms are 5 times those in the top row and shifted 4 columns leftwards.
(End)
		

Crossrefs

Subtables: A035513 (the Wythoff array), A287869.
Related as a subtable of A357316 as A054582 is to A130128 (as a square).
See A014417 for sequences related to Zeckendorf representation.
See the formula section for the relationships with A003622, A022341, A054582, A356874, A356875.

Formula

From Peter Munn, Apr 29 2025: (Start)
A(n,k) = A356874(floor(m/2)), where m = A356875(n-1, k-1) = A054582(k-1, (A022341(n-1)-1)/2).
A(n,k) = A357316(A003622(n), k-1).
(End)

A330617 Triangle read by rows: T(n,k) is the number of paths from node 0 to k in a directed graph with n+1 vertices labeled 0, 1, ..., n and edges leading from i to i+1 for all i, and from i to i+2 for even i and from i to i-2 for odd i.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 4, 1, 3, 2, 4, 4, 4, 1, 3, 2, 4, 4, 4, 8, 1, 4, 2, 6, 4, 8, 8, 8, 1, 4, 2, 6, 4, 8, 8, 8, 16, 1, 5, 2, 8, 4, 12, 8, 16, 16, 16, 1, 5, 2, 8, 4, 12, 8, 16, 16, 16, 32, 1, 6, 2, 10, 4, 16, 8, 24, 16, 32, 32, 32, 1, 6, 2, 10, 4, 16, 8, 24, 16, 32, 32, 32, 64
Offset: 0

Views

Author

Grace Work, Mar 01 2020

Keywords

Examples

			First few rows of the triangle are:
  1;
  1,  1;
  1,  1,  2;
  1,  2,  2,  2;
  1,  2,  2,  2,  4;
  1,  3,  2,  4,  4,  4;
  1,  3,  2,  4,  4,  4,  8;
  1,  4,  2,  6,  4,  8,  8,  8;
  1,  4,  2,  6,  4,  8,  8,  8, 16;
  1,  5,  2,  8,  4, 12,  8, 16, 16, 16;
  1,  5,  2,  8,  4, 12,  8, 16, 16, 16, 32;
  ...
For n=6 and k=3, T(6,3)=4 is the number of paths from node 0 to node 3 along the directed network: {0,1,2,3}, {0,2,3}, {0,2,4,5,3}, {0,1,2,4,5,3}.
		

Crossrefs

Cf. A130128.

Programs

  • Mathematica
    Table[If[EvenQ@ k, 2^(k/2), 2^((k - 1)/2)*(Ceiling[n/2] - (k - 1)/2)], {n, 0, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Mar 23 2020 *)
  • PARI
    T(n,k)={if(k%2, 2^(k\2)*((n+1)\2 - k\2), 2^(k/2))} \\ Andrew Howroyd, Mar 17 2020

Formula

For k odd: T(n, k) = 2^((k-1)/2)*(ceiling(n/2) - (k-1)/2).
For k even: T(n, k) = 2^(k/2).
T(2*n-1, 2*k-1) = A130128(n, k).

A357213 Triangular array read by rows: T(n, k) = number of subsets s of {1, 2, ..., n} such max(s) - min(s) = k, for n >= 1, 0 <= k <= n-1.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 4, 3, 4, 4, 5, 4, 6, 8, 8, 6, 5, 8, 12, 16, 16, 7, 6, 10, 16, 24, 32, 32, 8, 7, 12, 20, 32, 48, 64, 64, 9, 8, 14, 24, 40, 64, 96, 128, 128, 10, 9, 16, 28, 48, 80, 128, 192, 256, 256, 11, 10, 18, 32, 56, 96, 160, 256, 384, 512, 512, 12, 11
Offset: 1

Views

Author

Clark Kimberling, Sep 24 2022

Keywords

Examples

			First 7 rows:
  1
  2     1
  3     2     2
  4     3     4     4
  5     4     6     8    8
  6     5     8    12   16    16
  7     6    10    16   24    32   32
		

Crossrefs

Cf. A000027, A130128 (obtained by deleting the first column), A000225 (row sums).

Programs

  • Mathematica
    s[n_] := s[n] = Subsets[Range[n]]
    u[n_, k_] := u[n, k] = Max[s[n][[k]]] - Min[s[n][[k]]]
    v[n_] := Table[u[n, k], {k, 1, 2^n}];
    t = Table[Count[v[n], i], {n, 1, 14}, {i, 0, n - 1}]
    TableForm[t] (* A357213, array *)
    Flatten[t]   (* A357213, sequence *)
  • PARI
    T(n, k) = my(nb=0); forsubset(n, s, if (#s && (vecmax(s)-vecmin(s) == k), nb++)); nb; \\ Michel Marcus, Sep 26 2022

Formula

The n-th diagonal starts with n, followed by n*A000079(k), for k >= 0.
The columns, excluding the first, are given as in A130128 by T(n,k) = (n-k+1)*2^(k-1), for n >= 1, k >= 1.

A357316 A distension of the Wythoff array by inclusion of intermediate rows. Square array A(n,k), n >= 0, k >= 0, read by descending antidiagonals. If S is the set such that Sum_{i in S} F_i is the Zeckendorf representation of n then A(n,k) = Sum_{i in S} F_{i+k-2}.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 2, 2, 2, 1, 0, 3, 3, 3, 3, 2, 0, 5, 5, 5, 4, 3, 2, 0, 8, 8, 8, 7, 5, 4, 3, 0, 13, 13, 13, 11, 8, 6, 4, 3, 0, 21, 21, 21, 18, 13, 10, 7, 5, 3, 0, 34, 34, 34, 29, 21, 16, 11, 8, 6, 4, 0, 55, 55, 55, 47, 34, 26, 18, 13, 9, 6, 4
Offset: 0

Views

Author

Peter Munn, Sep 23 2022

Keywords

Comments

Note the Zeckendorf representation of 0 is taken to be the empty sum.
The Wythoff array A035513 is the subtable formed by rows 3, 11, 16, 24, 32, ... (A035337). If, instead, we use rows 2, 7, 10, 15, 20, ... (A035336) or 1, 4, 6, 9, 12, ... (A003622), we get the Wythoff array extended by 1 column (A287869) or 2 columns (A287870) respectively.
Similarly, using A035338 truncates by 1 column; and in general if S_k is column k of the Wythoff array then the rows here numbered by S_k form an array A_k that starts with column k-2 of the Wythoff array. (A_0 and A_1 are the 2 extended arrays mentioned above.) As every positive integer occurs exactly once in the Wythoff array, every row except row 0 of A(.,.) is a row of exactly one such A_k.
Columns 4 onwards match certain columns of the multiplication table for Knuth's Fibonacci (or circle) product (extended variant - see A135090 and formula below).
For k > 0, the first row to contain k is A348853(k).

Examples

			Example for n = 4, k = 3. The Zeckendorf representation of 4 is F_4 + F_2 = 3 + 1. So the values of i in the sums in the definition are 4 and 2; hence A(4,3) = Sum_{i = 2,4} F_{i+k-2} = F_{4+3-2} + F_{2+3-2} = F_5 + F_3 = 5 + 2 = 7.
Square array A(n,k) begins:
   n\k| 0   1    2    3    4    5    6
  ----+--------------------------------
   0  | 0   0    0    0    0    0    0  ...
   1* | 0   1    1    2    3    5    8  ...
   2  | 1   1    2    3    5    8   13  ...
   3  | 1   2    3    5    8   13   21  ...
   4* | 1   3    4    7   11   18   29  ...
   5  | 2   3    5    8   13   21   34  ...
   6* | 2   4    6   10   16   26   42  ...
   7  | 3   4    7   11   18   29   47  ...
   8  | 3   5    8   13   21   34   55  ...
   9* | 3   6    9   15   24   39   63  ...
  10  | 4   6   10   16   26   42   68  ...
  11  | 4   7   11   18   29   47   76  ...
  12* | 4   8   12   20   32   52   84  ...
  ...
The asterisked rows form the start of the extended Wythoff array (A287870).
		

Crossrefs

Columns, some differing initially: A005206 (1), A022342 (3), A026274 (4), A101345 (5), A101642 (6).
Rows: A000045 (1), A000204 (4).
Related to subtable A287870 as A130128 (as a square) is to A054582.
Other subtables: A035513, A287869.
See the comments for the relationship to A003622, A035336, A035337, A035338, A348853.
See the formula section for the relationship to A003714, A022342, A135090, A356874.

Programs

  • PARI
    A5206(m) = if(m>0,m-A5206(A5206(m-1)),0)
    A(n,k) = if(k==2,n, if(k==1,A5206(n), if(k==0,n-A5206(n), A(n,k-2)+A(n,k-1)))) \\ simple encoding of formulas, not efficient

Formula

For n >= 0, k >= 0 unless stated otherwise:
A(n,k) = A356874(floor(A003714(n)*2^(k-1))).
A(n,1) = A005206(n).
A(n,2) = n.
A(n,k+2) = A(n,k) + A(n,k+1).
A(A022342(n+1),k) = A(n,k+1).
For k >= 4, A(n,k) = A135090(n,A000045(k-2)).
Showing 1-7 of 7 results.