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

A171522 Denominator of 1/n^2-1/(n+2)^2.

Original entry on oeis.org

0, 9, 16, 225, 144, 1225, 576, 3969, 1600, 9801, 3600, 20449, 7056, 38025, 12544, 65025, 20736, 104329, 32400, 159201, 48400, 233289, 69696, 330625, 97344, 455625, 132496, 613089, 176400, 808201, 230400, 1046529, 295936, 1334025, 374544, 1677025, 467856
Offset: 0

Views

Author

Paul Curtz, Dec 11 2009

Keywords

Comments

This is the third column in the table of denominators of the hydrogenic spectra (the main diagonal A147560):
0, 0, 0, 0, 0, 0, 0, 0... A000004
1, 4, 9, 16, 25, 36, 49, 64... A000290
1, 36, 16, 100, 9, 196, 64, 324... A061038
1, 144, 225, 12, 441, 576, 81, 900... A061040
1, 400, 144, 784, 64,1296, 400,1936... A061042
1, 900 1225,1600,2025, 100,3025,3600... A061044
1,1764, 576, 324, 225,4356, 48,6084... A061046
1,3136,3969,4900,5929,7056,8281, 196... A061048.

Crossrefs

Cf. A105371. Bisections: A060300, A069075.

Programs

  • Maple
    A171522 := proc(n) if n = 0 then 0 else lcm(n+2,n) ; %^2 ; end if ; end:
    seq(A171522(n),n=0..70) ; # R. J. Mathar, Dec 15 2009
  • Mathematica
    a[n_] := If[EvenQ[n], (n*(n+2))^2/4, (n*(n+2))^2]; Table[a[n], {n, 0, 36}] (* Jean-François Alcover, Jun 13 2017 *)
  • PARI
    concat(0, Vec(x*(x^8+4*x^6+16*x^5+190*x^4+64*x^3+180*x^2+16*x+9) / ((x-1)^5*-(x+1)^5) + O(x^100))) \\ Colin Barker, Nov 05 2014

Formula

a(n) = (A066830(n+1))^2.
a(n) = -((-5+3*(-1)^n)*n^2*(2+n)^2)/8. - Colin Barker, Nov 05 2014
G.f.: x*(x^8+4*x^6+16*x^5+190*x^4+64*x^3+180*x^2+16*x+9) / ((x-1)^5*-(x+1)^5). - Colin Barker, Nov 05 2014

Extensions

Edited and extended by R. J. Mathar, Dec 15 2009

A166010 a(n) = prime(n)^2-4.

Original entry on oeis.org

0, 5, 21, 45, 117, 165, 285, 357, 525, 837, 957, 1365, 1677, 1845, 2205, 2805, 3477, 3717, 4485, 5037, 5325, 6237, 6885, 7917, 9405, 10197, 10605, 11445, 11877, 12765, 16125, 17157, 18765, 19317, 22197, 22797, 24645, 26565, 27885, 29925, 32037
Offset: 1

Views

Author

Keywords

Comments

Least common multiple of prime(n)-2 and prime(n)+2.

Crossrefs

Programs

  • Magma
    [NthPrime(n)^2-4: n in [1..41]]; // Bruno Berselli, Apr 17 2012
    
  • Mathematica
    f[n_]:=LCM[n-2,n+2]; lst={};Do[p=Prime[n];AppendTo[lst,f[p]],{n,5!}]; lst
    Prime[Range[5!]]^2 - 4 (* Zak Seidov, Apr 17 2012 *)
  • PARI
    a(n)=prime(n)^2-4 \\ Charles R Greathouse IV, Apr 17 2012

Formula

a(n) = A001248(n)-4 = A040976(n)*A052147(n). [Bruno Berselli, Apr 17 2012]

Extensions

Definition rewritten by Bruno Berselli, Apr 17 2012

A249860 a(n) = Least common multiple of n + 3 and n - 3.

Original entry on oeis.org

