login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A236076 A skewed version of triangular array A122075. 1
1, 0, 2, 0, 1, 3, 0, 0, 3, 5, 0, 0, 1, 7, 8, 0, 0, 0, 4, 15, 13, 0, 0, 0, 1, 12, 30, 21, 0, 0, 0, 0, 5, 31, 58, 34, 0, 0, 0, 0, 1, 18, 73, 109, 55, 0, 0, 0, 0, 0, 6, 54, 162, 201, 89, 0, 0, 0, 0, 0, 1, 25, 145, 344, 365, 144, 0, 0, 0, 0, 0, 0, 7, 85, 361 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Triangle T(n,k), 0 <= k <= n, read by rows, given by (0, 1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (2, -1/2, -1/2, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Subtriangle of the triangle A122950.
LINKS
FORMULA
G.f.: (1+x*y)/(1 - x*y - x^2*y - x^2*y^2).
T(n,k) = T(n-1,k-1) + T(n-2,k-1) + T(n-2,k-2), T(0,0)=1, T(1,0) = 0, T(1,1) = 2, T(n,k) = 0 if k < 0 or if k > n.
Sum_{k=0..n} T(n,k) = 2^n = A000079(n).
Sum_{n>=k} T(n,k) = A078057(k) = A001333(k+1).
T(n,n) = Fibonacci(n+2) = A000045(n+2).
T(n+1,n) = A023610(n-1), n >= 1.
T(n+2,n) = A129707(n).
EXAMPLE
Triangle begins:
1;
0, 2;
0, 1, 3;
0, 0, 3, 5;
0, 0, 1, 7, 8;
0, 0, 0, 4, 15, 13;
0, 0, 0, 1, 12, 30, 21;
0, 0, 0, 0, 5, 31, 58, 34;
MATHEMATICA
T[n_, k_]:= If[k<0 || k>n, 0, If[n==0 && k==0, 1, If[k==0, 0, If[n==1 && k==1, 2, T[n-1, k-1] + T[n-2, k-1] + T[n-2, k-2]]]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* G. C. Greubel, May 21 2019 *)
PROG
(Haskell)
a236076 n k = a236076_tabl !! n !! k
a236076_row n = a236076_tabl !! n
a236076_tabl = [1] : [0, 2] : f [1] [0, 2] where
f us vs = ws : f vs ws where
ws = [0] ++ zipWith (+) (zipWith (+) ([0] ++ us) (us ++ [0])) vs
-- Reinhard Zumkeller, Jan 19 2014
(PARI)
{T(n, k) = if(k<0 || k>n, 0, if(n==0 && k==0, 1, if(k==0, 0, if(n==1 && k==1, 2, T(n-1, k-1) + T(n-2, k-1) + T(n-2, k-2) ))))}; \\ G. C. Greubel, May 21 2019
(Sage)
def T(n, k):
if (k<0 or k>n): return 0
elif (n==0 and k==0): return 1
elif (k==0): return 0
elif (n==1 and k==1): return 2
else: return T(n-1, k-1) + T(n-2, k-1) + T(n-2, k-2)
[[T(n, k) for k in (0..n)] for n in (0..10)] # G. C. Greubel, May 21 2019
CROSSREFS
Cf. variant: A055830, A122075, A122950, A208337.
Cf. A167704 (diagonal sums), A000079 (row sums).
Cf. A111006.
Sequence in context: A202502 A219839 A154312 * A364021 A363899 A119900
KEYWORD
easy,nonn,tabl
AUTHOR
Philippe Deléham, Jan 19 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 17:03 EDT 2024. Contains 374410 sequences. (Running on oeis4.)