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-10 of 11 results. Next

A055527 Shortest other leg of a Pythagorean triangle with n as length of a leg.

Original entry on oeis.org

4, 3, 12, 8, 24, 6, 12, 24, 60, 5, 84, 48, 8, 12, 144, 24, 180, 15, 20, 120, 264, 7, 60, 168, 36, 21, 420, 16, 480, 24, 44, 288, 12, 15, 684, 360, 52, 9, 840, 40, 924, 33, 24, 528, 1104, 14, 168, 120, 68, 39, 1404, 72, 48, 33, 76, 840, 1740, 11, 1860, 960, 16, 48, 72
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Comments

From Alex Ratushnyak, Mar 30 2014: (Start)
Least positive k such that n^2 + k^2 is a square.
For odd n, a(n) <= 4*triangular((n-1)/2), because n^2 + (4 * triangular((n-1)/2))^2 = ((n^2+1)/2) ^ 2, which is a perfect square since n is odd.
For n = 4*k+2, a(n) <= 8*triangular(k), because (4k+2)^2 + (4*k*(k+1))^2 = (4*k^2 + 4*k + 2)^2. (End)

Crossrefs

See A082183 for a similar sequence involving triangular numbers.

Programs

  • Mathematica
    Table[k = 1; While[! IntegerQ[Sqrt[n^2 + k^2]], k++]; k, {n, 3, 100}] (* T. D. Noe, Apr 02 2014 *)

Formula

a(n) = sqrt(A055526(n)^2-n^2) = 2*A054436/n.

A084921 a(n) = lcm(p-1, p+1) where p is the n-th prime.

Original entry on oeis.org

3, 4, 12, 24, 60, 84, 144, 180, 264, 420, 480, 684, 840, 924, 1104, 1404, 1740, 1860, 2244, 2520, 2664, 3120, 3444, 3960, 4704, 5100, 5304, 5724, 5940, 6384, 8064, 8580, 9384, 9660, 11100, 11400, 12324, 13284, 13944, 14964, 16020, 16380
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2003

Keywords

Comments

This sequence consists of terms of sequences A055523 and A055527 for prime n > 2. - Toni Lassila (tlassila(AT)cc.hut.fi), Feb 02 2004

Crossrefs

Programs

  • Haskell
    a084921 n = lcm (p - 1) (p + 1)  where p = a000040 n
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Magma
    [3] cat [(p^2-1)/2: p in PrimesInInterval(3,300)]; // G. C. Greubel, May 03 2024
    
  • Mathematica
    LCM[#-1,#+1]&/@Prime[Range[50]] (* Harvey P. Dale, Oct 09 2018 *)
  • PARI
    a(n)=if(n<2,3,(prime(n)^2-1)/2) \\ Charles R Greathouse IV, May 15 2013
    
  • SageMath
    [3]+[(n^2-1)/2 for n in prime_range(3,301)] # G. C. Greubel, May 03 2024

Formula

a(n) = A084920(n)/2 for n > 1.
a(n) = 3*A084922(n) for n > 2.
a(n) = A009286(A000040(n)). - Enrique Pérez Herrero, May 17 2012
a(n) ~ 0.5 n^2 log^2 n. - Charles R Greathouse IV, May 15 2013
Product_{n>=1} (1 + 1/a(n)) = 2. - Amiram Eldar, Jan 23 2021
a(n) = (A000040(n)^2 - 1) / 2 for n > 1. - Christian Krause, Mar 27 2021
a(n) = (3/2)*A024700(n-2), for n > 1. - G. C. Greubel, May 03 2024

A055524 Longest other side of a Pythagorean triangle with n as length of one of the three sides (in fact n is a leg and a(n) the hypotenuse).

Original entry on oeis.org

5, 5, 13, 10, 25, 17, 41, 26, 61, 37, 85, 50, 113, 65, 145, 82, 181, 101, 221, 122, 265, 145, 313, 170, 365, 197, 421, 226, 481, 257, 545, 290, 613, 325, 685, 362, 761, 401, 841, 442, 925, 485, 1013, 530, 1105, 577, 1201, 626, 1301, 677, 1405, 730, 1513, 785
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Crossrefs

Programs

  • Mathematica
    A055524[n_] := (3*n^2-(-1)^n*(n^2-2)+6)/8; Array[A055524, 100, 3] (* or *)
    LinearRecurrence[{0, 3, 0, -3, 0, 1}, {5, 5, 13, 10, 25, 17}, 100] (* Paolo Xausa, Feb 29 2024 *)
  • PARI
    Vec(-x^3*(2*x^5+x^4-5*x^3-2*x^2+5*x+5)/((x-1)^3*(x+1)^3) + O(x^100)) \\ Colin Barker, Sep 15 2014

Formula

a(n) = sqrt(n^2+A055523(n)^2). a(2k) = k^2+1, a(2k+1) = k^2+(k+1)^2.
a(n) = 3*a(n-2)-3*a(n-4)+a(n-6). G.f.: -x^3*(2*x^5+x^4-5*x^3-2*x^2+5*x+5) / ((x-1)^3*(x+1)^3). - Colin Barker, Sep 15 2014
a(n) = (3*n^2+6-(n^2-2)*(-1)^n)/8. - Luce ETIENNE, Jul 11 2015

A055525 Shortest other side of a Pythagorean triangle having n as length of one of the three sides.

Original entry on oeis.org

4, 3, 3, 8, 24, 6, 12, 6, 60, 5, 5, 48, 8, 12, 8, 24, 180, 12, 20, 120, 264, 7, 7, 10, 36, 21, 20, 16, 480, 24, 44, 16, 12, 15, 12, 360, 15, 9, 9, 40, 924, 33, 24, 528, 1104, 14, 168, 14, 24, 20, 28, 72, 33, 33, 76, 40, 1740, 11, 11, 960, 16, 48, 16, 88, 2244, 32, 92, 24
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{a, c, k = 1, n2 = n^2}, While[ If[ k > n, !IntegerQ[c = Sqrt[n2 + k^2]], !IntegerQ[c = Sqrt[n2 + k^2]] && !IntegerQ[a = Sqrt[n2 - k^2]]], k++; If[k == n, k++]]; If[ IntegerQ@ c, k, Sqrt[n2 - a^2]]]; (* Robert G. Wilson v, Feb 23 2024 *)

