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.

Previous Showing 11-20 of 21 results. Next

A153281 Triangle read by rows, A130321 * A127647. Also, number of subsets of [n+2] with consecutive integers that start at k.

Original entry on oeis.org

1, 2, 1, 4, 2, 2, 8, 4, 4, 3, 16, 8, 8, 6, 5, 32, 16, 16, 12, 10, 8, 64, 32, 32, 24, 20, 16, 13, 128, 64, 64, 48, 40, 32, 26, 21, 256, 128, 128, 96, 80, 64, 52, 42, 34, 512, 256, 256, 192, 160, 128, 104, 84, 68, 55
Offset: 0

Views

Author

Gary W. Adamson, Dec 23 2008

Keywords

Comments

Row sums = A008466(k-2): (1, 3, 8, 19, 43, 94, ...).
T(n,k) is the number of subsets of {1,...,n+2} that contain consecutive integers and that have k as the first integer in the first consecutive string. (See the example below.) Hence rows sums of T(n,k) give the number of subsets of {1,...,n+2} that contain consecutive integers. Also, T(n,k) = F(k)*2^(n+1-k), where F(k) is the k-th Fibonacci number, since there are F(k) subsets of {1,...,k-2} that contain no consecutive integers and there are 2^(n+1-k) subsets of {k+2,...,n+2}. [Dennis P. Walsh, Dec 21 2011]

Examples

			First few rows of the triangle:
    1;
    2,   1;
    4,   2,   2;
    8,   4,   4,   3;
   16,   8,   8,   6,   5;
   32,  16,  16,  12,  10,   8;
   64,  32,  32,  24,  20,  16,  13;
  128,  64,  64,  48,  40,  32,  26,  21;
  256, 128, 128,  96,  80,  64,  52,  42,  34;
  512, 256, 256, 192, 160, 128, 104,  84,  68,  55;
  ...
Row 4 = (16, 8, 8, 6, 5) = termwise products of (16, 8, 4, 2, 1) and (1, 1, 2, 3, 5).
For n=5 and k=3, T(5,3)=16 since there are 16 subsets of {1,2,3,4,5,6,7} containing consecutive integers with 3 as the first integer in the first consecutive string, namely,
  {1,3,4}, {1,3,4,5}, {1,3,4,6}, {1,3,4,7}, {1,3,4,5,6}, {1,3,4,5,7}, {1,3,4,6,7}, {1,3,4,5,6,7}, {3,4}, {3,4,5}, {3,4,6}, {3,4,7}, {3,4,5,6}, {3,4,5,7}, {3,4,6,7}, and {3,4,5,6,7}. [_Dennis P. Walsh_, Dec 21 2011]
		

Crossrefs

Programs

  • Maple
    with(combinat, fibonacci):
    seq(seq(2^(n+1-k)*fibonacci(k),k=1..(n+1)),n=0..10);
  • Mathematica
    Table[2^(n+1-k) Fibonacci[k],{n,0,10},{k,n+1}]//Flatten (* Harvey P. Dale, Apr 26 2020 *)

Formula

Triangle read by rows, A130321 * A127647. A130321 = an infinite lower triangular matrix with powers of 2: (A000079) in every column: (1, 2, 4, 8, ...).
A127647 = an infinite lower triangular matrix with the Fibonacci numbers, A000045 as the main diagonal and the rest zeros.
T(n,k)=2^(n+1-k)*F(k) where F(k) is the k-th Fibonacci number. [Dennis Walsh, Dec 21 2011]

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

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

A130328 Triangle of differences between powers of 2, read by rows.

Original entry on oeis.org

1, 3, 2, 7, 6, 4, 15, 14, 12, 8, 31, 30, 28, 24, 16, 63, 62, 60, 56, 48, 32, 127, 126, 124, 120, 112, 96, 64, 255, 254, 252, 248, 240, 224, 192, 128, 511, 510, 508, 504, 496, 480, 448, 384, 256
Offset: 0

Views

Author

Gary W. Adamson, May 24 2007

Keywords

Comments

