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!)
A106242 Same triangle as A106243, but with rows read in boustrophedon manner, i.e., in the order in which they were created. 3

%I #21 Jul 26 2017 03:15:29

%S 1,0,1,0,1,1,0,2,3,3,0,6,11,13,13,0,26,50,67,73,73,0,146,286,403,479,

%T 505,505,0,1010,1994,2876,3565,3997,4143,4143,0,8286,16426,23988,

%U 30429,35299,38303,39313,39313,0,78626,156242,229844,295572,349989,390403,415115,423401,423401

%N Same triangle as A106243, but with rows read in boustrophedon manner, i.e., in the order in which they were created.

%H Alois P. Heinz, <a href="/A106242/b106242.txt">Table of n, a(n) for n = 0..10010</a>

%p T:= proc(n, k) option remember;

%p local t;

%p if n<1 or k<1 then 0

%p elif n=1 and k=1 then 1

%p elif n=1 and irem(k, 2)=1 or k=1 and irem(n, 2)=0 then 0

%p else t:= 1-2*irem(n+k, 2);

%p T(n-t, k+t) + T(n, k-1)+T(n-1, k)

%p fi

%p end:

%p seq (`if` (irem(d, 2)=1,

%p seq (T(d-k, k), k=1..d-1),

%p seq (T(n, d-n), n=1..d-1)), d=2..11); # _Alois P. Heinz_, Feb 08 2011

%t T[n_, k_] := T[n, k] = Module[{t}, Which[n<1 || k<1, 0, n == 1 && k == 1, 1, n == 1 && Mod[k, 2] == 1 || k == 1 && Mod[n, 2] == 0, 0, True, t = 1 - 2*Mod[n+k, 2]; T[n-t, k+t] + T[n, k-1] + T[n-1, k]]]; Table[If[Mod[d, 2] == 1, Table[T[d-k, k], {k, 1, d-1}], Table[T[n, d-n], {n, 1, d-1}]], {d, 2, 11}] // Flatten (* _Jean-François Alcover_, Jan 14 2014, translated from _Alois P. Heinz_'s Maple code *)

%Y Right-hand diagonal is A059294. Cf. A106243. Row sums give A106327.

%K nonn,tabl,easy

%O 0,8

%A _N. J. A. Sloane_, May 29 2005

%E More terms from _Alois P. Heinz_, Feb 08 2011

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 April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)