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

A212652 a(n) is the least positive integer M such that n = T(M) - T(k), for k an integer, 0 <= k <= M, where T(r) = A000217(r) is the r-th triangular number.

Original entry on oeis.org

1, 2, 2, 4, 3, 3, 4, 8, 4, 4, 6, 5, 7, 5, 5, 16, 9, 6, 10, 6, 6, 7, 12, 9, 7, 8, 7, 7, 15, 8, 16, 32, 8, 10, 8, 8, 19, 11, 9, 10, 21, 9, 22, 9, 9, 13, 24, 17, 10, 12, 11, 10, 27, 10, 10, 11, 12, 16, 30, 11, 31, 17, 11, 64, 11, 11, 34
Offset: 1

Views

Author

L. Edson Jeffery, Feb 14 2013

Keywords

Comments

n = A000217(a(n)) - A000217(a(n) - A109814(n)).
Conjecture: n appears in row a(n) of A209260.
From Daniel Forgues, Jan 06 2016: (Start)
n = Sum_{i=k+1..M} i = T(M) - T(k) = (M-k)*(M+k+1)/2.
n = 2^m, m >= 0, iff M = n = 2^m and k = n - 1 = 2^m - 1. (Points on line with slope 1.) (Powers of 2 can't be the sum of consecutive numbers.)
n is odd prime iff k = M-2. Thus M = (n+1)/2 when n is odd prime. (Points on line with slope 1/2.) (Odd primes can't be the sum of more than 2 consecutive numbers.) (End)
If n = 2^m*p where p is an odd prime, then a(n) = 2^m + (p-1)/2. - Robert Israel, Jan 14 2016
This also expresses the following geometry: along a circle having (n) points on its circumference, a(n) expresses the minimum number of hops from a start point, in a given direction (CW or CCW), when each hop is increased by one, before returning to a visited point. For example, on a clock (n=12), starting at 12 (same as zero), the hops would lead to the points 1, 3, 6, 10 and then 3, which was already visited: 5 hops altogether, so a(12) = 5. - Joseph Rozhenko, Dec 25 2023
Conjecture: a(n) is the smallest of the largest parts of the partitions of n into consecutive parts. - Omar E. Pol, Jan 07 2025

Examples

			For n = 63, we have D(63) = {1,3,7,9,21,63}, B_63 = {11,12,13,22,32,63} and a(63) = min(11,12,13,22,32,63) = 11. Since A109814(63) = 9, T(11) - T(11-9) = T(11) - T(2) = 66 - 3 = 63.
		

Crossrefs

Programs

  • Maple
    f:= n ->  min(map(t -> n/t + (t-1)/2,
    numtheory:-divisors(n/2^padic:-ordp(n,2)))):
    map(f, [$1..100]); # Robert Israel, Jan 14 2016
  • Mathematica
    Table[Min[n/# + (# - 1)/2 &@ Select[Divisors@ n, OddQ]], {n, 67}] (* Michael De Vlieger, Dec 11 2015 *)
  • PARI
    { A212652(n) = my(m); m=2*n+1; fordiv(n/2^valuation(n,2), d, m=min(m,d+(2*n)\d)); (m-1)\2; } \\ Max Alekseyev, Mar 31 2008

Formula

a(n) = Min_{odd d|n} (n/d + (d-1)/2).
a(n) = A218621(n) + (n/A218621(n) - 1)/2.
a(n) = A109814(n) + A118235(n) - 1.

Extensions

Reference to Max Alekseyev's 2008 proposal of this sequence added by N. J. A. Sloane, Nov 01 2014

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
    				

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

Original entry on oeis.org

1, 3, 6, 1, 15, 3, 28, 1, 45, 10, 3, 15, 1, 6, 120, 28, 3, 36, 1, 15, 6, 55, 21, 3, 10, 1, 378, 91, 6, 105, 496, 3, 21, 1, 55, 153, 28, 6, 15, 190, 3, 210, 1, 10, 45, 253, 105, 6, 28, 15, 3, 325, 1, 36, 10, 21, 78, 406, 6, 435, 91, 3, 2016, 1, 105, 528, 10, 36, 21, 595, 6, 630
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 j see A138798.
The number of ways n can be written as difference of two triangular numbers is sequence A136107

Examples

			a(30)=6 because 30 = T(30)-T(29)=T(11)-T(8)=T(9)-T(5)=T(8)-T(3) and T(3)=6 is the least minuend.
		

Crossrefs

Programs

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