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.

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.

Original entry on oeis.org

2, 6, 28, 436, 90385, 4017112742
Offset: 0

Views

Author

Bryle Morga, Apr 09 2025

Keywords

Comments

a(n) is the cardinality of s(n) where s(0) = {1, x} and s(n) contains a+b, a*b and a for every a and b in s(n-1).
Related to A352969 which has {1} as the starting set as opposed to {1, x}.

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