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

A309507 Number of ways the n-th triangular number T(n) = A000217(n) can be written as the difference of two positive triangular numbers.

Original entry on oeis.org

0, 1, 1, 1, 3, 3, 1, 2, 5, 3, 3, 3, 3, 7, 3, 1, 5, 5, 3, 7, 7, 3, 3, 5, 5, 7, 7, 3, 7, 7, 1, 3, 7, 7, 11, 5, 3, 7, 7, 3, 7, 7, 3, 11, 11, 3, 3, 5, 8, 11, 7, 3, 7, 15, 7, 7, 7, 3, 7, 7, 3, 11, 5, 3, 15, 7, 3, 7, 15, 7, 5, 5, 3, 11, 11, 7, 15, 7, 3, 9, 9, 3, 7
Offset: 1

Views

Author

Alois P. Heinz, Aug 05 2019

Keywords

Comments

Equivalently, a(n) is the number of triples [n,k,m] with k>0 satisfying the Diophantine equation n*(n+1) + k*(k+1) - m*(m+1) = 0. Any such triple satisfies a triangle inequality, n+k > m. The n for which there is a triple [n,n,m] are listed in A053141. - Bradley Klee, Mar 01 2020; edited by N. J. A. Sloane, Mar 31 2020

Examples

			a(5) = 3: T(5) = T(6)-T(3) = T(8)-T(6) = T(15)-T(14).
a(7) = 1: T(7) = T(28)-T(27).
a(8) = 2: T(8) = T(13)-T(10) = T(36)-T(35).
a(9) = 5: T(9) = T(10)-T(4) = T(11)-T(6) = T(16)-T(13) = T(23)-T(21) = T(45)-T(44).
a(49) = 8: T(49) = T(52)-T(17) = T(61)-T(36) = T(94)-T(80) = T(127)-T(117) = T(178)-T(171) = T(247)-T(242) = T(613)-T(611) = T(1225)-T(1224).
The triples with n <= 16 are:
2, 2, 3
3, 5, 6
4, 9, 10
5, 3, 6
5, 6, 8
5, 14, 15
6, 5, 8
6, 9, 11
6, 20, 21
7, 27, 28
8, 10, 13
8, 35, 36
9, 4, 10
9, 6, 11
9, 13, 16
9, 21, 23
9, 44, 45
10, 8, 13
10, 26, 28
10, 54, 55
11, 14, 18
11, 20, 23
11, 65, 66
12, 17, 21
12, 24, 27
12, 77, 78
13, 9, 16
13, 44, 46
13, 90, 91
14, 5, 15
14, 11, 18
14, 14, 20
14, 18, 23
14, 33, 36
14, 51, 53
14, 104, 105
15, 21, 26
15, 38, 41
15, 119, 120
16, 135, 136. - _N. J. A. Sloane_, Mar 31 2020
		

Crossrefs

Cf. A000217, A001108, A046079 (the same for squares), A068194, A100821 (the same for primes for n>1), A309332.
See also A053141. The monotonic triples [n,k,m] with n <= k <= m are counted in A333529.

