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

A055248 Triangle of partial row sums of triangle A007318(n,m) (Pascal's triangle). Triangle A008949 read backwards. Riordan (1/(1-2x), x/(1-x)).

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 4, 1, 16, 15, 11, 5, 1, 32, 31, 26, 16, 6, 1, 64, 63, 57, 42, 22, 7, 1, 128, 127, 120, 99, 64, 29, 8, 1, 256, 255, 247, 219, 163, 93, 37, 9, 1, 512, 511, 502, 466, 382, 256, 130, 46, 10, 1, 1024, 1023, 1013, 968, 848, 638, 386, 176, 56, 11, 1
Offset: 0

Views

Author

Wolfdieter Lang, May 26 2000

Keywords

Comments

In the language of the Shapiro et al. reference (also given in A053121) such a lower triangular (ordinary) convolution array, considered as matrix, belongs to the Riordan-group. The g.f. for the row polynomials p(n,x) (increasing powers of x) is 1/((1-2*z)*(1-x*z/(1-z))).
Binomial transform of the all 1's triangle: as a Riordan array, it factors to give (1/(1-x),x/(1-x))(1/(1-x),x). Viewed as a number square read by antidiagonals, it has T(n,k) = Sum_{j=0..n} binomial(n+k,n-j) and is then the binomial transform of the Whitney square A004070. - Paul Barry, Feb 03 2005
Riordan array (1/(1-2x), x/(1-x)). Antidiagonal sums are A027934(n+1), n >= 0. - Paul Barry, Jan 30 2005; edited by Wolfdieter Lang, Jan 09 2015
Eigensequence of the triangle = A005493: (1, 3, 10, 37, 151, 674, ...); row sums of triangles A011971 and A159573. - Gary W. Adamson, Apr 16 2009
Read as a square array, this is the generalized Riordan array ( 1/(1 - 2*x), 1/(1 - x) ) as defined in the Bala link (p. 5), which factorizes as ( 1/(1 - x), x/(1 - x) )*( 1/(1 - x), x )*( 1, 1 + x ) = P*U*transpose(P), where P denotes Pascal's triangle, A007318, and U is the lower unit triangular array with 1's on or below the main diagonal. - Peter Bala, Jan 13 2016

Examples

			The triangle a(n,m) begins:
n\m    0    1    2   3   4   5   6   7  8  9 10 ...
0:     1
1:     2    1
2:     4    3    1
3:     8    7    4   1
4:    16   15   11   5   1
5:    32   31   26  16   6   1
6:    64   63   57  42  22   7   1
7:   128  127  120  99  64  29   8   1
8:   256  255  247 219 163  93  37   9  1
9:   512  511  502 466 382 256 130  46 10  1
10: 1024 1023 1013 968 848 638 386 176 56 11  1
... Reformatted. - _Wolfdieter Lang_, Jan 09 2015
Fourth row polynomial (n=3): p(3,x)= 8 + 7*x + 4*x^2 + x^3.
The matrix inverse starts
   1;
  -2,   1;
   2,  -3,   1;
  -2,   5,  -4,    1;
   2,  -7,   9,   -5,    1;
  -2,   9, -16,   14,   -6,    1;
   2, -11,  25,-  30,   20,   -7,    1;
  -2,  13, -36,   55,  -50,   27,   -8,    1;
   2, -15,  49,  -91,  105,  -77,   35,   -9,  1;
  -2,  17, -64,  140, -196,  182, -112,   44, -10,   1;
   2, -19,  81, -204,  336, -378,  294, -156,  54, -11, 1;
   ...
which may be related to A029653. - _R. J. Mathar_, Mar 29 2013
From _Peter Bala_, Dec 23 2014: (Start)
With the array M(k) as defined in the Formula section, the infinite product M(0)*M(1)*M(2)*... begins
/1      \ /1        \ /1       \       /1       \
|2 1     ||0 1       ||0 1      |      |2  1     |
|4 3 1   ||0 2 1     ||0 0 1    |... = |4  5 1   |
|8 7 4 1 ||0 4 3 1   ||0 0 2 1  |      |8 19 9 1 |
|...     ||0 8 7 4 1 ||0 0 4 3 1|      |...      |
|...     ||...       ||...      |      |         |
= A143494. (End)
Matrix factorization of square array as P*U*transpose(P):
/1      \ /1        \ /1 1 1 1 ...\    /1  1  1  1 ...\
|1 1     ||1 1       ||0 1 2 3 ... |   |2  3  4  5 ... |
|1 2 1   ||1 1 1     ||0 0 1 3 ... | = |4  7 11 16 ... |
|1 3 3 1 ||1 1 1 1   ||0 0 0 1 ... |   |8 15 26 42 ... |
|...     ||...       ||...         |   |...            |
- _Peter Bala_, Jan 13 2016
		

Crossrefs

Column sequences: A000079 (powers of 2, m=0), A000225 (m=1), A000295 (m=2), A002662 (m=3), A002663 (m=4), A002664 (m=5), A035038 (m=6), A035039 (m=7), A035040 (m=8), A035041 (m=9), A035042 (m=10).
Row sums: A001792(n) = A055249(n, 0).
Alternating row sums: A011782.
Cf. A011971, A159573. - Gary W. Adamson, Apr 16 2009

Programs

  • Haskell
    a055248 n k = a055248_tabl !! n !! k
    a055248_row n = a055248_tabl !! n
    a055248_tabl = map reverse a008949_tabl
    -- Reinhard Zumkeller, Jun 20 2015
  • Maple
    T := (n,k) -> 2^n - (1/2)*binomial(n, k-1)*hypergeom([1, n + 1], [n-k + 2], 1/2).
    seq(seq(simplify(T(n,k)), k=0..n),n=0..10); # Peter Luschny, Oct 10 2019
  • Mathematica
    a[n_, m_] := Sum[ Binomial[n, m + j], {j, 0, n}]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Jul 05 2013, after Paul Barry *)
    T[n_, k_] := Binomial[n, k] * Hypergeometric2F1[1, k - n, k + 1, -1];
    Flatten[Table[T[n, k], {n, 0, 7}, {k, 0, n}]]  (* Peter Luschny, Oct 06 2023 *)