A130321 * A059268 as infinite lower triangular matrices.
Row sums = A000337: (1, 5, 17, 49, 129, 321, ...). A130329 = A059268 * A130321.
From Alonso del Arte, Mar 13 2008: (Start)
Column 0 contains the Mersenne numbers A000225.
Column 1 is A000918.
An even perfect number (A000396) is found in the triangle by reference to its matching exponent for the Mersenne prime p (A000043) thus: go to row 2p - 1 and then column p - 1 (remembering that the first position is column 0).
Likewise divisors of multiply perfect numbers, if not the multiply perfect numbers themselves, can also be found in this triangle. (End)

Examples

			First few rows of the triangle are;
   1;
   3,  2;
   7,  6,  4;
  15, 14, 12,  8;
  31, 30, 28, 24, 16;
  63, 62, 60, 56, 48, 32;
  ...
a(5, 2) = 28 because 2^5 = 32, 2^2 = 4 and 32 - 4 = 28.
		

Crossrefs

Programs

  • Mathematica
    ColumnForm[Table[2^n - 2^k, {n, 15}, {k, 0, n - 1}], Center] (* Alonso del Arte, Mar 13 2008 *)

Formula

t(n, k) = 2^n - 2^k, where n is the row number and k is the column number, running from 0 to n - 1. (If k is allowed to reach n, then the triangle would have an extra diagonal filled with zeros) - Alonso del Arte, Mar 13 2008

Extensions

Better definition from Alonso del Arte, Mar 13 2008

A153036 Integer parts of the full Stern-Brocot tree.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Dec 22 2008

Keywords

Examples

			a(1): 1;
a(2..3): 1x0, 2;
a(4..7): 2x0, 1x1, 3;
a(8..15): 4x0, 2x1, 1x2, 4;
a(16..31): 8x0, 4x1, 2x2, 1x3, 5;
a(32..63): 16x0, 8x1, 4x2, 2x3, 1x4, 6;
a(64..127): 32x0, 16x1, 8x2, 4x3, 2x4, 1x5, 7;
a(128..255): 64x0, 32x1, 16x2, 8x3, 4x4, 2x5, 1x6, 8;
a(256..511): 128x0, 64x1, 32x2, 16x3, 8x4, 4x5, 2x6, 1x7, 9.
		

Crossrefs

Cf. A130321.
If every block of terms of length 2^k is reversed, we get A290256; other permutations within these blocks give A007814 and A272729-1.

Formula

a(n+1) = floor(A007305(n+2)/A047679(n)). [Corrected by Andrey Zabolotskiy, Jul 23 2020]
a(n) = if n=2^k-1 then k else Log2(n)-1-Log2(2^(Log2(n)+1)-(n+1)), where Log2=A000523.
From Andrey Zabolotskiy, Oct 07 2021: (Start)
Formulas discovered by Sequence Machine (and also essentially by Kevin Ryde):
a(n) = A090996(n) - A043545(n).
a(n) = A007814(A145342(n+1)). (End)

Extensions

a(0) = 0 added by Andrey Zabolotskiy, Jul 23 2020

A131606 Triangle read by rows: row n gives coefficients of the polynomial p(x, n) = Sum[Fibonacci[n]^i*x^(n - i), {i, 0, n}].

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 8, 4, 2, 1, 81, 27, 9, 3, 1, 3125, 625, 125, 25, 5, 1, 262144, 32768, 4096, 512, 64, 8, 1, 62748517, 4826809, 371293, 28561, 2197, 169, 13, 1, 37822859361, 1801088541, 85766121, 4084101, 194481, 9261, 441, 21, 1, 60716992766464
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, May 27 2008

Keywords

Comments

Row sums give A131612.

Examples

			Triangle begins:
{1},
{1, 1},
{1, 1, 1},
{8, 4, 2, 1},
{81, 27, 9, 3, 1},
{3125, 625, 125, 25, 5, 1},
{262144, 32768, 4096, 512, 64, 8, 1},
{62748517, 4826809, 371293, 28561, 2197, 169, 13, 1},
{37822859361, 1801088541, 85766121, 4084101, 194481, 9261, 441, 21, 1},
{60716992766464, 1785793904896, 52523350144, 1544804416, 45435424, 1336336, 39304, 1156, 34, 1},
{253295162119140625, 4605366583984375, 83733937890625, 1522435234375, 27680640625, 503284375, 9150625, 166375, 3025, 55, 1}
		