4, 5, 0, 7, 8, 9, 20, 55, 12, 91, 56, 45, 80, 187, 36, 247, 140, 105, 176, 391, 72, 475, 260, 189, 308, 667, 120, 775, 416, 297, 476, 1015, 180, 1147, 608, 429, 680, 1435, 252, 1591, 836, 585, 920, 1927, 336, 2107, 1100, 765, 1196, 2491, 432, 2695, 1400, 969
Offset: 1

Views

Author

Colin Barker, Nov 07 2014

Keywords

Comments

The recurrence for the general case lcm(n+k, n-k) is a(n) = 3*a(n-2*k)-3*a(n-4*k)+a(n-6*k) for n>6*k.

Examples

			a(8) = 55 because lcm(8+3, 8-3) = lcm(11, 5) = 55.
		

Crossrefs

Cf. A066830 (k=1), A249859 (k=2), A060789.

Programs

  • Maple
    A249860:=n->lcm(n+3,n-3): seq(A249860(n), n=1..100); # Wesley Ivan Hurt, Feb 12 2017
  • Mathematica
    CoefficientList[Series[(-10 x^19 - 8 x^18 - 3 x^17 - 4 x^16 -5 x^15 + 37 x^13 + 32 x^12 + 18 x^11 + 32 x^10 + 70 x^9 + 12 x^8 + 40 x^7 + 8 x^6 + 9 x^5 + 8 x^4 + 7 x^3 + 5 x + 4) / (- x^18 + 3 x^12 - 3 x^6 + 1), {x, 0, 50}], x] (* Vincenzo Librandi, Nov 08 2014 *)
    Table[LCM @@ (n + {-3, 3}), {n, 54}] (* Michael De Vlieger, Feb 13 2017 *)
  • PARI
    a(n) = lcm(n+3, n-3)
    
  • PARI
    Vec(x*(-10*x^19 -8*x^18 -3*x^17 -4*x^16 -5*x^15 +37*x^13 +32*x^12 +18*x^11 +32*x^10 +70*x^9 +12*x^8 +40*x^7 +8*x^6 +9*x^5 +8*x^4 +7*x^3 +5*x +4) / (-x^18 +3*x^12 -3*x^6 +1) + O(x^100))

Formula

a(n) = 3*a(n-6)-3*a(n-12)+a(n-18) for n>18.
G.f.: x*(-10*x^19 -8*x^18 -3*x^17 -4*x^16 -5*x^15 +37*x^13 +32*x^12 +18*x^11 +32*x^10 +70*x^9 +12*x^8 +40*x^7 +8*x^6 +9*x^5 +8*x^4 +7*x^3 +5*x +4) / (-x^18 +3*x^12 -3*x^6 +1).
From Peter Bala, Feb 15 2019: (Start)
For n >= 3, a(n) = (n^2 - 9)/b(n), where (b(n)), n >= 3, is the periodic sequence [6, 1, 2, 3, 2, 1, 6, 1, 2, 3, 2, 1, ...] of period 6. a(n) is thus a quasi-polynomial in n
For n >= 4, a(n) = (n + 3)*A060789(n-3). (End)
Sum_{n>=4} 1/a(n) = 47/60. - Amiram Eldar, Aug 09 2022
Sum_{k=1..n} a(k) ~ 7*n^3/36. - Vaclav Kotesovec, Aug 09 2022

A249859 Least common multiple of n + 2 and n - 2.

Original entry on oeis.org

3, 0, 5, 6, 21, 8, 45, 30, 77, 24, 117, 70, 165, 48, 221, 126, 285, 80, 357, 198, 437, 120, 525, 286, 621, 168, 725, 390, 837, 224, 957, 510, 1085, 288, 1221, 646, 1365, 360, 1517, 798, 1677, 440, 1845, 966, 2021, 528, 2205, 1150, 2397, 624, 2597, 1350, 2805
Offset: 1

Views

Author

Colin Barker, Nov 07 2014

Keywords

Comments

The recurrence for the general case lcm(n+k, n-k) is a(n) = 3*a(n-2*k) - 3*a(n-4*k) + a(n-6*k) for n > 6*k.