Formula

a(n, m) = A008949(n, n-m), if n > m >= 0.
a(n, m) = Sum_{k=m..n} A007318(n, k) (partial row sums in columns m).
Column m recursion: a(n, m) = Sum_{j=m..n-1} a(j, m) + A007318(n, m) if n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: (1/(1-2*x))*(x/(1-x))^m, m >= 0.
a(n, m) = Sum_{j=0..n} binomial(n, m+j). - Paul Barry, Feb 03 2005
Inverse binomial transform (by columns) of A112626. - Ross La Haye, Dec 31 2006
T(2n,n) = A032443(n). - Philippe Deléham, Sep 16 2009
From Peter Bala, Dec 23 2014: (Start)
Exp(x) * e.g.f. for row n = e.g.f. for diagonal n. For example, for n = 3 we have exp(x)*(8 + 7*x + 4*x^2/2! + x^3/3!) = 8 + 15*x + 26*x^2/2! + 42*x^3/3! + 64*x^4/4! + .... The same property holds more generally for Riordan arrays of the form ( f(x), x/(1 - x) ).
Let M denote the present triangle. For k = 0,1,2,... define M(k) to be the lower unit triangular block array
/I_k 0\
\ 0 M/ having the k X k identity matrix I_k as the upper left block; in particular, M(0) = M. The infinite product M(0)*M(1)*M(2)*..., which is clearly well-defined, is equal to A143494 (but with a different offset). See the Example section. Cf. A106516. (End)
a(n,m) = Sum_{p=m..n} 2^(n-p)*binomial(p-1,m-1), n >= m >= 0, else 0. - Wolfdieter Lang, Jan 09 2015
T(n, k) = 2^n - (1/2)*binomial(n, k-1)*hypergeom([1, n+1], [n-k+2], 1/2). - Peter Luschny, Oct 10 2019
T(n, k) = binomial(n, k)*hypergeom([1, k - n], [k + 1], -1). - Peter Luschny, Oct 06 2023
n-th row polynomial R(n, x) = (2^n - x*(1 + x)^n)/(1 - x). These polynomials can be used to find series acceleration formulas for the constants log(2) and Pi. - Peter Bala, Mar 03 2025

A375572 Numbers occurring at least twice in Bernoulli's triangle A008949.

Original entry on oeis.org

1, 4, 7, 8, 11, 15, 16, 22, 26, 29, 31, 32, 37, 42, 46, 56, 57, 63, 64, 67, 79, 92, 93, 99, 106, 120, 121, 127, 128, 130, 137, 154, 163, 172, 176, 191, 211, 219, 232, 247, 254, 255, 256, 277, 299, 301, 326, 352, 378, 379, 382, 386, 407, 436, 466, 470, 497, 502
Offset: 1

Author