Formula

From Robert G. Wilson v, Feb 23 2024: (Start)
sqrt(2*(n-1)) < a(n) < n^2/2.
If n = k*m, then a(n) <= k*a(m). (End)

A055522 Largest area of a Pythagorean triangle with n as length of one of the three sides (in fact as a leg).

Original entry on oeis.org

6, 6, 30, 24, 84, 60, 180, 120, 330, 210, 546, 336, 840, 504, 1224, 720, 1710, 990, 2310, 1320, 3036, 1716, 3900, 2184, 4914, 2730, 6090, 3360, 7440, 4080, 8976, 4896, 10710, 5814, 12654, 6840, 14820, 7980, 17220, 9240, 19866, 10626, 22770, 12144, 25944
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Crossrefs

Programs

  • Maple
    seq(piecewise(n mod 2 = 0,n*(n^2-4)/8,n*(n^2-1)/4),n=3..60); # C. Ronaldo
  • Mathematica
    Table[n*(3*(n^2 - 2) - (n^2 + 2)*(-1)^n)/16, {n, 3, 50}] (* Wesley Ivan Hurt, Apr 27 2017 *)

Formula

a(n) = n*A055523(n)/2.
a(2k) = k*(k+1)*(k-1), a(2k+1) = k*(k+1)*(2k+1).
O.g.f.: 6*x^3*(x+1+x^2)/((1-x)^4*(1+x)^4). a(2k+1)=A055112(k). a(2k)=A007531(k+1). [R. J. Mathar, Aug 06 2008]
a(n) = n*(3*(n^2-2)-(n^2+2)*(-1)^n)/16. - Luce ETIENNE, Jul 17 2015

A055526 Shortest hypotenuse of a Pythagorean triangle with n as length of a leg.

Original entry on oeis.org

5, 5, 13, 10, 25, 10, 15, 26, 61, 13, 85, 50, 17, 20, 145, 30, 181, 25, 29, 122, 265, 25, 65, 170, 45, 35, 421, 34, 481, 40, 55, 290, 37, 39, 685, 362, 65, 41, 841, 58, 925, 55, 51, 530, 1105, 50, 175, 130, 85, 65, 1405, 90, 73, 65, 95, 842, 1741, 61, 1861, 962, 65
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Comments

Smallest k>n such that the squarefree part of k+n equals the squarefree part of k-n - Benoit Cloitre, May 26 2002

Crossrefs

