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.

Showing 1-3 of 3 results.

A353536 a(n) is the cardinality of the set S(n) obtained by the following process: Start with the set S(0) = {i}, where i is the imaginary unit. In step n, the set S(n) is the union of all Gaussian integers obtained by the m*(m+1)/2 sums and the m*(m+1)/2 products formed with the pairs of numbers in the Cartesian product S(n-1) x S(n-1) with m = card(S(n-1)).

Original entry on oeis.org

1, 2, 6, 34, 458, 41846, 169022181
Offset: 0

Views

Author

Hugo Pfoertner, Apr 26 2022

Keywords

Examples

			S(0) = {i}, a(0) = 1;
S(1) = {-1, 2*i}, a(1) = 2;
S(2) = {-4, -2, 1, -1+2*i, -2*i, 4*i}, a(2) = 6;
S(3) = {-16, -8, -6, -4, -3, -2, -1, 1, 2, 4, 8, 16, -8-4*i, -5+2*i, -4-2*i, -4+4*i, -3-4*i, -3+2*i, -2-2*i, -2+4*i, -1+2*i, -1+6*i, -16*i, -8*i, -4*i, -2*i, 2*i, 4*i, 8*i, 1-2*i, 1+4*i, 2-4*i, 4-8*i, 4+2*i}, a(3) = 34.
		

Crossrefs

Programs

  • PARI
    a353536(nmax) = {my(v=[I],m=#v); print1(m,", "); for(n=1,nmax, my(L=m*(m+1), w=vector(L), k=0); for(i=1,#v, for(j=i,#v, w[k++]=v[i]+v[j]; w[k++]=v[i]*v[j])); v=Set(w); m=#v; print1(m,", "))};
    a353536(5)

A353535 a(n) is the cardinality of the set S(n) obtained by the following process: Start with the set S(0) of a single monomial {x}. In step n, the set S(n) is the union of all polynomials obtained by the m*(m+1)/2 sums and the m*(m+1)/2 products formed with the pairs of polynomials in the Cartesian product S(n-1) x S(n-1) with m = card(S(n-1)).

Original entry on oeis.org

1, 2, 6, 38, 1078, 749674, 380157661301
Offset: 0

Views

Author

Hugo Pfoertner, Apr 22 2022

Keywords

Examples

			S(0) = {x}, a(0) = 1;
S(1) = {2*x, x^2}, a(1) = 2;
S(2) = {4*x, 2*x^2, 4*x^2, x^2 + 2*x, 2*x^3, x^4}, a(2) = 6;
S(3) = {8*x, 4*x^2, 6*x^2, 8*x^2, 16*x^2, 3*x^2 + 2*x, 5*x^2 + 2*x, 2*x^2 + 4*x, 4*x^2 + 4*x, x^2 + 6*x, 4*x^3, 8*x^3, 16*x^3, 2*x^3 + 2*x^2, 2*x^3 + 4*x^2, 4*x^3 + 8*x^2, 2*x^3 + x^2 + 2*x, 2*x^3 + 4*x, 2*x^4, 4*x^4, 8*x^4, 16*x^4, x^4 + 2*x^3, 2*x^4 + 4*x^3, 4*x^4 + 8*x^3, x^4 + 2*x^2, x^4 + 4*x^2, x^4 + 4*x^3 + 4*x^2, x^4 + x^2 + 2*x, x^4 + 4*x, 4*x^5, 8*x^5, 2*x^5 + 4*x^4, 2*x^6, 4*x^6, x^6 + 2*x^5, 2*x^7, x^8}, a(3) = 38, with 3 collapsing products 4*x^5, 4*x^6, 8*x^4 and 1 collapsing sum 2*x^2 + 4*x. m=6, 2*(7*6/2) - 3 - 1 = 38.
a(4) = 1078 is formed by 611 distinct polynomials from the sums and 487 distinct polynomials from the products. There are 20 polynomials in the intersection of the sum set and the product set: {32*x^3, 16*x^4, 24*x^4, 32*x^4, 12*x^4 + 8*x^3, 20*x^4 + 8*x^3, 8*x^4 + 16*x^3, 16*x^4 + 16*x^3, 4*x^4 + 24*x^3, 16*x^5, 8*x^5 + 8*x^4, 8*x^5 + 16*x^4, 8*x^5 + 4*x^4 + 8*x^3, 8*x^5 + 16*x^3, 8*x^6, 4*x^6 + 8*x^5, 4*x^6 + 8*x^4, 4*x^6 + 16*x^4, 4*x^6 + 4*x^4 + 8*x^3, 4*x^6 + 16*x^3}, thus 611 + 487 - 20 = 1078.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v = ['z]); print1(#v, ", "); for (n=1, nn, v = setunion(setbinop((x, y)->(x+y), v), setbinop((x, y)->(x*y), v)); print1(#v, ", "); ); } \\ after Michel Marcus in A352969
    lista(5)

Extensions

a(6) from Bert Dobbelaere, May 22 2025

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
Showing 1-3 of 3 results.