The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A180437 a(n) counts the distinct cubical (on alphabet of 3 symbols) billiard words with length n, acting as prefix to just k = 1 such words of length n+1 (that is, not "special"). 2
 0, 0, 0, 6, 24, 78, 186, 372, 876, 1632, 3024, 5310, 8496, 13344, 21186, 31878, 46752, 66936, 94800, 130194 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,4 COMMENTS By symmetry under reversal, a(n) also counts length n cubical billiard words acting as suffix to just k length n+1 cubical billiard words. The attached program counts k-special words for k = 1,...,m, where m = 3 denotes the size of the alphabet. Computation: Fred Lunnon for 0 <= n <= 19 (MAGMA). LINKS PROG (MAGMA) // langs[n][i] holds the i-th word of length n, encoded as a decimal number, // and excluding permutations; // as generated by program under A180239, using maxsym := 3 (instead of 4). bas := 10; // base = 10 or max(m+1) (global preset constant) // Reduce words in langs[n+2] mod 10, convert to multiset; // special[k][n] := number occurring k times. Increment by perms! m := 3; maxlen := 20; baspow := [10^(j-1) : j in [0+1..maxlen+1]]; special := [[0 : j in [0+1..maxlen+1]] : k in [1..m]]; // counts of words by speciality & length for n := 1 to maxlen do i := 0; while i lt #langs[n+1] do i +:= 1; word := Floor(langs[n+1][i] / bas); // count alphabet l := (n eq 1) select 0 else Max([Floor(word / baspow[j]) mod bas : j in [0+1..n-1]]); // count speciality k of prefix k := Max(m-l-1, 0); while i le #langs[n+1] and Floor(langs[n+1][i] / bas) eq word do i +:= 1; k +:= 1; end while; // count isomorphs special[k][n] +:= (l eq 0) select 1 else &*[m+1-j : j in [1..l]]; // total + m...(m-l+1) --- & fails if range empty! end while; end for; print m, n, special; // should sum to A180238 CROSSREFS Cf. A005598, A180238, A180239, A180438, A180439. Sequence in context: A225383 A257956 A080373 * A276179 A162583 A259662 Adjacent sequences:  A180434 A180435 A180436 * A180438 A180439 A180440 KEYWORD nonn,more AUTHOR Fred Lunnon, Sep 05 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 13 04:54 EDT 2020. Contains 336442 sequences. (Running on oeis4.)