Examples

			a(8) = 30 because lcm(8 + 2, 8 - 2) = lcm(6, 10) = 30.
		

Crossrefs

Cf. A066830 (k=1), A249860 (k=3), A060819.

Programs

  • Magma
    [Lcm(n-2, n+2): n in [1..60]]; // Vincenzo Librandi, Nov 10 2014
  • Maple
    A249859:=n-> ilcm(n+2,n-2): seq(A249859(n), n=1..100); # Wesley Ivan Hurt, Jul 09 2017
  • Mathematica
    Table[LCM[n - 2, n + 2], {n, 50}] (* Alonso del Arte, Nov 07 2014 *)
    CoefficientList[Series[(-6 x^12 - 2 x^11 - 3 x^10 + 23 x^8 + 12 x^7 + 30 x^6 + 8 x^5 + 12 x^4 + 6 x^3 + 5 x^2 + 3) / (-x^12 + 3 x^8 - 3 x^4 + 1), {x, 0, 40}], x] (* Vincenzo Librandi, Nov 10 2014 *)
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1},{3,0,5,6,21,8,45,30,77,24,117,70,165},60] (* Harvey P. Dale, Jul 11 2017 *)
  • PARI
    a(n) = lcm(n+2, n-2)
    
  • PARI
    Vec(x*(-6*x^12 -2*x^11 -3*x^10 +23*x^8 +12*x^7 +30*x^6 +8*x^5 +12*x^4 +6*x^3 +5*x^2 +3) / (-x^12 +3*x^8 -3*x^4 +1) + O(x^100))
    

Formula

a(n) = lcm(n - 2, n + 2).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12) for n > 12.
G.f.: x*(-6*x^12 - 2*x^11 - 3*x^10 + 23*x^8 + 12*x^7 + 30*x^6 + 8*x^5 + 12*x^4 + 6*x^3 + 5*x^2 + 3) / (-x^12 + 3*x^8 - 3*x^4 + 1).
From Peter Bala, Feb 15 2019: (Start)
For n >= 2, a(n) = (n^2 - 4)/b(n), where b(n), n >= 1, is the periodic sequence [1, 4, 1, 2, 1, 4, 1, 2, ...] of period 4. a(n) is thus a quasi-polynomial in n.
For n >= 3, a(n) = (n + 2)*A060819(n-2). (End)
Sum_{n>=3} 1/a(n) = 5/6. - Amiram Eldar, Aug 09 2022
Sum_{k=1..n} a(k) ~ 11*n^3/48. - Vaclav Kotesovec, Aug 09 2022

A166011 Least common multiple of prime(n)-3 and prime(n)+3.

Original entry on oeis.org

5, 0, 8, 20, 56, 80, 140, 176, 260, 416, 476, 680, 836, 920, 1100, 1400, 1736, 1856, 2240, 2516, 2660, 3116, 3440, 3956, 4700, 5096, 5300, 5720, 5936, 6380, 8060, 8576, 9380, 9656, 11096, 11396, 12320, 13280, 13940, 14960, 16016, 16376, 18236, 18620
Offset: 1

Views

Author

Keywords

Comments

From Altug Alkan, Apr 22 2016: (Start)
For n > 1, a(n) is (p-3)*(p+3)/2 where p is the n-th prime. The reason is that the greatest common divisor of p-3 and p+3 is always 2 where p is the n-th prime and n > 2.
Proof: Let us assume that q is the greatest common divisor of p-3 and p+3. Because of the fact that any divisor of a and b must divide a-b, we know that q must divide 6. Note that q cannot be a multiple of 3 because p is prime, that is, q must be 1 or 2. Since we know that p-3 and p+3 are always even numbers for odd prime p, q must be 2 because we define it as the greatest common divisor.
If the greatest common divisor of p-3 and p+3 is always 2 where p is the n-th prime and n > 2, then the least common multiple of p-3 and p+3 must be (p-3)*(p+3)/2 where p is the n-th prime and n > 2 because of the general identity lcm(a, b) * gcd(a, b) = a*b. Note that for p = 3, (p-3)*(p+3)/t always is equal to 0 for any nonzero integer t, so it can be said that a(n) is (p-3)*(p+3)/2 where p is the n-th prime and n > 1. (End)

