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

A189391 The minimum possible value for the apex of a triangle of numbers whose base consists of a permutation of the numbers 0 to n, and each number in a higher row is the sum of the two numbers directly below it.

Original entry on oeis.org

0, 1, 3, 8, 19, 44, 98, 216, 467, 1004, 2134, 4520, 9502, 19928, 41572, 86576, 179587, 372044, 768398, 1585416, 3263210, 6711176, 13775068, 28255568, 57863214, 118430584, 242061468, 494523536, 1009105372, 2058327344, 4194213448
Offset: 0

Views

Author

Nathaniel Johnston, Apr 20 2011

Keywords

Comments

This is the Riordan transform of A000217 (triangular numbers) with the Riordan matrix (of the Bell type) A053121 (inverse of the Chebyshev S Bell matrix). See the resulting formulae below. - Wolfdieter Lang, Feb 18 2017.
Conjecture: a(n) is also half the sum of the "cuts-resistance" (see A319416, A319420, A319421) of all binary vectors of length n (see Lenormand, page 4). - N. J. A. Sloane, Sep 20 2018

Examples

			For n = 4 consider the triangle:
....19
...8  11
..5  3  8
.4  1 2  6
3  1 0 2  4
This triangle has 19 at its apex and no other such triangle with the numbers 0 - 4 on its base has a smaller apex value, so a(4) = 19.
		

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); [0] cat Coefficients(R!((2*x+Sqrt(1-4*x^2)-1)/(2*(2*x-1)^2))); // G. C. Greubel, Aug 24 2018
  • Maple
    a:=proc(n)return add((2*n-4*k-1)*binomial(n,k),k=0..floor((n-1)/2)): end:
    seq(a(n),n=0..50);
  • Mathematica
    CoefficientList[Series[(2*x+Sqrt[1-4*x^2]-1) / (2*(2*x-1)^2), {x, 0, 20}], x] (* Vaclav Kotesovec, Mar 16 2014 *)
  • PARI
    A189391(n)=sum(i=0,(n-1)\2,(2*n-4*i-1)*binomial(n,i))  \\ M. F. Hasler, Jan 24 2012
    

Formula

If n even, a(n) = (n+1/2)*binomial(n,n/2) - 2^(n-1); if n odd, a(n) = ((n+1)/2)*binomial(n+1,(n+1)/2) - 2^(n-1). - N. J. A. Sloane, Nov 01 2018
a(n) = Sum_{k=0..floor((n-1)/2)} (2*n-4*k-1)*binomial(n,k).
G.f.: (2*x+sqrt(1-4*x^2)-1) / (2*(2*x-1)^2). - Alois P. Heinz, Feb 09 2012
a(n) ~ 2^n * (sqrt(2n/Pi)- 1/2). - Vaclav Kotesovec, Mar 16 2014 (formula simplified by Lewis Chen, May 25 2017)
D-finite with recurrence n*a(n) + (n-5)*a(n-1) + 2*(-5*n+6)*a(n-2) + 4*(-n+8)*a(n-3) + 24*(n-3)*a(n-4) = 0. - R. J. Mathar, Jan 04 2017
From Wolfdieter Lang, Feb 18 2017:(Start)
a(n) = Sum_{m=0..n} A053121(n, m)*A000217(m), n >= 0.
G.f.: c(x^2)*Tri(x*c(x^2)), with c and Tri the g.f. of A000108 and A000217, respectively. See the explicit form of the g.f. given above by Alois P. Heinz.
(End)
2*a(n) = A152548(n)-2^n. - R. J. Mathar, Jun 17 2021

A062684 Number of addition triangles with apex n (version 1).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 13, 18, 23, 29, 37, 46, 55, 68, 81, 96, 115, 135, 155, 183, 211, 241, 277, 317, 357, 407, 457, 513, 577, 645, 713, 799, 885, 977, 1079, 1191, 1305, 1438, 1571, 1717, 1875, 2048, 2221, 2423, 2625, 2840, 3077, 3333, 3589, 3876, 4163
Offset: 1

Views

Author

Naohiro Nomoto, Feb 11 2002

Keywords

Comments

An addition triangle has any set of positive numbers as base; other rows are formed by adding pairs of adjacent numbers.
Reversing the base counts as a different triangle.

Examples

			For n = 5:
    5       5
   2,3     3,2     5     5     5     5
  1,1,2   2,1,1   4,1   1,4   2,3   3,2   5
with seven different bases, so a(5) = 7.
		

Crossrefs

Cf. A028307, A066411, see A062896 for version 2.

Extensions

Extended and edited by John W. Layman, Feb 14 2002

A062896 Number of addition triangles with apex n (version 2).

