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

A206603 Maximal apex value of an addition triangle whose base is a permutation of {k-n/2, k=0..n}.

Original entry on oeis.org

0, 0, 1, 4, 13, 36, 94, 232, 557, 1300, 2986, 6744, 15074, 33320, 73116, 159184, 344701, 742068, 1590898, 3395320, 7222550, 15308920, 32362276, 68213424, 143463378, 300999816, 630353764, 1317415792, 2748991012, 5726300880, 11911913912, 24742452128, 51331847709
Offset: 0

Views

Author

Alois P. Heinz, Feb 10 2012

Keywords

Comments

The base row of the addition triangle contains a permutation of the n+1 integers or half-integers {k-n/2, k=0..n}. Each number in a higher row is the sum of the two numbers directly below it. Rows above the base row contain only integers. The base row consists of integers iff n is even.
Because of symmetry, a(n) is also the absolute value of the minimal apex value of an addition triangle whose base is a permutation of {k-n/2, k=0..n}.
a(n) is odd iff n = 2^m and m > 0.

Examples

			a(3) =  4:   max:      4            min:    -4
                    1    3               -1   -3
                -1    2    1           1   -2   -1
            -3/2  1/2  3/2 -1/2    3/2 -1/2 -3/2  1/2
a(4) = 13:   max:     13            min:   -13
                     5  8                 -5 -8
                   0  5  3               0 -5 -3
                -2  2  3  0            2 -2 -3  0
              -2  0  2  1 -1         2  0 -2 -1  1
		

Crossrefs

Programs

  • Maple
    a:= n-> add (binomial(n, floor(k/2))*(k-n/2), k=0..n):
    seq (a(n), n=0..40);
    # second Maple program:
    a:= proc(n) option remember; `if`(n<3, n*(n-1)/2,
          ((2*n^2-6)*a(n-1) +4*(n-1)*(n-4)*a(n-2)
           -8*(n-1)*(n-2)*a(n-3)) / (n*(n-2)))
        end:
    seq(a(n), n=0..40); # Alois P. Heinz, Apr 25 2013
  • Mathematica
    a = DifferenceRoot[Function[{y, n}, {8(n+1)(n+2)y[n] - 4(n-1)(n+2)y[n+1] - (2n^2 + 12n + 12)y[n+2] + (n+1)(n+3)y[n+3] == 0, y[0] == 0, y[1] == 0, y[2] == 1, y[3] == 4}]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)
  • PARI
    a(n) = sum(k=0, n, binomial(n, k\2)*(k-n/2)); \\ Michel Marcus, Dec 20 2020
    
  • Python
    from math import comb
    def A206603(n): return sum(comb(n,k>>1)*((k<<1)-n) for k in range(n+1))>>1 # Chai Wah Wu, Oct 28 2024

Formula

a(n) = Sum_{k=0..n} C(n,floor(k/2)) * (k-n/2).
G.f.: (1-sqrt(1-4*x^2)) / (2*(2*x-1)^2).
a(n) = A189390(n)-A001787(n) = A001787(n)-A189391(n) = (A189390(n)-A189391(n))/2 = (A206604(n)-1)/2.

A206604 Number of integers in the smallest interval containing both minimal and maximal possible apex values of an addition triangle whose base is a permutation of n+1 consecutive integers.

Original entry on oeis.org

1, 1, 3, 9, 27, 73, 189, 465, 1115, 2601, 5973, 13489, 30149, 66641, 146233, 318369, 689403, 1484137, 3181797, 6790641, 14445101, 30617841, 64724553, 136426849, 286926757, 601999633, 1260707529, 2634831585, 5497982025, 11452601761, 23823827825, 49484904257
Offset: 0

Views

Author

Alois P. Heinz, Feb 10 2012

Keywords

Comments

For n>0 the base row of the addition triangle may contain a permutation of any set {b+k, k=0..n} where b is an integer or a half-integer. Each number in a higher row is the sum of the two numbers directly below it. Rows above the base row contain only integers.
a(n) = 3 (mod 4) if n = 2^m with m > 0 and a(n) = 1 (mod 4) else.

