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!)
A240199 Area under the path specified by n-th composition. 0
0, 1, 4, 3, 9, 8, 5, 6, 16, 15, 12, 13, 7, 8, 11, 10, 25, 24, 21, 22, 16, 17, 20, 19, 9, 10, 13, 12, 18, 17, 14, 15, 36, 35, 32, 33, 27, 28, 31, 30, 20, 21, 24, 23, 29, 28, 25, 26, 11, 12, 15, 14, 20, 19, 16, 17, 27, 26, 23, 24, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Compositions are in the order specified in A066099.
Path has run lengths given by the specified composition followed by its reversal.
Can be considered a table with row lengths A011782 (2^(n-1)).
Maximum in row n is n^2, for [n]; minimum is 2*n-1 for [1,n-1].
LINKS
EXAMPLE
Row 5 of A066099 is [2,1]. The path generated by [2,1,1,2] is:
__
|_
|
____|
The area under the path is 8, so a(5) = 8.
PROG
(PARI) A066099row(n) = {local(v=vector(n), j=0, k=0);
while(n>0, k++; if(n%2==1, v[j++]=k; k=0); n\=2);
vector(j, i, v[j-i+1])} \\ row n of A066099.
patharea(v) = {local(m=#v, n=sum(k=1, m, v[k]), w, r=0);
w=vector(2*m, k, if(k<=m, v[k], v[2*m+1-k]));
forstep(k=1, 2*m, 2, r+=w[k]*n; n-=w[k+1]);
r}
a(n) = patharea(A066099row(n)) \\ Franklin T. Adams-Watters, Apr 02 2014
CROSSREFS
Sequence in context: A365323 A263193 A094885 * A094728 A212001 A365904
KEYWORD
nonn,tabf
AUTHOR
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 April 19 13:40 EDT 2024. Contains 371792 sequences. (Running on oeis4.)