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.

A138796 Least possible k > 0 with T(k) - T(j) = n, j > 0, where T(i) > 0 are the triangular numbers A000217.

Original entry on oeis.org

2, 3, 4, 3, 6, 4, 8, 4, 10, 6, 5, 7, 5, 6, 16, 9, 6, 10, 6, 8, 7, 12, 9, 7, 8, 7, 28, 15, 8, 16, 32, 8, 10, 8, 13, 19, 11, 9, 10, 21, 9, 22, 9, 10, 13, 24, 17, 10, 12, 11, 10, 27, 10, 13, 11, 12, 16, 30, 11, 31, 17, 11, 64, 11, 18, 34, 12, 14, 13, 36, 12, 37, 20, 12, 13, 12, 21, 40, 18
Offset: 2

Views

Author

Peter Pein (petsie(AT)dordos.net), Mar 30 2008

Keywords

Comments

For T(k) see A138797, for j see A138798 and for T(j) see A138799.
The number of ways n can be written as difference of two triangular numbers is sequence A136107
Note that n = t(k)-t(j) implies 2n = (k-j)(k+j+1), where (k-j) and (k+j+1) are of opposite parity. Let d be the odd element of { k-j, k+j+1 }. Then d is an odd divisor of n and k = ( d + 2n/d - 1 ) / 2. Therefore a(n) = ( min{ d + 2n/d } - 1 ) / 2 where d runs through all odd divisors of n, except perhaps (sqrt(8*n+1) +- 1)/2 which correspond to j=0. See PARI program. The restriction that j > 0 seems artificial. If it is removed we get A212652. - Max Alekseyev, Mar 31 2008

Examples

			a(30)=8, because 30 = T(30) - T(29) = T(11) - T(8) = T(9) - T(5) = T(8) - T(3) and 8 is the least index of the minuends.
		

Crossrefs

Programs

  • Mathematica
    T=#(#+1)/2&;Min[k/.{ToRules[Reduce[{T[k]-T[j]\[Equal]#,0
    				
  • PARI
    { a(n) = local(m); m=2*n+1; fordiv(n/2^valuation(n,2),d,if((2*d+1)^2!=8*n+1&&(2*d-1)^2!=8*n+1,m=min(m,d+(2*n)\d))); (m-1)\2 }
    vector(100,n,a(n)) \\ Max Alekseyev, Mar 31 2008

A138797 Least possible T(k) with T(k)-T(j)=n, where T(i)>0 are the triangular numbers A000217.

Original entry on oeis.org

3, 6, 10, 6, 21, 10, 36, 10, 55, 21, 15, 28, 15, 21, 136, 45, 21, 55, 21, 36, 28, 78, 45, 28, 36, 28, 406, 120, 36, 136, 528, 36, 55, 36, 91, 190, 66, 45, 55, 231, 45, 253, 45, 55, 91, 300, 153, 55, 78, 66, 55, 378, 55, 91, 66, 78, 136, 465, 66, 496, 153, 66, 2080, 66, 171
Offset: 2

Views

Author

Peter Pein (petsie(AT)dordos.net), Mar 30 2008

Keywords

Comments

For k see A138796, for j see A138798 and for T(j) see A138799.
The number of ways n can be written as difference of two triangular numbers is sequence A136107

Examples

			a(4)=10 because T(A138796(4))=10.
		

Crossrefs

Programs

  • Mathematica
    T=#(#+1)/2&;T[Min[k/.{ToRules[Reduce[{T[k]-T[j]\[Equal]#,0
    				

A138798 Values of j corresponding to least possible k>0 with T(k)-T(j)=n, where T(i)>0 are the triangular numbers A000217.

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 7, 1, 9, 4, 2, 5, 1, 3, 15, 7, 2, 8, 1, 5, 3, 10, 6, 2, 4, 1, 27, 13, 3, 14, 31, 2, 6, 1, 10, 17, 7, 3, 5, 19, 2, 20, 1, 4, 9, 22, 14, 3, 7, 5, 2, 25, 1, 8, 4, 6, 12, 28, 3, 29, 13, 2, 63, 1, 14, 32, 4, 8, 6, 34, 3, 35, 16, 2, 5, 1, 17, 38, 13, 4, 18, 40, 6, 3, 19, 11, 2, 43, 1
Offset: 2

Views

Author

Peter Pein (petsie(AT)dordos.net), Mar 30 2008

Keywords

Comments

For k see A138796, for T(k) see A138797 and for T(j) see A138799.
The number of ways n can be written as difference of two triangular numbers is sequence A136107

Examples

			a(30)=3 because 30 = T(30)-T(29)=T(11)-T(8)=T(9)-T(5)=T(8)-T(3) and 3 is the least index of the subtrahends.
		

Crossrefs

Programs

  • Mathematica
    T=#(#+1)/2&;Sort[{k,j}/.{ToRules[Reduce[{T[k]-T[j]\[Equal]#,0
    				
Showing 1-3 of 3 results.