Crossrefs

Programs

  • Maple
    A166011:=n->lcm(ithprime(n)+3,ithprime(n)-3): seq(A166011(n), n=1..100); # Wesley Ivan Hurt, Apr 22 2016
  • Mathematica
    f[n_]:=LCM[n-3,n+3]; lst={};Do[p=Prime[n];AppendTo[lst,f[p]],{n,5!}]; lst
    LCM[#+3,#-3]&/@Prime[Range[50]] (* Harvey P. Dale, Aug 09 2015 *)
  • PARI
    a(n) = lcm(prime(n)-3, prime(n)+3); \\ Michel Marcus, Apr 22 2016

A277384 Least common multiple of n + 4 and n - 4.

Original entry on oeis.org

15, 6, 7, 0, 9, 10, 33, 12, 65, 42, 105, 16, 153, 90, 209, 60, 273, 154, 345, 48, 425, 234, 513, 140, 609, 330, 713, 96, 825, 442, 945, 252, 1073, 570, 1209, 160, 1353, 714, 1505, 396, 1665, 874, 1833, 240, 2009, 1050, 2193, 572, 2385, 1242, 2585, 336, 2793
Offset: 1

Views

Author

Colin Barker, Oct 12 2016

Keywords

Comments

The recurrence for the general case lcm(n+k, n-k) is b(n) = 3*b(n-2*k) - 3*b(n-4*k) + b(n-6*k) for n>6*k.

Crossrefs

Cf. A066830 (k=1), A249859 (k=2), A249860 (k=3).
Cf. A277385.

Programs

  • Maple
    A277384:=n->lcm(n+4,n-4): seq(A277384(n), n=1..100); # Wesley Ivan Hurt, Jul 09 2017
  • Mathematica
    Table[LCM[n + 4, n - 4], {n, 1, 25}] (* G. C. Greubel, Oct 12 2016 *)
  • PARI
    a(n) = lcm(n+4, n-4)
    
  • PARI
    Vec(x*(15 +6*x +7*x^2 +9*x^4 +10*x^5 +33*x^6 +12*x^7 +20*x^8 +24*x^9 +84*x^10 +16*x^11 +126*x^12 +60*x^13 +110*x^14 +24*x^15 +123*x^16 +46*x^17 +51*x^18 -7*x^20 -6*x^21 -15*x^22 -4*x^23 -30*x^24 -12*x^25 -14*x^26) / ((1 -x)^3*(1 +x)^3*(1 +x^2)^3*(1 +x^4)^3) + O(x^60))

Formula

a(n) = 3*a(n-8)-3*a(n-16)+a(n-24) for n>27.
G.f.: x*(15 +6*x +7*x^2 +9*x^4 +10*x^5 +33*x^6 +12*x^7 +20*x^8 +24*x^9 +84*x^10 +16*x^11 +126*x^12 +60*x^13 +110*x^14 +24*x^15 +123*x^16 +46*x^17 +51*x^18 -7*x^20 -6*x^21 -15*x^22 -4*x^23 -30*x^24 -12*x^25 -14*x^26) / ((1 -x)^3*(1 +x)^3*(1 +x^2)^3*(1 +x^4)^3).

A386823 Triangle read by rows: T(n,k) = numerator((n^2 - k^2)/(n^2 + k^2)), where 0 <= k < n.

Original entry on oeis.org

1, 1, 3, 1, 4, 5, 1, 15, 3, 7, 1, 12, 21, 8, 9, 1, 35, 4, 3, 5, 11, 1, 24, 45, 20, 33, 12, 13, 1, 63, 15, 55, 3, 39, 7, 15, 1, 40, 77, 4, 65, 28, 5, 16, 17, 1, 99, 12, 91, 21, 3, 8, 51, 9, 19, 1, 60, 117, 56, 105, 48, 85, 36, 57, 20, 21, 1, 143, 35, 15, 4, 119, 3, 95, 5, 7, 11, 23
Offset: 1

Views

Author

Stefano Spezia, Aug 04 2025

Keywords

Examples

			The triangle of the fractions begins as:
  1/1;
  1/1,   3/5;
  1/1,   4/5,  5/13;
  1/1, 15/17,   3/5,  7/25;
  1/1, 12/13, 21/29,  8/17,  9/41;
  1/1, 35/37,   4/5,   3/5,  5/13, 11/61;
  1/1, 24/25, 45/53, 20/29, 33/65, 12/37, 13/85;
  ...
		

Crossrefs

Cf. A000012 (k=0), A000290, A005408, A066830 (k=1), A069011, A094728, A386824 (denominators).

Programs

  • Mathematica
    T[n_,k_]:=Numerator[(n^2-k^2)/(n^2+k^2)]; Table[T[n,k],{n,12},{k,0,n-1}]//Flatten

Formula

T(n,n-1) = A005804(n-1).

A362218 Three-column array read by rows: row n gives the unique ordered primitive Pythagorean triple (a,b,c) with a

Original entry on oeis.org

3, 4, 5, 8, 15, 17, 5, 12, 13, 12, 35, 37, 7, 24, 25, 16, 63, 65, 9, 40, 41, 20, 99, 101, 11, 60, 61, 24, 143, 145, 13, 84, 85, 28, 195, 197, 15, 112, 113, 32, 255, 257, 17, 144, 145, 36, 323, 325, 19, 180, 181, 40, 399, 401
Offset: 3

Keywords

Comments

Given an ordered primitive Pythagorean triple (a,b,c) with a
For n>=3 there exists a unique ordered primitive Pythagorean triple such that (b+c)/a = n.
For n odd, the triple is {n, (n^2-1)/2, (n^2+1)/2}.
For n even, the triple is { 2*n, n^2-1, n^2+1 }.

Examples

			Irregular array begins:
  n=3:   3,  4,  5;
  n=4:   8, 15, 17;
  n=5:   5, 12, 13;
  n=6:  12, 35, 37;
  n=7:   7, 24, 25;
  ...
Row n=3 is (3,4,5) and has (b+c)/a = (4+5)/3 = 3.
Row n=4 is (8,15,17) and has (b+c)/a = (15+17)/8 = 4.
		

References

  • J. M. Blanco Casado, J. M. Sánchez Muñoz, and M. A. Pérez García-Ortega, El Libro de las Ternas Pitagóricas, Preprint 2023.

Crossrefs

Cf. A022998 (short leg), A066830 (long leg), A228564 (hypotenuse).

Programs

  • Mathematica
    k=50;
    ternas={{n," ",a,b,c," ",r," "," γ2 "," ",s," ",rb}};Do[If[Mod[t,2]==0,ternas=Join[ternas,{{t," ",2t,t^2-1,t^2+1," ",t-1," ",t," ",t(t+1)," ",t(t-1)}}],ternas=Join[ternas,{{t," ",t,(t^2-1)/2,(t^2+1)/2," ",(t-1)/2," ",t," ",(t(t+1))/2," ",(t(t-1))/2}}]],{t,3,k+2}]
    MatrixForm[Transpose[ternas]]

Formula

T(n,1) = A022998(n).
T(n,2) = A066830(n).
T(n,3) = A228564(n).
a(6*k-3) = 2*k+1;
a(6*k-2) = ((2*k+1)^2 - 1)/2;
a(6*k-1) = ((2*k+1)^2 + 1)/2;
a(6*k) = 4*(k+1);
a(6*k+1) = 4*(k+1)^2 - 1;
a(6*k+2) = 4*(k+1)^2 + 1.

Extensions

Edited by N. J. A. Sloane, Apr 30 2023
Showing 1-8 of 8 results.