Programs

  • Mathematica
    core[n_] := core[n] = Times @@ Map[#[[1]]^Mod[#[[2]], 2] &, FactorInteger[n]];
    A055526[n_] := Block[{k = n}, While[core[++k+n] != core[k-n]]; k];
    Array[A055526, 100, 3] (* Paolo Xausa, Feb 29 2024 *)
  • PARI
    for(n=3,105,s=n+1; while(abs(core(s+n)-core(s-n))>0,s++); print1(s,","))

Formula

a(n) = sqrt(n^2+A055527(n)^2).

A054435 Smallest area of a Pythagorean triangle with n as length of one of the three sides.

Original entry on oeis.org

6, 6, 6, 24, 84, 24, 54, 24, 330, 30, 30, 336, 54, 96, 60, 216, 1710, 96, 210, 1320, 3036, 84, 84, 120, 486, 294, 210, 216, 7440, 384, 726, 240, 210, 270, 210, 6840, 270, 180, 180, 840, 19866, 726, 486, 12144, 25944, 336, 4116, 336, 540, 480, 630, 1944, 726
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Crossrefs

A054436 Smallest area of a Pythagorean triangle with n as length of a leg.

Original entry on oeis.org

6, 6, 30, 24, 84, 24, 54, 120, 330, 30, 546, 336, 60, 96, 1224, 216, 1710, 150, 210, 1320, 3036, 84, 750, 2184, 486, 294, 6090, 240, 7440, 384, 726, 4896, 210, 270, 12654, 6840, 1014, 180, 17220, 840, 19866, 726, 540, 12144, 25944, 336, 4116, 3000, 1734, 1014
Offset: 3

Views

Author

Henry Bottomley, May 22 2000

Keywords

Crossrefs

Programs

  • Maple
    readlib(issqr): for a from 3 to 80 do for b from 1 by 1 while not issqr(a^2+b^2) do od: printf("%d, ",a*b/2) od: # C. Ronaldo
  • Mathematica
    a[n_] := For[k = 1, True, k++, If[IntegerQ[Sqrt[n^2+k^2]], Return[n k/2]]];
    a /@ Range[3, 100] (* Jean-François Alcover, Feb 14 2020 *)

Formula

a(n) = n*A055527(n)/2.

A216244 a(n) = (prime(n)^2 - 1)/2 for n >= 2.

Original entry on oeis.org

4, 12, 24, 60, 84, 144, 180, 264, 420, 480, 684, 840, 924, 1104, 1404, 1740, 1860, 2244, 2520, 2664, 3120, 3444, 3960, 4704, 5100, 5304, 5724, 5940, 6384, 8064, 8580, 9384, 9660, 11100, 11400, 12324, 13284, 13944, 14964, 16020, 16380, 18240, 18624, 19404, 19800
Offset: 2

Views

Author

Richard R. Forberg, May 28 2013

Keywords

Comments

Subsequence of A055523 restricted to the case of the other (shorter) leg of the triangle equal to a prime.
There is only one value of a(n) for each prime(n). (This is not necessarily true if the shorter leg is not a prime.)
Note that a(1) is nonexistent since there is no solution with prime = 2.
All terms are divisible by 4.
The values of m (the length of the hypotenuse) always equals a(n) + 1.
a(n) = (prime(n)^2 - 1)/2 for all n > 1.
This follows algebraically given m = a(n) + 1 (or vice versa).
The same two relationships apply when the shorter leg is an odd nonprime, but for only those results corresponding to the longest possible leg of the triangle.

Examples

			24^2 + 7^2 = 625 = 25^2 = (24 +1)^2  and a(4) = (prime(4)^2 -1)/2 = (49 - 1)/2 = 24.
		

Crossrefs

Subset of A055523.
Equals 4*A061066.
Equals A084921 excluding its first term.

Programs

Formula

a(n) = (prime(n)^2 - 1)/2 for n >= 2.
a(n) = 4*A061066(n) = A084920(n)/2.
a(n) = A084921(n) for n > 1.
a(n) = (prime(n)-1)*(prime(n)+1)/2 = lcm(prime(n)+1, prime(n)-1) for n > 1 because one of prime(n)+1 or prime(n)-1 is even and the other is divisible by 4. Say prime(n)-1 is divisible by 4; then (prime(n)+1)/2 and (prime(n)-1)/4 must be coprime. - Frank M Jackson, Dec 11 2018
Product_{n>=2} (1 + 1/a(n)) = 3/2. - Amiram Eldar, Jun 03 2022

Extensions

New name (taken from Formula entry) from Jon E. Schoenfield, Jul 11 2021

A056137 Number of ways in which n can be the longer leg (middle side) of an integer-sided right triangle.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 3, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 2, 0, 0, 0, 2, 0, 1, 0, 1, 2, 0, 0, 3, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 4, 0, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Crossrefs

Formula

a(n) = A046079(n) - A056138(n) = A046081(n) - A046080(n) - A056138(n).
Showing 1-10 of 11 results. Next