cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A261897 Triangle read by rows: T(n,k) (1 <= k <= n+1) = number of sequences of length n, dominated by the squares, with entries from [0,k] and largest entry k.

This page as a plain text file.
%I A261897 #13 Sep 08 2015 02:24:47
%S A261897 1,1,1,0,2,1,0,2,3,1,0,2,5,4,1,0,0,7,9,5,1,0,0,7,16,14,6,1,0,0,7,23,
%T A261897 30,20,7,1,0,0,7,30,53,50,27,8,1,0,0,7,37,83,103,77,35,9,1,0,0,0,44,
%U A261897 120,186,180,112,44,10,1,0,0,0,44,164,306,366,292,156,54,11,1
%N A261897 Triangle read by rows: T(n,k) (1 <= k <= n+1) = number of sequences of length n, dominated by the squares, with entries from [0,k] and largest entry k.
%C A261897 A242105 gives the first nonzero terms per row, without repetitions. - _Reinhard Zumkeller_, Sep 06 2015
%H A261897 Reinhard Zumkeller, <a href="/A261897/b261897.txt">Rows n = 0..125 of triangle, flattened</a>
%H A261897 L. Haddad and C. Helou, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Helou/helou7.html">Finite Sequences Dominated by the Squares</a>, Journal of Integer Sequences, Volume 18, 2015, Issue 1, Article 15.1.8.
%e A261897 Triangle begins:
%e A261897 1,
%e A261897 1,1,
%e A261897 0,2,1,
%e A261897 0,2,3,1,
%e A261897 0,2,5,4,1,
%e A261897 0,0,7,9,5,1,
%e A261897 0,0,7,16,14,6,1,
%e A261897 0,0,7,23,30,20,7,1,
%e A261897 0,0,7,30,53,50,27,8,1,
%e A261897 0,0,7,37,83,103,77,35,9,1,
%e A261897 0,0,0,44,120,186,180,112,44,10,1,
%e A261897 0,0,0,44,164,306,366,292,156,54,11,1,
%e A261897 ...
%o A261897 (Haskell)
%o A261897 a261897 n k = a261897_tabl !! n !! (k-1)
%o A261897 a261897_row n = a261897_tabl !! n
%o A261897 a261897_tabl = [1] : f 1 0 [1] where
%o A261897    f t h xs | t <= (h + 1) ^ 2  = ys : f (t + 1) h ys
%o A261897             | otherwise         = ys' : f (t + 1) (h + 1) ys'
%o A261897             where ys = zipWith (+) ([0] ++ xs) (xs ++ [0])
%o A261897                   ys' = zipWith (+) ([0] ++ xs) (us ++ (0:vs) ++ [0])
%o A261897                   (us, _:vs) = splitAt h xs
%o A261897 -- _Reinhard Zumkeller_, Sep 06 2015
%Y A261897 Cf. A242105, A261930 (row sums).
%K A261897 nonn,tabl
%O A261897 0,5
%A A261897 _N. J. A. Sloane_, Sep 05 2015