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!)
 A213629 In binary representation: T(n,k) = number of (possibly overlapping) occurrences of k in n, triangle read by rows, 1<=k<=n. 11
 1, 1, 1, 2, 0, 1, 1, 1, 0, 1, 2, 1, 0, 0, 1, 2, 1, 1, 0, 0, 1, 3, 0, 2, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 2, 1, 0, 1, 0, 0, 0, 0, 1, 2, 2, 0, 0, 1, 0, 0, 0, 0, 1, 3, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 2, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 3, 1, 1, 0, 1, 1, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS The definition is based on the definition of pattern functions in the paper of Allouche and Shallit; sum of n-th row = A029931(n); T(n,1) = A000120(n); T(n,2) = A033264(n) for n > 1; T(n,3) = A014081(n) for n > 2; T(n,4) = A056978(n) for n > 3; T(n,5) = A056979(n) for n > 4; T(n,6) = A056980(n) for n > 5; T(n,7) = A014082(n) for n > 6; T(n,k) = 0 for k with floor(n/2) < k < n; T(n,n) = 1; A122953(n) = sum (A057427(T(n,k): k=1..n); A005811(n) = T(n,1) + T(n,2) - T(n,3); A007302(n) = A000120(n) - sum (A213629(n,A136412(k))). LINKS Reinhard Zumkeller, Rows n = 1..150 of triangle, flattened J.-P. Allouche, J. Shallit, The Ring of k-regular Sequences II, Example 4, p. 12 EXAMPLE The triangle begins: .   1:                        1 .   2:                      1   1 .   3:                    2   0   1 .   4:                  1   1   0   1 .   5:                2   1   0   0   1 .   6:              2   1   1   0   0   1 .   7:            3   0   2   0   0   0   1 .   8:          1   1   0   1   0   0   0   1 .   9:        2   1   0   1   0   0   0   0   1 .  10:      2   2   0   0   1   0   0   0   0   1 .  11:    3   1   1   0   1   0   0   0   0   0   1 .  12:  2   1   1   1   0   1   0   0   0   0   0   1. MATHEMATICA t[n_, k_] := (idn = IntegerDigits[n, 2]; idk = IntegerDigits[k, 2]; ln = Length[idn]; lk = Length[idk]; For[cnt = 0; i = 1, i <= ln - lk + 1, i++, If[idn[[i ;; i + lk - 1]] == idk, cnt++]]; cnt); Table[t[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Oct 22 2012 *) PROG (Haskell) import Data.List (inits, tails, isPrefixOf) a213629 n k = a213629_tabl !! (n-1) !! (k-1) a213629_row n = a213629_tabl !! (n-1) a213629_tabl = map f \$ tail \$ inits \$ tail \$ map reverse a030308_tabf where    f xss = map (\xs ->            sum \$ map (fromEnum . (xs `isPrefixOf`)) \$ tails \$ last xss) xss CROSSREFS Cf. A030308, A007088. Sequence in context: A262696 A344986 A117165 * A278522 A024363 A050600 Adjacent sequences:  A213626 A213627 A213628 * A213630 A213631 A213632 KEYWORD nonn,base,tabl AUTHOR Reinhard Zumkeller, Jun 17 2012 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 September 23 08:23 EDT 2021. Contains 347610 sequences. (Running on oeis4.)