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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174294 Triangle T(n,k), read by rows, T(n,k) = (T(n-1,k-1) + T(n-2,k-1)) - (T(n-1,k) + T(n-2,k)), with T(n, 0) = T(n, k) = 1 and T(n, 1) = (n mod 2). 6
1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, -1, 0, 1, 1, 0, 0, 2, -2, 0, 1, 1, 1, 0, 0, 3, -3, 0, 1, 1, 0, 1, -2, 1, 4, -4, 0, 1, 1, 1, 0, 3, -6, 3, 5, -5, 0, 1, 1, 0, 0, 0, 6, -12, 6, 6, -6, 0, 1, 1, 1, 1, -3, 3, 9, -20, 10, 7, -7, 0, 1, 1, 0, 0, 4, -12, 12, 11, -30, 15, 8, -8, 0, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,25
LINKS
FORMULA
T(n,k) = (T(n-1,k-1) + T(n-2,k-1)) - (T(n-1,k) + T(n-2,k)), with T(n, 0) = T(n, k) = 1 and T(n, 1) = (n mod 2).
EXAMPLE
Table begins:
n\k|...0...1...2...3...4...5...6...7...8...9..10
---|--------------------------------------------
0..|...1
1..|...1...1
2..|...1...0...1
3..|...1...1...0...1
4..|...1...0...0...0...1
5..|...1...1...1..-1...0...1
6..|...1...0...0...2..-2...0...1
7..|...1...1...0...0...3..-3...0...1
8..|...1...0...1..-2...1...4..-4...0...1
9..|...1...1...0...3..-6...3...5..-5...0...1
10.|...1...0...0...0...6.-12...6...6..-6...0...1
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0 || k==n, 1, If[k==1, Mod[n, 2], T[n-1, k-1] +T[n-2, k-1] -T[n-1, k] -T[n-2, k] ]]];
Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten (* G. C. Greubel, Nov 25 2021 *)
PROG
(Sage)
@CachedFunction
def T(n, k): # A174294
if (k<0 or k>n): return 0
elif (k==0 or k==n): return 1
elif (k==1): return n%2
else: return T(n-1, k-1) + T(n-2, k-1) - T(n-1, k) - T(n-2, k)
flatten([[T(n, k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Nov 25 2021
CROSSREFS
Sequence in context: A110568 A088689 A076898 * A089385 A124407 A294624
KEYWORD
sign,tabl
AUTHOR
Mats Granvik, Mar 15 2010
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 December 3 22:01 EST 2023. Contains 367540 sequences. (Running on oeis4.)