Original entry on oeis.org

1, 2, 2, 4, 4, 7, 7, 12, 12, 18, 19, 27, 28, 39, 41, 54, 58, 74, 78, 99, 106, 129, 139, 168, 179, 214, 229, 268, 289, 335, 357, 414, 443, 504, 540, 612, 653, 737, 786, 878, 938, 1045, 1111, 1234, 1313, 1444, 1539, 1692, 1795, 1965, 2082, 2273, 2414
Offset: 1

Views

Author

Naohiro Nomoto, Feb 11 2002

Keywords

Comments

An addition triangle has any set of positive numbers as base; other rows are formed by adding pairs of adjacent numbers.
Reversing the base does not count as a different triangle.

Examples

			For n = 5:
    5
   2,3     5     5
  1,1,2   4,1   2,3   5.
with four different bases, so a(5) = 4.
		

Crossrefs

See A062684 for version 1 (counts reversals).
Equivalent sequences with restrictions on rows: A337765 (weakly increasing), A337766 (strongly increasing).
Equivalent sequence where n is the sum of all numbers in the triangle: A337787.

Extensions

Extended and edited by John W. Layman, Feb 14 2002

A189390 The maximum possible value for the apex of a triangle of numbers whose base consists of a permutation of the numbers 0 to n, and each number in a higher row is the sum of the two numbers directly below it.

Original entry on oeis.org

0, 1, 5, 16, 45, 116, 286, 680, 1581, 3604, 8106, 18008, 39650, 86568, 187804, 404944, 868989, 1856180, 3950194, 8376056, 17708310, 37329016, 78499620, 164682416, 344789970, 720430216, 1502768996, 3129355120, 6507087396, 13510929104
Offset: 0

Views

Author

Nathaniel Johnston, Apr 20 2011

Keywords

Comments

The maximal value is reached when the largest numbers are placed in the middle and the smallest numbers at the border of the first row, i.e., [0,2,...,n,...,3,1]. Since the value of the apex is given as sum(c_k binomial(n,k)), one can compute this maximal value directly.

Examples

			For n = 4 consider the triangle:
         45
       21  24
      8  13  11
    2   6   7   4
  0   2   4   3   1
This triangle has 45 at its apex and no other such triangle with the numbers 0 through 4 on its base has a larger apex value, so a(4) = 45.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) return add((4*k+1)*binomial(n,k), k=0..floor((n-1)/2)) + `if`(n mod 2=0, n*binomial(n,n/2), 0):end:
    seq(a(n), n=0..50);
  • Mathematica
    a[n_] := Sum[(4k+1)*Binomial[n, k], {k, 0, Floor[(n-1)/2]}] + If[EvenQ[n], n*Binomial[n, n/2], 0]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 18 2017, translated from Maple *)
  • PARI
    A189390(n)=sum(i=0, (n-1)\2, (4*i+1)*binomial(n, i), if(!bittest(n,0),n*binomial(n, n\2)))  \\ - M. F. Hasler, Jan 24 2012
    
  • Python
    from math import comb
    def A189390(n): return sum(((k<<2)|1)*comb(n,k) for k in range(n+1>>1))+(0 if n&1 else n*comb(n,n>>1)) # Chai Wah Wu, Oct 28 2024

Formula

a(n) = Sum_{k=0..floor((n-1)/2)} (4*k+1)*C(n,k) + (n+1 mod 2)*n*C(n,n/2).
a(n) = n*2^n-A189391(n). - M. F. Hasler, Jan 24 2012
a(n) = Sum_{k=0..n} k * C(n,floor(k/2)) = Sum_{k=0..n} k*A107430(n,k). - Alois P. Heinz, Feb 02 2012
G.f.: (2*x-sqrt(1-4*x^2)+1) / (2*(2*x-1)^2). - Alois P. Heinz, Feb 09 2012
D-finite with recurrence n*a(n) -4*n*a(n-1) +12*a(n-2) +16*(n-3)*a(n-3) +16*(-n+3)*a(n-4)=0. - R. J. Mathar, Jul 28 2016
D-finite with recurrence n*(2*n-3)*a(n) +2*(-2*n^2-n+5)*a(n-1) +4*(-2*n^2+9*n-5)*a(n-2) +8*(2*n-1)*(n-2)*a(n-3)=0. - R. J. Mathar, Jul 28 2016
a(n) = Sum_{k=1..n} Sum_{i=1..k} C(n,floor((n-k)/2)+i). - Stefano Spezia, Aug 20 2019

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

Original entry on oeis.org