Programs

  • Maple
    with(numtheory): seq(tau(n*(n+1))-tau(n*(n+1)/2)-1, n=1..80); # Ridouane Oudra, Dec 08 2023
  • Mathematica
    TriTriples[TNn_] := Sort[Select[{TNn, (TNn + TNn^2 - # - #^2)/(2 #),
          (TNn + TNn^2 - # + #^2)/(2 #)} & /@
        Complement[Divisors[TNn (TNn + 1)], {TNn}],
       And[And @@ (IntegerQ /@ #), And @@ (# > 0 & /@ #)] &]]
    Length[TriTriples[#]] & /@ Range[100]
    (* Bradley Klee, Mar 01 2020 *)

Formula

a(n) = 1 <=> n in { A068194 } \ { 1 }.
a(n) is even <=> n in { A001108 } \ { 0 }.
a(n) = number of odd divisors of n*(n+1) (or, equally, of T(n)) that are greater than 1. - N. J. A. Sloane, Apr 03 2020
a(n) = A092517(n) - A063440(n) - 1. - Ridouane Oudra, Dec 08 2023

A333530 Make a list of triples [n,k,m] with n>=1, k>=1, and T_n+T_k = T_m as in A309507, arranged in lexicographic order; sequence gives values of k.

Original entry on oeis.org

2, 5, 9, 3, 6, 14, 5, 9, 20, 27, 10, 35, 4, 6, 13, 21, 44, 8, 26, 54, 14, 20, 65, 17, 24, 77, 9, 44, 90, 5, 11, 14, 18, 33, 51, 104, 21, 38, 119, 135, 12, 22, 49, 75, 152, 14, 25, 55, 84, 170, 35, 45, 189, 6, 11, 26, 39, 50, 68, 209, 9, 15, 29, 35, 75, 114, 230, 17, 252
Offset: 1

Views

Author

N. J. A. Sloane, Apr 01 2020

Keywords

Examples

			The first few triples are:
2, 2, 3
3, 5, 6
4, 9, 10
5, 3, 6
5, 6, 8
5, 14, 15
6, 5, 8
6, 9, 11
6, 20, 21
7, 27, 28
8, 10, 13
8, 35, 36
9, 4, 10
9, 6, 11
9, 13, 16
9, 21, 23
9, 44, 45
10, 8, 13
10, 26, 28
10, 54, 55
11, 14, 18
11, 20, 23
11, 65, 66
12, 17, 21
12, 24, 27
12, 77, 78
...
		

Crossrefs

If we only take triples [n,k,m] with n <= k <= m, the values of k and m are A198455 and A198456 respectively.

Programs

  • Maple
    # This program produces the triples for each value of n, but then they need to be sorted on k:
    with(numtheory):
    A:=[]; M:=100;
    for n from 1 to M do
    TT:=n*(n+1);
    dlis:=divisors(TT);
      for d in dlis do
    if (d mod 2) = 1 then e := TT/d;
    mi:=min(d,e); ma:=max(d,e);
    k:=(ma-mi-1)/2;
    m:=(ma+mi-1)/2;
    # skip if k=0
        if k>0 then
         lprint(n,k,m);
        fi;
    fi;
    od:
    od:

A333531 Make a list of triples [n,k,m] with n>=1, k>=1, and T_n+T_k = T_m as in A309507, arranged in lexicographic order; sequence gives values of m.

Original entry on oeis.org

3, 6, 10, 6, 8, 15, 8, 11, 21, 28, 13, 36, 10, 11, 16, 23, 45, 13, 28, 55, 18, 23, 66, 21, 27, 78, 16, 46, 91, 15, 18, 20, 23, 36, 53, 105, 26, 41, 120, 136, 21, 28, 52, 77, 153, 23, 31, 58, 86, 171, 40, 49, 190, 21, 23, 33, 44, 54, 71, 210, 23, 26, 36, 41, 78, 116, 231, 28, 253
Offset: 1

Views

Author

N. J. A. Sloane, Apr 01 2020

Keywords

Examples

			The first few triples are:
2, 2, 3
3, 5, 6
4, 9, 10
5, 3, 6
5, 6, 8
5, 14, 15
6, 5, 8
6, 9, 11
6, 20, 21
7, 27, 28
8, 10, 13
8, 35, 36
9, 4, 10
9, 6, 11
9, 13, 16
9, 21, 23
9, 44, 45
10, 8, 13
10, 26, 28
10, 54, 55
11, 14, 18
11, 20, 23
11, 65, 66
12, 17, 21
12, 24, 27
12, 77, 78
...
		

Crossrefs

If we only take triples [n,k,m] with n <= k <= m, the values of k and m are A198455 and A198456 respectively.

Programs

  • Maple
    # This program produces the triples for each value of n, but then they need to be sorted on k:
    with(numtheory):
    A:=[]; M:=100;
    for n from 1 to M do
    TT:=n*(n+1);
    dlis:=divisors(TT);
    for d in dlis do
    if (d mod 2) = 1 then e := TT/d;
    mi:=min(d,e); ma:=max(d,e);
    k:=(ma-mi-1)/2;
    m:=(ma+mi-1)/2;
    # skip if k=0
    if k>0 then
    lprint(n,k,m);
    fi;
    fi;
    od:
    od:
Showing 1-3 of 3 results.