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-4 of 4 results.

A182173 Number of inequivalent expressions involving n operands.

Original entry on oeis.org

2, 10, 94, 1466, 31814, 887650, 30259198, 1218864842, 56644903958, 2983300619410, 175598066553166, 11423394497044154, 813897286250604326, 63030237104398839490, 5271647928235911880222, 473558482553909252128298, 45473767604938843870986422, 4648336478135316689480390770
Offset: 1

Views

Author

David Radcliffe, Apr 16 2012

Keywords

Comments

Each operand must be used exactly once, and the only allowed operations are addition, subtraction, multiplication, division, and unary minus. Parentheses are permitted. This sequence differs from A140606 by allowing unary minus.

Examples

			When n=2, there are 10 inequivalent expressions: a+b, a-b, b-a, -a-b, a*b, -a*b, a/b, -a/b, b/a, -b/a.
		

Crossrefs

Cf. A140606.

Programs

  • PARI
    {a(n) = my(A,B=x +x*O(x^n),C=x +x*O(x^n)); for(i=1,n, B = 2*x + exp(C) - 1 - C; C = 2*x + 2*exp(B) - 2*exp(B/2) - B ); A = B + C - 2*x; n!*polcoeff(A,n)}
    for(n=1,20,print1(a(n),", ")) \\ Paul D. Hanna, Aug 12 2018 - After formula by Zhujun Zhang

Formula

From Zhujun Zhang, Aug 11 2018: (Start)
E.g.f: A(x) = B(x) + C(x) - 2*x, where B(x) = 2*x + exp(C(x)) - 1 - C(x) and C(x) = 2*x + 2*exp(B(x)) - 2*exp(B(x)/2) - B(x).
a(n) ~ (n/(e*b))^n * sqrt(b)*c/n where b=0.16142418303980816579438744831086877555003744810690... and c=1.8772213095052105788245813534431275116981368728916.... (End)

A131655 Maximal number of different numbers that can be formed from n numbers using addition, subtraction, multiplication and division, when each number is used no more than once in a given expression.

Original entry on oeis.org

1, 8, 89, 1482, 33737, 974860, 34078585, 1397335710, 65753020657, 3493075453208, 206827445591945, 13508998509463890, 965035059918868889, 74859785094041370724, 6267261735949374860857, 563289843479215734940710, 54100963704277853262416833
Offset: 1

Views

Author

Daniel Rainjonneau (d.rainjonneau(AT)wanadoo.fr), Sep 11 2007

Keywords

Comments

See triangle A133568: Each row gives the least sequence of n positive integers such that a(n) distinct numbers are generated by these operations. - Rick L. Shepherd, Sep 16 2007

Examples

			a(2) = 8 : from two variables x and y we obtain the eight functions x, y, x+y, x*y, x-y, y-x, x/y and y/x.
		

Crossrefs

Formula

a(n) = Sum_{i=1..n} binomial(n,i)*A140606(i). - Mikelis Emils Mikelsons, Sep 01 2021

Extensions

Definition corrected by Rick L. Shepherd, Sep 16 2007
a(5)-a(17) from Mikelis Emils Mikelsons, Sep 01 2021

A247982 Number of inequivalent expressions involving n operands, ignoring sign.

Original entry on oeis.org

1, 5, 47, 733, 15907, 443825, 15129599, 609432421, 28322451979, 1491650309705, 87799033276583, 5711697248522077, 406948643125302163, 31515118552199419745, 2635823964117955940111, 236779241276954626064149, 22736883802469421935493211
Offset: 1

Views

Author

Seiichi Azuma, Sep 28 2014

Keywords

Comments

Similar to A140606, but for example, (a-b)/(c-d) and (b-a)/(c-d) are also regarded as the same.

Crossrefs

Formula

a(n) = A182173(n)/2. - Zhujun Zhang, Aug 11 2018

Extensions

a(7)-a(17) from Muniru A Asiru, Aug 13 2018

A351922 Consider well-formed strings consisting of n operands, n - 1 binary operators +, -, *, /, ^, and n-1 pairs of parentheses, and call two such strings equivalent if they are algebraically identical; a(n) is the number of equivalence classes.

Original entry on oeis.org

1, 8, 146, 4294
Offset: 1

Views

Author

Jonathan Dushoff, Feb 25 2022

Keywords

Comments

E.g., a+b-c is considered equivalent to b-c+a; (a-b)/(c-d) to (b-a)/(d-c); and (a^b)^c to a^(b*c). Each algebraically equivalent possibility is counted once. Parentheses can be used freely.

Examples

			For n = 2 the a(2) = 8 expressions are a+b, a-b, b-a, a*b, a/b, b/a, a^b, b^a. b+a does not count because it is equivalent to a+b.
For n=3, the a(3)=146 expressions (as rendered canonically by fullratsimp/fortran in maxima) are: a*b-a*c; a*b-b*c; (a*b)/c; (a-b)*c; (a-b)^c; a*b*c; a*b-c; a*b^c; a-b*c; a-b^c; a/(b*c); a/b^c; a^(b*c); a^(b-c); a^(b/c); a^b*c; a^b-c; a^b/c; a^b^c; a^b*c^b; a^b/c^b; a*c+a*b; a*c-a*b; (a*c)/b; (a-c)^b; -a/(c-b); a*c+b; a*c-b; a*c^b; a-c^b; a/(c+b); a/(c-b); a/c^b; a^(c+b); a^(c-b); a^(c/b); a^c*b; a^c-b; a^c/b; a^c^b; (a*c+b)/a; (a*c-b)/a; -(a*c-b)/a; (a*c+b)/c; (a*c-b)/c; -(a*c-b)/c; a^c*b^c; a^c/b^c; (b+a)*c; (b+a)/c; (b+a)^c; (b-a)*c; (b-a)/c; (b-a)^c; -(b-a)/c; b+a^c; b-a*c; b-a^c; b/(a*c); b/a^c; b^(a*c); b^(a-c); b^(a/c); b^a*c; b^a-c; b^a/c; b^a^c; b^a*c^a; b^a/c^a; (b*c)/a; (b-c)^a; -b/(c-a); b*c+a; b*c-a; b*c^a; b-c^a; b/(c+a); b/(c-a); b/c^a; b^(c+a); b^(c-a); b^(c/a); b^c+a; b^c-a; b^c/a; b^c^a; (b*c+a)/b; (b*c-a)/b; -(b*c-a)/b; b*c+a*b; b*c-a*b; (b*c+a)/c; (b*c-a)/c; -(b*c-a)/c; b^c/a^c; (c+a)/b; (c+a)^b; (c-a)/b; (c-a)^b; -(c-a)/b; c+a*b; c+a^b; c-a*b; c-a^b; c/(a*b); c/a^b; c^(a*b); c^(a-b); c^(a/b); c^a+b; c^a-b; c^a/b; c^a^b; (c+a*b)/a; (c-a*b)/a; -(c-a*b)/a; c^a/b^a; (c+a*b)/b; (c-a*b)/b; -(c-a*b)/b; (-c)+b+a; (-c)+b-a; (-c)-b+a; (c+b)/a; (c+b)^a; (c-b)/a; (c-b)^a; -(c-b)/a; -c/(b-a); c+b+a; c+b-a; c+b^a; c-b+a; c-b-a; c-b^a; c/(b+a); c/(b-a); c/b^a; c^(b+a); c^(b-a); c^(b/a); c^b+a; c^b-a; c^b/a; c^b^a; c^b/a^b.
		

Crossrefs

Cf. A140606 (which does not allow ^).
Showing 1-4 of 4 results.