login
A206603
Maximal apex value of an addition triangle whose base is a permutation of {k-n/2, k=0..n}.
3
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,4
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.
LINKS
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.
EXAMPLE
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
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 10 2012
STATUS
approved