A382928 Start with {1, x}, then at each step replace it with the set of all pairwise products and sums of its elements (an element can be paired with itself). a(n) gives the number of elements after n-th step.
2, 6, 28, 436, 90385, 4017112742
Offset: 0
Examples
a(0) = 2 corresponding to 1 and x. a(1) = 6 since from 1 and x, we can reach 4 other polynomials namely: x^2, 2x, x+1 and 2.
Crossrefs
Cf. A352969.
Programs
-
Mathematica
s[0]={1,x}; s[n_]:=s[n]= Union[Expand/@ Flatten@ ({Plus@@#, Times@@#}& /@ Tuples[s[n-1],2])]; a[n_]:=Length@ s@ n; a/@ Range[0,4] (* Giovanni Resta, Apr 10 2025 *)
-
PARI
lista(nn) = {my(v = [1, x]); print1(#v, ", "); for (n=1, nn, v = setunion(setbinop((x, y)->(x+y), v), setbinop((x, y)->(x*y), v)); print1(#v, ", "); ); } \\ Yifan Xie, Apr 09 2025
Extensions
a(5) from Bert Dobbelaere, Apr 11 2025
Comments