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.

User: Jonathan Dushoff

Jonathan Dushoff's wiki page.

Jonathan Dushoff has authored 2 sequences.

A377851 Smallest multiplier which can complete the square for n-polygonal numbers, together with a constant offset.

Original entry on oeis.org

8, 1, 24, 8, 40, 3, 56, 16, 72, 5, 88, 24, 104, 7, 120, 32, 136, 9, 152, 40, 168, 11, 184, 48, 200, 13, 216, 56, 232, 15, 248, 64, 264, 17, 280, 72, 296, 19, 312, 80, 328, 21, 344, 88, 360, 23, 376, 96, 392, 25, 408, 104, 424, 27, 440, 112, 456, 29, 472
Offset: 3

Author

Jonathan Dushoff, Nov 09 2024

Keywords

Comments

This smallest multiplier is also the only multiplier that is relatively prime to the offset.
The n-polygonal numbers, indexed by x, are P(n,x) = (n-2)*(x-1)*x/2 + x = A139601(n-3,x).
S(x) = P(n,x)*a(n) + A181318(n-4) completes the square in that quadratic, ensuring S(x) is a square for all x.

Examples

			For n=7, the heptagonal numbers are h(x) = x*(5*x-3)/2 and with multiplier a(7) = 40 and offset A181318(7-4) = 9 become 40*h(x)+9 = (10*x - 3)^2.
		

Crossrefs

Cf. A181318 (offsets).

Programs

  • Mathematica
    Table[8*(n - 2)/GCD[n, 4]^2, {n, 3, 100}] (* Paolo Xausa, Dec 07 2024 *)
  • PARI
    a(n) = 8*(n-2)/gcd(n,4)^2 \\ Andrew Howroyd, Nov 10 2024

Formula

a(n) = 8*(n-2)/gcd(n,4)^2. - Andrew Howroyd, Nov 10 2024
From Stefano Spezia, Nov 13 2024: (Start)
G.f.: x^3*(8 + x + 24*x^2 + 8*x^3 + 24*x^4 + x^5 + 8*x^6)/(1 - x^4)^2.
E.g.f.: (4 + 32*x + 6*cos(x) + 2*(16*x - 5)*cosh(x) + 3*x*sin(x) + (5*x - 64)*sinh(x))/4. (End)

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

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 ^).