Crossrefs

Programs

  • Mathematica
    Clear[p, a] a[n_] = Fibonacci[n]; p[x, 0] = 1; p[x_, n_] := p[x, n] = Sum[a[n]^i*x^(n - i), {i, 0, n}]; Table[p[x, n], {n, 0, 10}]; a0 = Table[CoefficientList[p[x, n], x], {n, 0, 10}]; Flatten[a0] Table[Apply[Plus, CoefficientList[p[x, n], x]], {n, 0, 10}]

Extensions

Edited by N. J. A. Sloane, May 27 2008

A176572 Count the ones in the binary representation of the partitions of n; then add vertically yielding a triangular array T(n,k).

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 5, 1, 3, 3, 7, 1, 3, 4, 5, 11, 1, 4, 5, 7, 7, 15, 1, 4, 6, 8, 9, 11, 22, 1, 5, 7, 11, 10, 15, 15, 30, 1, 5, 9, 12, 13, 17, 19, 22, 42, 1, 6, 10, 16, 15, 22, 21, 29, 30, 56, 1, 6, 12, 18, 19, 25, 26, 32, 38, 42, 77, 1, 7, 14, 23, 22, 33, 29, 41, 42, 54, 56, 101, 1, 7, 16, 26, 28, 37, 37, 45, 52, 59, 70, 77, 135, 1, 8, 18, 32, 33, 47, 42, 58, 57, 74, 76, 98, 101
Offset: 1

Views

Author

Alford Arnold, Apr 22 2010

Keywords

Comments

Each partition of n is converted into a binary representation with n bits by concatenating binary strings formed from each of the parts p_1(n)+p_2(n)+p_3(n)+..., p_1(n)>=p_2(n)>=p_3(n), larger parts contributing the higher significant bits, the individual part p_i(n) represented by a 1 followed by p_i(n)-1 zeros.
These A000041(n) binary representations are stacked, and the total count of 1's in each column is the n-th row of the triangle.

Examples

			Consider the seven partitions of Five, 5=(10000), 41=(1000)(1), 32=(100)(10), 311=(100)(1)(1), 221=(10)(10)(1), 2111=(10)(1)(1)(1) and 11111=(1)(1)(1)(1)(1),
the corresponding seven concatenated binary representations are
 1 0 0 0 0
 1 0 0 0 1
 1 0 0 1 0
 1 0 0 1 1
 1 0 1 0 1
 1 0 1 1 1
 1 1 1 1 1
summing by column yields
7 1 3 4 5 the fifth row of the table.
Triangle begins:
  1;
  2,1;
  3,1,2;
  5,1,3,3;
  7,1,3,4,5;
 11,1,4,5,7,7;
 15,1,4,6,8,9,11;
 ...
		

Crossrefs

Cf. A006128 (row sums), A114994, A130321, A173871.

Programs

  • Maple
    A176572row := proc(n) L := array(1..n,[seq(0,i=1..n)]) ; for pi in combinat[partition](n) do p := sort(pi) ;       p2 := [] ; for i from 1 to nops(p) do p2 := [op(p2),op(convert(2^(op(i,p)-1),base,2))] ; end do: for i from 1 to n do L[i] := L[i]+ op(n-i+1,p2) ; end do: end do: L ; end proc:
    for n from 1 to 14 do A176572row(n) ; print(%) ; end do:
  • Python
    from sympy .utilities.iterables import ordered_partitions
    def A176572(row_n):
        p = [i for i in ordered_partitions(row_n)]
        A = [[j for k in i[::-1] for j in ([1]+[0]*(k-1))] for i in p]
        return [sum(A[i][j] for i in range(len(p))) for j in range(row_n)] # John Tyler Rascoe, Feb 24 2025

Formula

Sum_{k=0..n-1} 2^(n-k)*T(n,k) = A173871(n).

Extensions

Edited by John Tyler Rascoe, Feb 24 2025

