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

A332552 a(n) = A082184(n) - A082183(n).

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 3, 6, 5, 4, 4, 7, 10, 5, 1, 9, 9, 5, 15, 14, 11, 8, 15, 13, 18, 21, 7, 15, 15, 1, 11, 22, 17, 28, 12, 19, 26, 24, 8, 21, 21, 11, 36, 30, 23, 16, 21, 35, 34, 39, 13, 27, 45, 40, 24, 38, 29, 20, 20, 31, 42, 21, 13, 55, 33, 17, 51, 46, 35
Offset: 2

Views

Author

N. J. A. Sloane, Feb 21 2020, at the suggestion of Allan C. Wechsler

Keywords

Crossrefs

A332553 a(n) = n + A082183(n) - A082184(n).

Original entry on oeis.org

1, 2, 3, 2, 3, 6, 5, 3, 5, 7, 8, 6, 4, 10, 15, 8, 9, 14, 5, 7, 11, 15, 9, 12, 8, 6, 21, 14, 15, 30, 21, 11, 17, 7, 24, 18, 12, 15, 32, 20, 21, 32, 8, 15, 23, 31, 27, 14, 16, 12, 39, 26, 9, 15, 32, 19, 29, 39, 40, 30, 20, 42, 51, 10, 33, 50, 17, 23, 35
Offset: 2

Views

Author

N. J. A. Sloane, Feb 21 2020, at the suggestion of Bradley Klee

Keywords

Comments

Since (by definition) a(n) = n + A082183(n) - A082184(n) = - (n^2 + A082183(n)^2 - A082184(n)^2), this can be described as the distance of (n, A082183(n), A082184(n)) from a Pythagorean triple. Also a(n) > 0 for all n. See the Myers et al. link. - Bradley Klee, Feb 19 2020
Comments from N. J. A. Sloane, Feb 23 2020: (Start)
To study the lowest values taken by a(n), consider the record high values of n/a(n). The data suggests two conjectures.
Conjecture 1: The record high values of n/a(n) are j/2 + 1 for j = 2,3,4,5,... and occur at n = j*(j+1)/2 - 1.
This would imply:
Conjecture 2: Let j = 2,3,4,5,... For 1 <= n < T_j - 1, a(n) > 2*n/(j+2). (End)

Crossrefs

A082183 Smallest k > 0 such that T(n) + T(k) = T(m), for some m, T(i) being the triangular numbers, n > 1.

Original entry on oeis.org

2, 5, 9, 3, 5, 27, 10, 4, 8, 14, 17, 9, 5, 21, 135, 12, 14, 35, 6, 9, 17, 30, 12, 18, 10, 7, 54, 21, 23, 495, 42, 14, 26, 8, 49, 27, 15, 20, 98, 30, 32, 80, 9, 19, 35, 62, 45, 17, 20, 14, 99, 39, 10, 18, 54, 24, 44, 78, 81, 45, 25, 85, 153, 11, 50, 125, 20, 29, 53, 94, 97
Offset: 2

Views

Author

Ralf Stephan, Apr 06 2003

Keywords

Comments

For 16 years this entry stood with no upper bound, and indeed with no proof that a(n) always existed. In February 2020 the following three bounds and formulas arrived. They are listed in chronological order. Here k = k(n) denotes the smallest number such that T(n)+T(k) is a triangular number T(m) for some m = m(n). - N. J. A. Sloane, Feb 22 2020
k = T(n) - 1 is an upper bound on k(n) = a(n). For T(k) makes a huge triangle; all the elements of the T(n) triangle can be thinly plated onto the side of the big one as a single additional row, producing T(k+1) with m = k+1. - Allan C. Wechsler, Feb 19 2020
Let Q be the largest odd number < n dividing T(n). Then T(n) is the sum of Q consecutive integers, the last Q rows of the triangle T(m) with m = T(n)/Q + (Q-1)/2, giving the upper bound k <= T(n)/Q - (Q+1)/2. [This bound is now A332554, the values of Q are in A332547.] This bound is not tight: for n=9 it gives a(9) <= 6 when in fact a(9) = 4. - Michael J. Collins, Feb 19 2020
Comments from Richard C. Schroeppel, Feb 19 2020: (Start)
2T(n) = 2T(m) - 2T(k) = m^2 + m - k^2 - k = (m-k) (m + k + 1). Now (m-k) and (m+k+1) are of opposite parity. Factor 2T(n) into the product of an odd number times an even number. We can take one of these to be m-k, and the other to be m+k+1.
The factorization 2T(n) = n^2 + n gives two obvious solutions, n * (n+1) and 1 * (n^2+n). Equating these to (m-k) * (m+k+1) gives the two "trivial" solutions k=0, m=n and k=T(n)-1, m=T(n).
Unless n is a Mersenne prime, or n+1 is a Fermat prime [these are the n such that Q=1, see A068194] there will be a nontrivial odd divisor of n(n+1) other than 1, n, or n+1. Select the odd divisor d logarithmicly closest to n + 1/2 that isn't n or n+1.
Let q be the quotient n(n+1)/q. Then m-k = min(d,q) and m+k+1 = max(d,q). Solve for k, which is the required minimum k(n) = a(n).
Example: n=5, T(n)=15, 2T(n)=30 = 3*10, d=3, q=10, k=3, m=6, 15+6 = 21. (End)

Crossrefs

