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!)
A291878 Triangle read by rows: T(n,k) = number of fountains of n coins and height k. 2
1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 2, 0, 1, 4, 0, 1, 7, 1, 0, 1, 12, 2, 0, 1, 20, 5, 0, 1, 33, 11, 0, 1, 54, 22, 1, 0, 1, 88, 44, 2, 0, 1, 143, 85, 5, 0, 1, 232, 161, 12, 0, 1, 376, 302, 25, 0, 1, 609, 559, 52, 1, 0, 1, 986, 1026, 105, 2, 0, 1, 1596, 1870, 207, 5, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
COMMENTS
Same as A187080, with trailing zeros omitted.
LINKS
EXAMPLE
T(6, 1) = 1;
. O O O O O O .
-------------------------------------------------------
T(6, 2) = 7;
.. O O ......... O O ..... O . O ..
. O O O O ... O O O O ... O O O O .
.......................................................
.. O ............. O ............. O ............. O ..
. O O O O O ... O O O O O ... O O O O O ... O O O O O .
-------------------------------------------------------
T(6, 3) = 1;
... O ...
.. O O ..
. O O O .
-------------------------------------------------------
First few rows are:
1;
0, 1;
0, 1;
0, 1, 1;
0, 1, 2;
0, 1, 4;
0, 1, 7, 1;
0, 1, 12, 2;
0, 1, 20, 5;
0, 1, 33, 11;
0, 1, 54, 22, 1;
0, 1, 88, 44, 2;
MAPLE
b:= proc(n, i, h) option remember; `if`(n=0, x^h,
add(b(n-j, j, max(h, j)), j=1..min(i+1, n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
seq(T(n), n=0..30); # Alois P. Heinz, Sep 05 2017
MATHEMATICA
b[n_, i_, h_] := b[n, i, h] = If[n == 0, x^h, Sum[b[n - j, j, Max[h, j]], {j, 1, Min[i + 1, n]}]];
T[n_] := Table[Coefficient[#, x, i], {i, 0, Exponent[#, x]}]& @ b[n, 0, 0];
Table[T[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, May 31 2019, after Alois P. Heinz *)
PROG
(Python)
from sympy.core.cache import cacheit
from sympy import Symbol, Poly, flatten
x=Symbol('x')
@cacheit
def b(n, i, h): return x**h if n==0 else sum([b(n - j, j, max(h, j)) for j in range(1, min(i + 1, n) + 1)])
def T(n): return 1 if n==0 else Poly(b(n, 0, 0)).all_coeffs()[::-1]
print(flatten(map(T, range(31)))) # Indranil Ghosh, Sep 06 2017
CROSSREFS
Row sums give A005169.
Columns 0-2 give A000007, A000012, A000071.
Sequence in context: A218581 A307177 A340264 * A131487 A230747 A308628
KEYWORD
nonn,tabf
AUTHOR
Seiichi Manyama, Sep 05 2017
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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)