A251634 Numerators of inverse Riordan triangle of Riordan triangle A029635. Riordan (1/(1-x), x/(1+2*x)). Triangle read by rows for 0 <= m <= n.

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 1, 3, -3, 1, 1, -5, 9, -5, 1, 1, 11, -23, 19, -7, 1, 1, -21, 57, -61, 33, -9, 1, 1, 43, -135, 179, -127, 51, -11, 1, 1, -85, 313, -493, 433, -229, 73, -13, 1, 1, 171, -711, 1299, -1359, 891, -375, 99, -15, 1, 1, -341, 1593, -3309, 4017, -3141, 1641, -573, 129, -17, 1
Offset: 0

Views

Author

Wolfdieter Lang, Jan 09 2015

Keywords

Comments

The denominators are given by 2*A130321(n,m).
The rational lower triangular matrix with entries R(n,m) = T(n,m)/(2*A130321(n,m)) = T(n,m)/2^(n-m+1) for n >= m >= 0 and 0 otherwise is the inverse of the Riordan matrix A029635.
R is the rational Riordan triangle (1/(2-x), x/(1+x)).
The numerator triangle T is the Riordan array (1/(1-x), x/(1+2*x)). From the o.g.f. of the column sequences of R and T(n,m) = 2^(n-m+1)*R(n,m).
Row sums of the rational triangle R are [1/2, seq(3/2^(n+1), for n >= 1)].
Row sums of the present triangle T give [repeat(1,2,)].
Alternating row sums of the rational triangle R give (-1)^n*A102900(n)/2^(n+1), n >= 0: 1/2, -1/4, 7/8, -25/16, 103/32, -409/64, 1639/128, -6553/256, 26215/512, ... .
Alternating row sums of the present triangle T give A084567.
The inverse of the T Riordan matrix is ((1-3*x)/(1-2*x), x/(1-2*x)) = A251636.
Equals A248810 when the first column (m = 0) of ones is removed. - Georg Fischer, Jul 26 2023

Examples

			The triangle T(n,m) begins:
  n\m  0    1    2     3     4     5    6    7    8   9 ...
  0:   1
  1:   1    1
  2:   1   -1    1
  3:   1    3   -3     1
  4:   1   -5    9    -5     1
  5:   1   11  -23    19    -7     1
  6:   1  -21   57   -61    33    -9    1
  7:   1   43 -135   179  -127    51  -11    1
  8:   1  -85  313  -493   433  -229   73  -13    1
  9:   1  171 -711  1299 -1359   891 -375   99  -15   1
  ...
The rational Riordan triangle R(n,m) begins:
  n\m  0      1      2      3     4    5  ...
  0:  1/2
  1:  1/4    1/2
  2:  1/8   -1/4    1/2
  3:  1/16   3/8   -3/4    1/2
  4:  1/32  -5/16   9/8   -5/4   1/2
  5:  1/64  11/3  -23/1   19/8  -7/4  1/2
  ...
For more rows see the link.
		

Crossrefs

Programs

  • Maple
    A251634 := proc(n, k) local S; S := proc(n, k) option remember; `if`(k = 0, 1,
    `if`(k > n, 0, S(n-1, k-1)/k - 2*S(n-1, k))) end: k!*S(n, k) end:
    seq(seq(A251634(n, k), k=0..n)), n=0..9); # Peter Luschny, Jan 19 2020

Formula

O.g.f. of the row polynomials P(n,x) = Sum_{m=0..n} R(n,m)*x^m of the rational triangle R: G(z,x) = Sum_{n>=0} P(n,x)*z^n = (1+z)/((2-z)*(1+(1-x)*z)).
O.g.f. column m of the rational triangle R: (1/(2-x))*(x/(1+x))^m, m >= 0 (Riordan property of R).
O.g.f. column m of the numerator triangle T: (1/(1-x))*(x/(1+2*x))^m, m >= 0. (Riordan property of T).
T(n, k) = k!*S(n, k) where S(n, k) is recursively defined by:
if k = 0 then 1 else if k > n then 0 else S(n-1, k-1)/k - 2*S(n-1, k). - Peter Luschny, Jan 19 2020