1, 3, 7, 16, 35, 76, 162, 344, 723, 1516, 3158, 6568, 13598, 28120, 57956, 119344, 245123, 503116, 1030542, 2109704, 4311786, 8808328, 17969372, 36644176, 74640430, 151985016, 309170332, 628741264, 1277540828, 2595198256
Offset: 0

Views

Author

Paul Barry, Oct 12 2004

Keywords

Comments

The g.f. is transformed to 1/(1-x)^3 under the Chebyshev transformation A(x)->1/(1+x^2)A(x/(1+x^2)). Second binomial transform of the sequence with g.f. 1/c(-x), where c(x) is the g.f. of the Catalan numbers A000108.
Image of 2n+1 under the Riordan array (1/sqrt(1-4x^2),xc(x^2)). Hankel transform is (n+1)*(-1)^n. - Paul Barry, Oct 06 2007
a(n) is the minimum possible value for the apex of a triangle of numbers whose base consists of a permutation of the numbers 1 to n+1, and each number in a higher row is the sum of the two numbers directly below it. - Nathaniel Johnston, Apr 20 2011

Crossrefs

Programs

  • Maple
    a:=proc(n)return 2^n+add((2*n-4*k-1)*binomial(n, k), k=0..floor((n-1)/2)): end:
    seq(a(n), n=0..30); # Nathaniel Johnston, Apr 20 2011
  • Mathematica
    CoefficientList[Series[(Sqrt[1+2*x]+Sqrt[1-2*x])/(2*(1-2*x)^(3/2)), {x, 0, 20}], x] (* Vaclav Kotesovec, Feb 13 2014 *)

Formula

a(n) = Sum_{k=0..n} (k+1)*binomial(n, (n-k)/2)*binomial(k+2, 2)*(1+(-1)^(n-k))/(n+k+2).
a(n) = 2^n + Sum_{k=0..floor((n-1)/2)} (2*n-4*k-1)*binomial(n, k). - Nathaniel Johnston, Apr 20 2011
a(n) = M^n*V topmost term. M = an infinite tridiagonal matrix with all 1's in the super and subdiagonals, [1,0,0,0,...] as the main diagonal; and the rest zeros. V = the vector [1,2,3,...]. - Gary W. Adamson, Jan 30 2012
D-finite with recurrence n*a(n) + 2*(-n-1)*a(n-1) + 4*(-n+3)*a(n-2) + 8*(n-2)*a(n-3) = 0. - R. J. Mathar, Nov 30 2012
a(n) ~ 2^(n+1/2)*sqrt(n)/sqrt(Pi) * (1 + sqrt(2*Pi/n)/4). - Vaclav Kotesovec, Feb 13 2014

A189162 The maximum possible value for the apex of a triangle of numbers whose base consists of a permutation of the numbers 1 to n, and each number in a higher row is the sum of the two numbers directly below it.

Original entry on oeis.org

1, 3, 9, 24, 61, 148, 350, 808, 1837, 4116, 9130, 20056, 43746, 94760, 204188, 437712, 934525, 1987252, 4212338, 8900344, 18756886, 39426168, 82693924, 173071024, 361567186, 753984648, 1569877860, 3263572848, 6775522852, 14047800016, 29091783096, 60175932320
Offset: 1

Views

Author

Nathaniel Johnston, Apr 20 2011

Keywords

Comments

The maximum is attained by the triangle with base 1, 3, 5, ..., 2*ceiling(n/2)-1, 2*floor(n/2), ..., 6, 4, 2 (i.e., odd numbers increasing, followed by even numbers decreasing).

Examples

			For n = 5 consider the triangle:
         61
       29  32
     12  17  15
    4   8   9   6
  1   3   5   4   2
This triangle has 61 at its apex and no other such triangle with the numbers 1 - 5 on its base has a larger apex value, so a(5) = 61.
		

Crossrefs

Programs

  • Maple
    a:=proc(n)return 2^(n-1) + add((4*k+1)*binomial(n-1,k),k=0..floor(n/2)-1) + `if`(n mod 2=1,(n-1)*binomial(n-1,(n-1)/2),0):end:
    seq(a(n),n=1..50);
  • Mathematica
    a[n_] := a[n] = Switch[n, 1, 1, 2, 3, 3, 9, 4, 24, _, (1/(n-1))*(4((4n-16)a[n-4] - (4n-16)a[n-3] - 3a[n-2] + (n-1)a[n-1]))];
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, May 09 2023, after R. J. Mathar *)

Formula

a(n) = 2^(n-1) + A189390(n-1).
D-finite with recurrence (-n+1)*a(n) +4*(n-1)*a(n-1) -12*a(n-2) +16*(-n+4)*a(n-3) +16*(n-4)*a(n-4)=0. - R. J. Mathar, Jun 17 2021
Showing 1-6 of 6 results.