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!)
A308085 a(n) is the least positive number k such that n*(n-1)/2 + k*(k-1)/2 is a square. 1

%I #38 Jun 28 2019 08:42:02

%S 1,1,2,3,4,2,6,7,1,9,10,6,3,13,14,2,16,17,18,4,6,21,3,23,24,9,5,27,13,

%T 4,30,31,2,6,34,35,5,37,38,16,7,30,23,6,44,20,46,8,16,1,7,51,12,53,9,

%U 42,23,8,58,59,60,10,27,63,9,65,20,67,11,69,6,10,72,3,44,12,21,77,11,34,80,46

%N a(n) is the least positive number k such that n*(n-1)/2 + k*(k-1)/2 is a square.

%C a(n) <= n-1 if n > 1, because (n-1)*(n-2)/2 + n*(n-1)/2 = (n-1)^2.

%C a(7*k+2) <= k and a(7*k+6) <= k+2, because (7*k+2)*(7*k+1)/2 + k*(k-1)/2 = (5*k+1)^2 and (7*k+6)*(7*k+5)/2 + (k+2)*(k+1)/2 = (5*k+4)^2.

%C From _Bernard Schott_, Jun 27 2019: (Start)

%C a(m) = 1 iff the triangular number t(m-1) = (m-1)*m/2 is a square, so iff m-1 is in A001108, or m in A055997.

%C a(m) = 2 iff the triangular number t(m-1) + 1 is a square, so iff m-1 is in A006451. (End)

%H Robert Israel, <a href="/A308085/b308085.txt">Table of n, a(n) for n = 1..10000</a>

%e a(5) = 4 because 4*3/2 + 5*4/2 = 4^2 and none of 1*0/2 + 5*4/2, 2*1/2 + 5*4/2, 3*2/2 + 5*4/2 are squares.

%p f:= proc(n) local k;

%p for k from 1 do

%p if issqr((k*(k-1)+n*(n-1))/2) then return k fi

%p od

%p end proc:

%p map(f, [$1..100]);

%o (PARI) a(n) = {my(k=1); while (!issquare(n*(n-1)/2 + k*(k-1)/2), k++); k;} \\ _Michel Marcus_, Jun 27 2019

%Y Cf. A000217, A055997 (a(n)=1).

%K nonn,look

%O 1,3

%A _J. M. Bergot_ and _Robert Israel_, Jun 05 2019

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 August 28 23:11 EDT 2024. Contains 375508 sequences. (Running on oeis4.)