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

Reinhard Zumkeller, Table of n, a(n) for n = 3..1000

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

KEYWORD

nonn

AUTHOR

Alex Ratushnyak, Mar 30 2014

EXTENSIONS

First PROG corrected by Colin Barker, Apr 04 2014

STATUS

approved