Pontus von Brömssen, Aug 19 2024

Keywords

Comments

Equivalently, 1 together with numbers occurring in columns k >= 2 of Bernoulli's triangle.

Crossrefs

Programs

  • PARI
    isok(k) = my(nb=0); for (i=0, k, nb += #select(x->(x==k), vector(i+1, j, sum(jj=0, j-1, binomial(i, jj))))); nb >= 2; \\ Michel Marcus, Aug 22 2024
    
  • PARI
    lista(nn) = my(v = vector(nn)); for (n=1, nn, my(w=vector(n+1, j, sum(jj=0, j-1, binomial(n, jj)))); for (i=1, #w, if (w[i] <= nn, v[w[i]]++));); Vec(select(x->(x>=2), v, 1)); \\ Michel Marcus, Aug 23 2024
    
  • Python
    from math import comb
    from bisect import insort
    def A375572_list(nmax):
        a_list = [1]
        if nmax == 1: return a_list
        nkb_list = [(2,2,4)] # List of triples (n,k,A008949(n,k)), sorted by the last element.
        while 1:
            b0 = nkb_list[0][2]
            a_list.append(b0)
            if len(a_list) == nmax: return a_list
            while 1:
                n,k,b = nkb_list[0]
                if b > b0: break
                del nkb_list[0]
                insort(nkb_list,(n+1,k,2*b-comb(n,k)),key=lambda x:x[2])
                if n == k:
                    insort(nkb_list,(n+1,k+1,2**(k+1)),key=lambda x:x[2])

A375570 Smallest m such that A008949(m,k) = n for some k.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 3, 3, 8, 9, 4, 11, 12, 13, 4, 4, 16, 17, 18, 19, 20, 6, 22, 23, 24, 5, 26, 27, 7, 29, 5, 5, 32, 33, 34, 35, 8, 37, 38, 39, 40, 6, 42, 43, 44, 9, 46, 47, 48, 49, 50, 51, 52, 53, 54, 10, 6, 57, 58, 59, 60, 61, 6, 6, 64, 65, 11, 67, 68, 69, 70
Offset: 1

Author

Pontus von Brömssen, Aug 19 2024

Keywords

Crossrefs

Formula

A008949(a(n),A375571(n)) = n.
a(n) <= n-1.
a(2^n) = n.
a(2^n-1) = n for n >= 2.

A375573 Numbers occurring at least three times in Bernoulli's triangle A008949.

Original entry on oeis.org

1, 16, 64, 232, 256, 466, 562, 1024, 1486, 2048, 4096, 15226, 16384, 44552, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296, 17179869184, 68719476736, 274877906944, 1099511627776, 4398046511104, 17592186044416, 70368744177664
Offset: 1

Author

Pontus von Brömssen, Aug 19 2024

Keywords

Comments

Equivalently, 1 together with numbers occurring at least three times in columns k >= 1 of Bernoulli's triangle.
Equivalently, 1 together with numbers occurring at least twice in columns k >= 2 of Bernoulli's triangle.
4^j is a term if j >= 0 and j != 1, because 4^j = A008949(2*j,2*j) = A008949(2*j+1,j) = A008949(4^j-1,1) for j >= 2 and A008949(i,0) = 1 for all i. Are 232, 466, 562, 1486, 2048, 15226, 44552 the only terms not of this form? There are no more such terms below 2^70.
Are 1 and 4096 = A008949(12,12) = A008949(13,6) = A008949(90,2) = A008949(4095,1) the only numbers that occur at least 4 times? There are no more such numbers below 2^70.

Crossrefs

A079284 Diagonal sums of triangle A008949.

Original entry on oeis.org

1, 1, 3, 4, 9, 13, 26, 39, 73, 112, 201, 313, 546, 859, 1469, 2328, 3925, 6253, 10434, 16687, 27633, 44320, 72977, 117297, 192322, 309619, 506037, 815656, 1329885, 2145541, 3491810, 5637351, 9161929, 14799280, 24026745, 38826025, 62983842, 101809867, 165055853, 266865720
Offset: 0

Author

Paul Barry, Feb 08 2003

Keywords

Comments

a(2n) - a(2n-1) = Fibonacci(2n+1).
Diagonal sums of triangle A054450. - Paul Barry, Oct 23 2004

Programs

  • Magma
    [Fibonacci(n+3)-2^Floor((n+1)/2): n in [0..40]]; // Vincenzo Librandi, Aug 05 2013
  • Maple
    with (combinat):a[0]:=0:a[1]:=1:a[2]:=1:for n from 2 to 50 do a[n]:=fibonacci(n-1)+2*a[n-2] od: seq(a[n], n=1..31); # Zerinvary Lajos, Mar 17 2008
  • Mathematica
    CoefficientList[Series[(1 - x^2) / ((1 - x - x^2) (1 - 2 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 05 2013 *)
    LinearRecurrence[{1,3,-2,-2},{1,1,3,4},40] (* Harvey P. Dale, Nov 30 2018 *)

Formula

a(n) = Sum_{j=0..floor(n/2)} Sum_{i=0..j} binomial(n-j, i).
a(n) = Fibonacci(n+3) - 2^floor((n+1)/2). - Vladeta Jovovic, Feb 12 2003
G.f.: (1-x^2)/((1-x-x^2)(1-2x^2)). - Paul Barry, Jan 13 2005

A171886 Numbers n such that A008949(n) is a power of 2.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 9, 10, 14, 15, 17, 20, 21, 27, 28, 29, 31, 35, 36, 44, 45, 49, 54, 55, 65, 66, 71, 77, 78, 90, 91, 97, 104, 105, 119, 120, 121, 127, 135, 136, 152, 153, 161, 170, 171, 189, 190, 199, 209, 210, 230, 231, 241, 252, 253, 275, 276, 279, 287, 299
Offset: 1

Author

Robert Munafo, Oct 16 2010

Keywords

Comments

Partial sums of binomial coefficients were considered in section 2.2 of the 1964 paper by Leech. The presence of the number 279 corresponds to the existence of the Golay perfect code of length 23.
In general, A000217(n+1)+i-1 is in this sequence IFF the first i items in row n of Pascal's triangle add up to a power of 2.
Almost all members of this sequence are "trivial" terms of four types: A000217(i); A000217(i)+1, A000217(i)+i, and A000217(2i+1)+i for all integers i. 279 is the sole nontrivial term.
The existence of members of this sequence is of course crucial in the study of the existence of perfect binary codes - see the references. - N. J. A. Sloane, Nov 24 2010
a(230) = 4097 is another nontrivial term, see example. - Reinhard Zumkeller, Aug 08 2013

Examples

			17 is in the sequence because A008949(17)=16, which in turn is because the first 3 elements of row 5 of Pascal's triangle, 1+5+10, add up to 16.
279 is in the sequence because the first 4 elements of row 24 of Pascal's triangle add up to 2^11: 1+23+253+1771=2048.
4097 is in the sequence because the first 3 elements of row 91 of Pascal's triangle add up to 2^12: 1 + 90 + 4005 = 4096. - _Reinhard Zumkeller_, Aug 08 2013
		

References

  • M. R. Best, Perfect codes hardly exist. IEEE Trans. Inform. Theory 29 (1983), no. 3, 349-351.
  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag.
  • John Leech, ``Some Sphere Packings in Higher Space'', Can. J. Math., 16 (1964), page 669.
  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1977.
  • A. Tietavainen, On the nonexistence of perfect codes over finite fields. SIAM J. Appl. Math. 24 (1973), 88-96.
  • J. H. van Lint, A survey of perfect codes. Rocky Mountain J. Math. 5 (1975), 199-224.
  • J. H. van Lint, Recent results on perfect codes and related topics, in Combinatorics (Proc. NATO Advanced Study Inst., Breukelen, 1974), pp. 158-178. Math. Centre Tracts, No. 55, Math. Centrum, Amsterdam, 1974.

Crossrefs

Cf. A008949.
Cf. A209229.

Programs

  • Haskell
    import Data.List (elemIndices)
    a171886 n = a171886_list !! (n-1)
    a171886_list = elemIndices 1 $ map a209229 $ concat a008949_tabl
    -- Reinhard Zumkeller, Aug 08 2013

Extensions

Edited by N. J. A. Sloane, Oct 18 2010
Offset changed by Reinhard Zumkeller, Aug 08 2013

A193603 Augmentation of the triangle A008949. See Comments.

Original entry on oeis.org

1, 1, 2, 1, 5, 8, 1, 9, 30, 44, 1, 14, 77, 212, 296, 1, 20, 163, 700, 1712, 2312, 1, 27, 305, 1877, 6882, 15476, 20384, 1, 35, 523, 4365, 22380, 73240, 154424, 199376, 1, 44, 840, 9134, 62479, 280630, 841312, 1683992, 2138336
Offset: 0

Author

Clark Kimberling, Jul 31 2011

Keywords

Comments

For an introduction to the unary operation "augmentation" as applied to triangular arrays or sequences of polynomials, see A193091. The right edge of the triangle A193603 is A111537.

Examples

			First five rows of A193603:
1
1...2
1...5....8
1...9...30....44
1...14...77..212...296
		

Crossrefs

Programs

  • Mathematica
    p[n_, k_] := Sum[Binomial[n, h], {h, 0, k}] (* A008949 *)
    Table[p[n, k], {n, 0, 5}, {k, 0, n}]
    m[n_] := Table[If[i <= j, p[n + 1 - i, j - i], 0], {i, n}, {j, n + 1}]
    TableForm[m[4]]
    w[0, 0] = 1; w[1, 0] = p[1, 0]; w[1, 1] = p[1, 1];
    v[0] = w[0, 0]; v[1] = {w[1, 0], w[1, 1]};
    v[n_] := v[n - 1].m[n]
    TableForm[Table[v[n], {n, 0, 6}]] (* A193603 *)
    Flatten[Table[v[n], {n, 0, 8}]]

A375571 a(n) is the unique integer k such that A008949(A375570(n),k) = n.

Original entry on oeis.org

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

Author

Pontus von Brömssen, Aug 19 2024

Keywords

Crossrefs

Formula

A008949(A375570(n),a(n)) = n.
a(2^n) = n.
a(2^n-1) = n-1.

A382816 a(n) = number of occurrences of n in A008949.

Original entry on oeis.org

1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 2

Author

Clark Kimberling, Apr 07 2025

Keywords

Comments

Numbers that occur exactly 2 times: (4, 7, 8, 11, 15, 22, 26, 29, 31, 32, 37, 42, 46, 56, 57, 63, 67, 79, 92, 93, 99, 106,...)
Numbers that occur exactly 3 times: (16, 64, 232, 256, 466, 562, 1024, 1486, 2048,...)
The least number that occurs exactly 4 times is 4096.

Examples

			The numbers in A008949 (partial sums of Pascal's triangle) begin thus:
  1
  1    2
  1    3     4
  1    4     7     8
  1    5    11    15    16
  1    6    16    26    31    32
  1    7    22    42    57    63    64
one 2, one 3, two 4's, etc.
		

Crossrefs

Programs

  • Mathematica
    t = Flatten[Accumulate/@Table[Binomial[n, i], {n, 0, 200}, {i, 0, n}]]; (* A008949 *)
    Flatten[Table[Count[t, n], {n, 2, 200}]]
  • PARI
    row(n) = my(v=vector(n+1, k, binomial(n,k-1))); vector(#v, k, sum(i=1, k, v[i]));
    a(n) = sum (i=1, n+1, #select(x->(x==n), row(i))); \\ Michel Marcus, Apr 13 2025

A376335 Irregular triangle read by rows: T(n,k) = A008949(n-1,k) if 0 <= k <= n - 2 otherwise A008949(n-1,2*n-4-k) if n - 2 <= k <= 2*n - 4.

Original entry on oeis.org

1, 1, 3, 1, 1, 4, 7, 4, 1, 1, 5, 11, 15, 11, 5, 1, 1, 6, 16, 26, 31, 26, 16, 6, 1, 1, 7, 22, 42, 57, 63, 57, 42, 22, 7, 1, 1, 8, 29, 64, 99, 120, 127, 120, 99, 64, 29, 8, 1, 1, 9, 37, 93, 163, 219, 247, 255, 247, 219, 163, 93, 37, 9, 1, 1, 10, 46, 130, 256, 382, 466, 502, 511, 502, 466, 382, 256, 130, 46, 10, 1
Offset: 2

Author

Stefano Spezia, Sep 20 2024

Keywords

Examples

			The triangle begins as:
  1;
  1, 3,  1;
  1, 4,  7,  4,  1;
  1, 5, 11, 15, 11,  5,  1;
  1, 6, 16, 26, 31, 26, 16,  6,  1;
  1, 7, 22, 42, 57, 63, 57, 42, 22, 7, 1;
  ...
		

Crossrefs

Programs

  • Mathematica
    b[n_,k_]:=Sum[Binomial[n,j],{j,0,k}]; T[n_,k_]:=If[0<=k<=n-2,b[n-1,k],b[n-1,2n-4-k]]; Table[T[n,k],{n,2,10},{k,0,2n-4}]//Flatten

Formula

Sum_{k=0..2*n-4} T(n,k) = A000337(n-1). [Udo et al.]
Showing 1-10 of 45 results. Next