Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A059216
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A059216 Variation of Boustrophedon transform applied to all-1's sequence. Fill an array by diagonals in alternating directions - 'up' and 'down'. The first element of each diagonal is 1. When 'going up', add to the previous element the elements of the row the new element is in. When 'going down', add to the previous element the elements of the column the new element is in. The final element of the n-th diagonal is a(n). +0
22
1, 2, 5, 14, 45, 169, 740, 3721, 21142, 133850, 933770, 7114115, 58758459, 522892624, 4987285553, 50751731950, 548839590949, 6285265061237, 75985249771496, 967047685739501, 12923640789599709, 180945893711983990, 2648725169100050894 (list; graph; listen)
OFFSET

1,2

LINKS

Index entries for sequences related to boustrophedon transform

EXAMPLE

The array begins

1 2 1 14 1 ...

1 3 10 15 ...

5 6 26 ...

1 37 ...

45 ...

MAPLE

To get the array used to produce this sequence:

aaa := proc(m, n) option remember; local i, j, r, s, t1; if m=0 and n=0 then RETURN(1); fi; if n = 0 and m mod 2 = 1 then RETURN(1); fi; if m = 0 and n mod 2 = 0 then RETURN(1); fi; s := m+n; if s mod 2 = 1 then t1 := aaa(m+1, n-1); for j from 0 to n-1 do t1 := t1+aaa(m, j); od: else t1 := aaa(m-1, n+1); for j from 0 to m-1 do t1 := t1+aaa(j, n); od: fi; RETURN(t1); end; # the n-th antidiagonal in the up direction is aaa(n, 0), aaa(n-1, 1), aaa(n-2, 2), ..., aaa(0, n)

To get the array formed when the transformation is applied to an arbitrary input sequence b = [b[1], b[2], ..., b[N]]:

aab := proc(b, N, m, n) local i, j, r, s, t1; option remember; if m>N or n>N then error "asking for too many terms"; fi; if m = 0 and n mod 2 = 0 then RETURN(b[n+1]) end if; if n = 0 and m mod 2 = 1 then RETURN(b[m+1]) end if; s := m + n; if s mod 2 = 1 then t1 := aab(b, N, m + 1, n - 1); for j from 0 to n - 1 do t1 := t1 + aab(b, N, m, j) end do else t1 := aab(b, N, m - 1, n + 1); for j from 0 to m - 1 do t1 := t1 + aab(b, N, j, n) end do end if; RETURN(t1) end proc;

To get the output sequence when the transformation is applied to an arbitrary input sequence b = [b[1], b[2], ..., b[N]]:

ff := proc(b) local N, t1, i; N := min(35, nops(b)); t1 := []; for i from 0 to N-1 do if i mod 2 = 0 then t1 := [op(t1), aab(b, N, i, 0)]; else t1 := [op(t1), aab(b, N, 0, i)]; fi; od: t1; end;

CROSSREFS

Cf. A000667, A059217, A059219, A059220, A059718.

Adjacent sequences: A059213 A059214 A059215 this_sequence A059217 A059218 A059219

Sequence in context: A030126 A081444 A119429 this_sequence A007823 A006391 A124527

KEYWORD

easy,nonn,nice

AUTHOR

Floor van Lamoen (fvlamoen(AT)hotmail.com), Jan 18 2001

EXTENSIONS

More terms from njas and Larry Reeves (larryr(AT)acm.org), Jan 23 2001

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 12 15:26 EDT 2008. Contains 144830 sequences.


AT&T Labs Research