Cf. A000217, A072522, values of m are in A082184, A332547.
A332554 is an upper bound on a(n).
See A055527 for a very similar sequence involving Pythagorean triples. - Bradley Klee, Feb 20 2020
See also A309332 (number of ways to write a triangular number as a sum of two triangular numbers), A309507 (... as a difference ...).

Programs

  • Maple
    f:= proc(n) local e,t,te;
         t:= n*(n+1);
         e:= padic:-ordp(t,2);
         te:= 2^e;
         min(map(d -> (abs(te*d-t/(te*d))-1)/2, numtheory:-divisors(t/te)) minus {0}):
    map(f, [$2..100]); # Robert Israel, Sep 15 2017
  • Mathematica
    Table[SelectFirst[Range[10^3], Function[m, PolygonalNumber@ Floor@ Sqrt[2 m] == m][PolygonalNumber[n] + PolygonalNumber[#]] &], {n, 2, 72}] (* Michael De Vlieger, Sep 19 2017, after Maple by Robert Israel *)
  • PARI
    for(n=2, 100, t=n*(n+1)/2; for(k=1, 10^9, u=t+k*(k+1)/2; v=floor(sqrt(2*u)); if(v*(v+1)/2==u, print1(k", "); break)))
    
  • Python
    from _future_ import division
    from sympy import divisors
    def A082183(n):
        t = n*(n+1)
        ds = divisors(t)
        for i in range(len(ds)//2-2,-1,-1):
            x = ds[i]
            y = t//x
            a, b = divmod(y-x,2)
            if b:
                return a
        return -1 # Chai Wah Wu, Sep 12 2017

Extensions

Entry updated by N. J. A. Sloane, Feb 22 2020

A068194 Numbers k for which the only representation of k*(k+1)/2 as a sum of 2 or more consecutive positive integers is 1+2+...+k.

Original entry on oeis.org

1, 2, 3, 4, 7, 16, 31, 127, 256, 8191, 65536, 131071, 524287, 2147483647, 2305843009213693951, 618970019642690137449562111, 162259276829213363391578010288127, 170141183460469231731687303715884105727
Offset: 1

Views

Author

Jon Perry, Feb 19 2002

Keywords

Comments

Consists of 1, Mersenne primes (A000668) and Fermat primes (A019434) minus 1. Proof: The sum of r consecutive integers starting with j is r*(r + 2*j - 1)/2, so k*(k+1)/2 has an extra representation of the desired form iff k*(k+1) = r*s where 1 < r, r+1 < s, and r and s have opposite parity. If k is even, let k = 2^e*m with m odd and let p be a prime divisor of k+1. Then we may take r = 2^e and s = m*(k+1) unless m=1 and we may take r = (k+1)/p and s = k*p unless k+1 is prime. Thus an even number k is in the sequence iff k+1 is a Fermat prime. Similarly an odd number k is in the sequence iff k=1 or k is a Mersenne prime.
Indices of partial maxima of A082184. - Ralf Stephan, Sep 01 2004
Consists of 1 and numbers m such that A001227(m) + A001227(m+1) = 3. - Juri-Stepan Gerasimov, Oct 06 2023

Examples

			k=6 gives 21, which has the 2 representations 1+2+...+6 and 10+11, so 6 is not in the sequence.
k=4 gives 10, whose only representation is 1+2+3+4, so 4 is in the sequence.
		

Crossrefs

A134459 is an essentially identical sequence.

Programs

  • Magma
    [1] cat [m: m in [2..10000] | #Divisors(m)/Valuation(2*m, 2)+
    #Divisors(m+1)/Valuation(2*(m+1),2) eq 3]; // Juri-Stepan Gerasimov, Oct 06 2023

Extensions

Edited by Dean Hickerson, Feb 22 2002

A332547 a(n) = largest odd divisor d < n of n*(n+1)/2.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 1, 3, 5, 5, 3, 3, 7, 7, 5, 1, 9, 9, 5, 15, 11, 11, 3, 15, 13, 13, 21, 7, 15, 15, 1, 11, 17, 17, 21, 9, 19, 19, 15, 5, 21, 21, 11, 33, 23, 23, 3, 21, 35, 25, 39, 13, 27, 45, 35, 21, 29, 29, 15, 15, 31, 31, 21, 13, 55, 33, 17, 51, 35, 35
Offset: 1

Views

Author

N. J. A. Sloane, Feb 21 2020

Keywords

Comments

Used by Michael J. Collins in the analysis of A082183 and A082184.

Crossrefs

Cf. A000217, A068194 (where a(n)=1), A082183, A082184, A332548, A332549 (where a(n)=3).

Programs

  • Mathematica
    Join[{1},Table[Select[Divisors[(n(n+1))/2],OddQ[#]&&#Harvey P. Dale, Jul 16 2024 *)

A068195 Numbers of the form n(n+1)/2 whose only representation as a sum of 2 or more consecutive positive integers is 1+2+...+n.

Original entry on oeis.org

1, 3, 6, 10, 28, 136, 496, 8128, 32896, 33550336, 2147516416, 8589869056, 137438691328, 2305843008139952128, 2658455991569831744654692615953842176
Offset: 1

Views

Author

Jon Perry, Feb 19 2002

Keywords

Comments

Consists of 1, even perfect numbers and numbers of the form n(n+1)/2 where n+1 is a Fermat prime. (See A068194 for proof.)

Crossrefs

Record values in A082184.

Extensions

Edited by Dean Hickerson, Feb 22 2002
Showing 1-6 of 6 results.