A082183 Smallest k > 0 such that T(n) + T(k) = T(m), for some m, T(i) being the triangular numbers, n > 1.
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
Keywords
Links
- Chai Wah Wu, Table of n, a(n) for n = 2..10000
- J. S. Myers, R. Schroeppel, S. R. Shannon, N. J. A. Sloane, and P. Zimmermann, Three Cousins of Recaman's Sequence, arXiv:2004:14000 [math.NT], April 2020.
Crossrefs
A332554 is an upper bound on a(n).
See A055527 for a very similar sequence involving Pythagorean triples. - Bradley Klee, Feb 20 2020
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
Comments