The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A239969 Least positive k such that triangular(n) + triangular(n+k) is a triangular number (A000217), or -1 if no such k exists. 2
2, 5, 1, 3, 20, 2, 4, 16, 3, 5, 31, 4, 6, 119, 5, 7, 16, 6, 8, 103, 7, 9, 2, 8, 10, 26, 9, 11, 464, 10, 12, 1, 11, 13, 313, 12, 5, 58, 13, 15, 37, 14, 3, 493, 15, 17, 31, 16, 18, 47, 17, 2, 79, 9, 20, 796, 19, 21, 883, 20, 22, 89, 4, 23, 58, 22, 24, 100, 23, 25, 1276 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
In other words, smallest solution k>0 to 4*k^2 + 8*(k + 1)*n + 8*n^2 + 4*k + 1 = m^2. - Ralf Stephan, Apr 01 2014
LINKS
EXAMPLE
a(3) = 2 because triangular(3)+triangular(3+2)=21 is a triangular number.
a(5) = 1 because triangular(5)+triangular(5+1)=36 is a triangular number.
In other words, k=a(3)=2 is the smallest positive solution to 4*k^2 + 28*k + 97 = m^2, and k=a(5)=1 is the smallest positive solution to 4*k^2 + 44*k + 241 = m^2.
PROG
(PARI) triangular(n) = n*(n+1)/2;
is_triangular(n) = issquare(8*n+1);
s=[]; for(n=3, 100, k=1; while(!is_triangular(triangular(n)+triangular(n+k)), k++); s=concat(s, k)); s \\ Colin Barker, Mar 31 2014
(Haskell)
a239969 n = head [k | k <- [1..],
a010054 (a000217 n + a000217 (n + k)) == 1]
-- Reinhard Zumkeller, Apr 03 2014
CROSSREFS
Cf. A010054.
Sequence in context: A269598 A100226 A121428 * A105686 A316131 A153726
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Mar 30 2014
EXTENSIONS
First PROG corrected by Colin Barker, Apr 04 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 19:53 EDT 2024. Contains 372607 sequences. (Running on oeis4.)