Examples

			a(3) =  9:   max:   20          min:   12
                  9   11             7   5
                3   6   5          5   2   3
             1/2 5/2 7/2 3/2    7/2 3/2 1/2 5/2
[12, 13, ..., 20] contains 20-12+1 = 9 integers.
a(4) = 27:   max:   13          min:  -13
                   5  8              -5 -8
                 0  5  3            0 -5 -3
              -2  2  3  0         2 -2 -3  0
            -2  0  2  1 -1      2  0 -2 -1  1
[-13, -12, ..., 13] contains 13-(-13)+1 = 27 integers.
		

Crossrefs

Programs

  • Maple
    a:= n-> 1 +add(binomial(n, floor(k/2))*(2*k-n), k=0..n):
    seq(a(n), n=0..40);
    # second Maple program
    a:= proc(n) option remember; `if`(n<3, 1+n*(n-1),
          (3*n^2-6*n+6+(2*n^2-6)*a(n-1)+4*(n-1)*(n-4)*a(n-2)
          -8*(n-1)*(n-2)*a(n-3)) / (n*(n-2)))
        end:
    seq(a(n), n=0..40); # Alois P. Heinz, Apr 25 2013
  • Mathematica
    a = DifferenceRoot[Function[{y, n}, {(-2n^2 - 12n - 12) y[n+2] - 3n^2 + 8(n+1)(n+2) y[n] - 4(n-1)(n+2) y[n+1] + (n+1)(n+3) y[n+3] - 12n - 15 == 0, y[0] == 1, y[1] == 1, y[2] == 3, y[3] == 9}]];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Dec 20 2020, after Alois P. Heinz *)
  • PARI
    a(n) = 1 + sum(k=0, n, binomial(n, k\2)*(2*k-n)); \\ Michel Marcus, Dec 20 2020
    
  • Python
    from math import comb
    def A206604(n): return sum(comb(n,k>>1)*((k<<1)-n) for k in range(n+1))+1 # Chai Wah Wu, Oct 28 2024

Formula

a(n) = 1 + Sum_{k=0..n} C(n,floor(k/2)) * (2*k-n).
G.f.: 1/(1-x) + (1-sqrt(1-4*x^2)) / (2*x-1)^2.
a(n) = 1 + 2*A206603(n).
a(n) = 1 + A189390(n)-A189391(n).
a(n) ~ n*2^n * (1-2*sqrt(2)/sqrt(Pi*n)). - Vaclav Kotesovec, Mar 15 2014

A281862 Riordan transform of the triangular number sequence A000217 with the Chebyshev S matrix A049310.

Original entry on oeis.org

0, 1, 3, 4, 1, -6, -11, -6, 9, 21, 14, -12, -34, -25, 15, 50, 39, -18, -69, -56, 21, 91, 76, -24, -116, -99, 27, 144, 125, -30, -175, -154, 33, 209, 186, -36, -246, -221, 39, 286, 259, -42, -329, -300, 45, 375
Offset: 0

Views

Author

Wolfdieter Lang, Feb 18 2017

Keywords

Comments

For the analogous sequence with the inverse S Riordan matrix A053121 see A189391.

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x (1 + x^2)/(1 - x + x^2)^3, {x, 0, 45}], x] (* Michael De Vlieger, Feb 18 2017 *)

Formula

a(n) = Sum_{m=0..n} A049310(n,m)*A000217(m), n >= 0.
a(n) = b(n-1) + b(n-3), n >= 0 with b(-3) = b(-2) = b(-1) = 0 and b(n) = A128504(n) for n >= 0.
G.f.: (1/(1+x^2))*Tri(x/(1+x^2)), with Tri(x) = x/(1-x)^3 (g.f. of A000217).
G.f. x*(1 + x^2)/(1 - x + x^2)^3.
Previous Showing 11-13 of 13 results.