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.

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

This page as a plain text file.
%I A206603 #30 Oct 28 2024 12:57:07
%S A206603 0,0,1,4,13,36,94,232,557,1300,2986,6744,15074,33320,73116,159184,
%T A206603 344701,742068,1590898,3395320,7222550,15308920,32362276,68213424,
%U A206603 143463378,300999816,630353764,1317415792,2748991012,5726300880,11911913912,24742452128,51331847709
%N A206603 Maximal apex value of an addition triangle whose base is a permutation of {k-n/2, k=0..n}.
%C A206603 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.
%C A206603 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}.
%C A206603 a(n) is odd iff n = 2^m and m > 0.
%H A206603 Alois P. Heinz, <a href="/A206603/b206603.txt">Table of n, a(n) for n = 0..1000</a>
%F A206603 a(n) = Sum_{k=0..n} C(n,floor(k/2)) * (k-n/2).
%F A206603 G.f.: (1-sqrt(1-4*x^2)) / (2*(2*x-1)^2).
%F A206603 a(n) = A189390(n)-A001787(n) = A001787(n)-A189391(n) = (A189390(n)-A189391(n))/2 = (A206604(n)-1)/2.
%e A206603 a(3) =  4:   max:      4            min:    -4
%e A206603                     1    3               -1   -3
%e A206603                 -1    2    1           1   -2   -1
%e A206603             -3/2  1/2  3/2 -1/2    3/2 -1/2 -3/2  1/2
%e A206603 a(4) = 13:   max:     13            min:   -13
%e A206603                      5  8                 -5 -8
%e A206603                    0  5  3               0 -5 -3
%e A206603                 -2  2  3  0            2 -2 -3  0
%e A206603               -2  0  2  1 -1         2  0 -2 -1  1
%p A206603 a:= n-> add (binomial(n, floor(k/2))*(k-n/2), k=0..n):
%p A206603 seq (a(n), n=0..40);
%p A206603 # second Maple program:
%p A206603 a:= proc(n) option remember; `if`(n<3, n*(n-1)/2,
%p A206603       ((2*n^2-6)*a(n-1) +4*(n-1)*(n-4)*a(n-2)
%p A206603        -8*(n-1)*(n-2)*a(n-3)) / (n*(n-2)))
%p A206603     end:
%p A206603 seq(a(n), n=0..40); # _Alois P. Heinz_, Apr 25 2013
%t A206603 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}]];
%t A206603 Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Dec 20 2020, after _Alois P. Heinz_ *)
%o A206603 (PARI) a(n) = sum(k=0, n, binomial(n, k\2)*(k-n/2)); \\ _Michel Marcus_, Dec 20 2020
%o A206603 (Python)
%o A206603 from math import comb
%o A206603 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
%Y A206603 Cf. A001787, A189390, A189391, A206604.
%K A206603 nonn
%O A206603 0,4
%A A206603 _Alois P. Heinz_, Feb 10 2012