A140303 Triangle T(n,k) = 3^(n-k) read by rows.

Original entry on oeis.org

1, 3, 1, 9, 3, 1, 27, 9, 3, 1, 81, 27, 9, 3, 1, 243, 81, 27, 9, 3, 1, 729, 243, 81, 27, 9, 3, 1, 2187, 729, 243, 81, 27, 9, 3, 1, 6561, 2187, 729, 243, 81, 27, 9, 3, 1, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3, 1, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3, 1
Offset: 0

Views

Author

Roger L. Bagula and Gary W. Adamson, May 27 2008

Keywords

Comments

Row sums are: 1, 4, 13, 40, 121, 364, .. A003462(n+1).

Examples

			1;
3, 1;
9, 3, 1;
27, 9, 3, 1;
81, 27, 9, 3, 1;
243, 81, 27, 9, 3, 1;
729, 243, 81, 27, 9, 3, 1;
2187, 729, 243, 81, 27, 9, 3, 1;
6561, 2187, 729, 243, 81, 27, 9, 3, 1;
19683, 6561, 2187, 729, 243, 81, 27, 9, 3, 1;
59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3, 1;
		

References

  • Advanced Number Theory, Harvey Cohn, Dover Books, 1963, Page 232

Crossrefs

Cf. A130321.

Programs

  • Mathematica
    Clear[p, a] a = 3; p[x, 0] = 1; p[x_, n_] := p[x, n] = Sum[a^i*x^(n - i), {i, 0, n}]; Table[p[x, n], {n, 0, 10}]; a0 = Table[CoefficientList[p[x, n], x], {n, 0, 10}]; Flatten[a0] Table[Apply[Plus, CoefficientList[p[x, n], x]], {n, 0, 10}]
    Table[3^(n-k),{n,15},{k,n}]//Flatten (* Harvey P. Dale, Nov 14 2021 *)

Formula

T(n,k) = A000244(n-k) . - R. J. Mathar, Sep 12 2013

A262616 Triangle read by rows: T(n,k) = 4^(n-k), n>=0, 0<=k<=n.

Original entry on oeis.org

1, 4, 1, 16, 4, 1, 64, 16, 4, 1, 256, 64, 16, 4, 1, 1024, 256, 64, 16, 4, 1, 4096, 1024, 256, 64, 16, 4, 1, 16384, 4096, 1024, 256, 64, 16, 4, 1, 65536, 16384, 4096, 1024, 256, 64, 16, 4, 1, 262144, 65536, 16384, 4096, 1024, 256, 64, 16, 4, 1, 1048576, 262144, 65536, 16384, 4096, 1024, 256, 64, 16, 4, 1
Offset: 0

Views

Author

Omar E. Pol, Nov 23 2015

Keywords

Comments

A triangle of the same family of A130321 and A140303, with the same offset.
T(n,k) is also the number of hidden crosses of size k+1 formed by squares and rectangles in the toothpick structure of A139250 after 2^(n+2) stages. The last term in every row represents the central cross of the toothpick structure.

Examples

			Triangle begins:
1;
4,       1;
16,      4,       1;
64,      16,      4,      1;
256,     64,      16,     4,     1;
1024,    256,     64,     16,    4,     1;
4096,    1024,    256,    64,    16,    4,    1;
16384,   4096,    1024,   256,   64,    16,   4,    1;
65536,   16384,   4096,   1024,  256,   64,   16,   4,   1;
262144,  65536,   16384,  4096,  1024,  256,  64,   16,  4,  1;
1048576, 262144,  65536,  16384, 4096,  1024, 256,  64,  16, 4,  1;
4194304, 1048576, 262144, 65536, 16384, 4096, 1024, 256, 64, 16, 4, 1;
...
		

Crossrefs

Column k gives A000302.
Row sums give the positive terms of A002450.
Alternating row sums give the positive terms of A015521.

Programs

  • Mathematica
    Table[4^(n - k), {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Jul 17 2016 *)

Formula

T(n,k) = A000302(n-k).
Previous Showing 11-20 of 21 results. Next