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!)
A288006 Number of distinct fountains of n coins. 2
1, 1, 1, 2, 2, 4, 6, 10, 15, 27, 43, 75, 124, 216, 364, 634, 1081, 1879, 3229, 5609, 9680, 16809, 29077, 50482, 87452, 151811, 263201, 456871, 792468, 1375530, 2386580, 4142425, 7188332, 12476743, 21652780, 37582311, 65225643, 113210394, 196487131, 341036576 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
COMMENTS
We regard fountains as equivalent if one can be transformed into another by symmetries.
LINKS
FORMULA
a(n) = (A005169(n) + A288005(n)) / 2.
MAPLE
g:= proc(n, i) option remember; `if`(n=0, 1,
add(g(n-j, j), j=1..min(i+1, n)))
end:
b:= proc(n, i, p) option remember; `if`(n<0, 0, `if`(n=0,
`if`(p<0 and i=1, 1, 0), `if`(n=i or n=i+p, 1, 0)+
`if`(i<1 and p=1, 0, b(n-2*i, i, -p))+b(n-2*(i+p), i+p, -p)))
end:
a:= n-> (g(n, 0)+`if`(n=0, 1, b(n, 0, 1)))/2:
seq(a(n), n=0..60); # Alois P. Heinz, Sep 02 2017
MATHEMATICA
g[n_, i_] := g[n, i] = If[n == 0, 1,
Sum[g[n-j, j], {j, 1, Min[i+1, n]}]];
b[n_, i_, p_] := b[n, i, p] = If[n < 0, 0, If[n == 0,
If[p < 0 && i == 1, 1, 0], If[n == i || n == i+p, 1, 0] +
If[i < 1 && p == 1, 0, b[n - 2i, i, -p]] + b[n - 2(i+p), i+p, -p]]];
a[n_] := (g[n, 0] + If[n == 0, 1, b[n, 0, 1]])/2;
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Aug 01 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A034410 A192682 A050194 * A228807 A262258 A293633
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Sep 01 2017
EXTENSIONS
a(33)-a(39) from Alois P. Heinz, Sep 02 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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)