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.

A307900 Number of functions constructed from n instances of variable x using operators + (add), * (multiply), and parentheses.

This page as a plain text file.
%I A307900 #32 May 06 2019 01:32:25
%S A307900 1,2,4,10,24,61,150,382,964,2452,6307,16379,42989,113965,305035,
%T A307900 823632,2241814,6145670,16956972,47059076,131279567
%N A307900 Number of functions constructed from n instances of variable x using operators + (add), * (multiply), and parentheses.
%C A307900 Structurally different expressions that represent the same function of x are only counted once. So, a(n) <= A052701(n).
%e A307900 For n = 1, we have only one function {x}, so a(1) = 1.
%e A307900 For n = 2, we have {x*x, x + x} = {x^2, 2*x}, so a(2) = 2.
%e A307900 For n = 3, we have {x^2*x, 2*x*x, x^2 + x, 2*x + x} = {x^3, 2*x^2, x^2 + x, 3*x}, so a(3) = 4.
%e A307900 For n = 4, we have {x^4, 2*x^3, x^3 + x^2, x^3 + x, 4*x^2, 3*x^2, 2*x^2 + x, 2*x^2, x^2 + 2*x, 4*x}, so a(4) = 10.
%p A307900 b:= proc(n) option remember; `if`(n=1, {x}, {seq(seq(seq([f+g,
%p A307900         expand(f*g)][], g=b(n-i)), f=b(i)), i=1..iquo(n, 2))})
%p A307900     end:
%p A307900 a:= n-> nops(b(n)):
%p A307900 seq(a(n), n=1..12);  # _Alois P. Heinz_, May 04 2019
%t A307900 ClearAll[a, f, x, n, k]; f[1] = {x}; f[n_Integer] := f[n] = DeleteDuplicates[Expand[Flatten[Table[Outer[#1[#2, #3] &, {Times, Plus}, f[k], f[n - k]], {k, n/2}]]]]; a[n_Integer] := Length[f[n]]; Table[a[n], {n, 15}]
%Y A307900 Cf. A048249, A052701.
%K A307900 nonn,more
%O A307900 1,2
%A A307900 _Vladimir Reshetnikov_, May 04 2019
%E A307900 a(19)-a(20) from _Alois P. Heinz_, May 04 2019
%E A307900 a(21) from _Vladimir Reshetnikov_, May 05 2019