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

A306367 a(n) = numerator of (n^2 + 2)/(n + 2).

Original entry on oeis.org

1, 1, 3, 11, 3, 27, 19, 17, 33, 83, 17, 123, 73, 57, 99, 227, 43, 291, 163, 121, 201, 443, 81, 531, 289, 209, 339, 731, 131, 843, 451, 321, 513, 1091, 193, 1227, 649, 457, 723, 1523, 267, 1683, 883, 617, 969, 2027, 353, 2211, 1153, 801, 1251, 2603, 451
Offset: 0

Views

Author

Peter Bala, Feb 14 2019

Keywords

Comments

If P(x) and Q(x) are coprime integral polynomials such that Q(n) > 0 for n >= 0 then the sequence of numerators of the rational numbers P(n)/Q(n) for n >= 0 and the sequence of denominators of P(n)/Q(n) for n >= 0 are both quasi-polynomial in n. In fact, there exists a purely periodic sequence b(n) such that numerator(P(n)/Q(n)) = P(n)/b(n) and denominator(P(n)/Q(n)) = Q(n)/b(n).
Here we take P(n) = n^2 + 2 and Q(n) = n + 2. Cf. A228564 (case P(n) = n^2 + 1, Q(n) = n + 1).

Crossrefs

Programs

  • GAP
    List([0..100],n->NumeratorRat((n^2+2)/(n+2)); # Muniru A Asiru, Feb 25 2019
    
  • Maple
    seq(numer( (n^2 + 2)/(n + 2) ), n = 0..100);
  • PARI
    a(n) = numerator((n^2 + 2)/(n + 2)); \\ Michel Marcus, Feb 26 2019

Formula

O.g.f.: (3*x^17 + x^16 + 11*x^15 + 9*x^14 + 9*x^13 + 19*x^12 + 42*x^11 + 8*x^10 + 50*x^9 + 24*x^8 + 14*x^7 + 16*x^6 + 27*x^5 + 3*x^4 + 11*x^3 + 3*x^2 + x + 1)/(1 - x^6)^3.
a(n) = (n^2 + 2)/b(n), where (b(n))n>=0 is the purely periodic sequence [2, 3, 2, 1, 6, 1, 2, 3, 2, 1, 6, 1, ...] with period 6.
a(n) is a quasi-polynomial in n: a(6*n) = 18*n^2 + 1; a(6*n+1) = 12*n^2 + 4*n + 1; a(6*n+2) = 18*n^2 + 12*n + 3; a(6*n+3) = 36*n^2 + 36*n + 11; a(6*n+4) = 6*n^2 + 8*n + 3; a(6*n+5) = 36*n^2 + 60*n + 27.
a(n) = (n^2 + 2)/( gcd(n+2,2)*gcd(n+2,3) ).
a(n) = (n^2 + 2)/(n + 2) * A060789(n+2).

A382252 Triangle T(n,k) = numerator of (n+k)/(1+n*k), 0 <= k <= n >= 0, read by rows.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 3, 1, 5, 3, 4, 1, 2, 7, 8, 5, 1, 7, 1, 3, 5, 6, 1, 8, 9, 2, 11, 12, 7, 1, 3, 5, 11, 1, 13, 7, 8, 1, 10, 11, 4, 13, 2, 5, 16, 9, 1, 11, 3, 13, 7, 3, 1, 17, 9, 10, 1, 4, 13, 14, 5, 16, 17, 2, 19, 20, 11, 1, 13, 7, 1, 2, 17, 3, 19, 1, 7, 11, 12, 1, 14, 15, 16, 17, 18, 19, 20, 21, 2, 23, 24
Offset: 0

Views

Author

M. F. Hasler, Apr 15 2025

Keywords

Comments

Since the operation n @ k := (n + k)/(1 + n*k) is commutative, it is sufficient to list only the lower half of the "multiplication table", which would otherwise be an infinite square array. This triangle lists the numerators, and A382253 lists the denominators.

Examples

			The table for the operation n @ k := (n + k)/(1 + n*k) starts as follows:
(0 is the neutral element for the operation: n @ 0 = n = 0 @ n, therefore row and column 0 give the column and row headers.)
  0    1    2     3     4     5     6     7     8    Numerators of  0;
  1    1    1     1     1     1     1     1     1     lower left    1, 1:
  2    1   4/5   5/7   2/3   7/11  8/13  3/5  10/17    triangle:    2, 1, 4;
  3    1   5/7   3/5   7/13  1/2   9/19  5/11 11/25                 3, 1, 5, 3
  4    1   2/3   7/13  8/17  3/7   2/5  11/29  4/11                 4, 1, 2, 7, 8;
  5    1   7/11  1/2   3/7   5/13 11/31  1/3  13/41                 etc.
  6    1   8/13  9/19  2/5  11/31 12/37 13/43  2/7
  7    1   3/5   5/11 11/29  1/3  13/43  7/25  5/19
  8    1  10/17 11/25  4/11 13/41  2/7   5/19 16/65
This sequence lists the numerators of the values, where numerator(x) = x for integers, and only for the lower left triangle of the table, by rows.
		

Crossrefs

Cf. A382253 (denominators), A382257 (related); A228564 (main diagonal), A001477 (row & col. 0), A000012 (row & col. 1).

Programs

  • PARI
    apply( {A382252(n,k=-1)= k<0&& k=n-(1+n=(sqrtint(8*n+1)-1)\2)*n/2; numerator((n+k)/(1+n*k))}, [0..30])

Formula

T(n,k) = T(k,n) for all n, k >= 0; therefore only k <= n is considered here.
T(n,0) = T(0,n) = n and T(n,1) = T(1,n) = 1 for all n >= 0.
T(n,n) = A022998(n) = n if odd, else 2*n.

A382253 Triangle T(n,k) = denominator of (n+k)/(1+n*k), 0 <= k <= n >= 0, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 1, 5, 1, 1, 7, 5, 1, 1, 3, 13, 17, 1, 1, 11, 2, 7, 13, 1, 1, 13, 19, 5, 31, 37, 1, 1, 5, 11, 29, 3, 43, 25, 1, 1, 17, 25, 11, 41, 7, 19, 65, 1, 1, 19, 7, 37, 23, 11, 4, 73, 41, 1, 1, 7, 31, 41, 17, 61, 71, 9, 91, 101, 1
Offset: 0

Views

Author

M. F. Hasler, Apr 15 2025

Keywords

Comments

Since the operation n @ k := (n + k)/(1 + n*k) is commutative, it is sufficient to list only the lower half of the "multiplication table", which would otherwise be an infinite square array. This triangle lists the denominators, and A382252 lists the numerators.

Examples

			The table for the operation n @ k := (n + k)/(1 + n*k) starts as follows:
(0 is the neutral element for the operation: n @ 0 = n = 0 @ n, therefore the elements in row 0 and column 0 equal the column and row index.)
  0    1    2     3     4     5     6     7     8    Denominators of lower left
  1    1    1     1     1     1     1     1     1    triangle:  1;
  2    1   4/5   5/7   2/3   7/11  8/13  3/5  10/17             1, 1
  3    1   5/7   3/5   7/13  1/2   9/19  5/11 11/25             1, 1, 5;
  4    1   2/3   7/13  8/17  3/7   2/5  11/29  4/11             1, 1, 7, 5;
  5    1   7/11  1/2   3/7   5/13 11/31  1/3  13/41             1, 1, 3, 13, 17;
  6    1   8/13  9/19  2/5  11/31 12/37 13/43  2/7                 etc.
  7    1   3/5   5/11 11/29  1/3  13/43  7/25  5/19
  8    1  10/17 11/25  4/11 13/41  2/7   5/19 16/65
The sequence lists the denominators of the values, where denominator(x) = 1 for integers, and only for the lower left triangle of the table, by rows.
		

Crossrefs

Cf. A382252, A382257; A228564 (main diagonal), A001477 (row & col. 0 of the '@' table), A000012 (row & col. 0 & 1 of the table of denominators).

Programs

  • PARI
    apply( {A382253(n,k=-1)= k<0&& k=n-(1+n=(sqrtint(8*n+1)-1)\2)*n/2; denominator((n+k)/(1+n*k))}, [0..66])

Formula

T(n,k) = T(k,n) for all n, k >= 0;
T(n,0) = T(0,n) = T(n,1) = T(1,n) = 1 for all n >= 0;
T(n,n) = denominator(2*n/(1+n^2)) = numerator((1+n^2)/2) = A228564(n).

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

Original entry on oeis.org

1, 1, 5, 1, 5, 13, 1, 17, 5, 25, 1, 13, 29, 17, 41, 1, 37, 5, 5, 13, 61, 1, 25, 53, 29, 65, 37, 85, 1, 65, 17, 73, 5, 89, 25, 113, 1, 41, 85, 5, 97, 53, 13, 65, 145, 1, 101, 13, 109, 29, 5, 17, 149, 41, 181, 1, 61, 125, 65, 137, 73, 157, 85, 185, 101, 221
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, A001844, A069011, A094728, A228564 (k=1), A243883 (k=2), A386823 (numerators).

Programs

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

Formula

T(n,n-1) = A001844(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-5 of 5 results.