Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #47 Oct 31 2016 10:21:22
%S 393,786,1179,109,1965,2358,2751,218,3537,3930,4323,327,132,5502,5895,
%T 436,6681,7074,7467,545,8253,8646,9039,157,9825,264,10611,763,11397,
%U 11790,12183,872,481,13362,13755,981,184,14934,396,1090,16113,16506,16899,1199
%N Minimal k > n such that (4k+3n)(4n+3k) is a square.
%C A problem of elementary geometry lead to the search for squares of the form (4*a^2+3*b^2)(4*b^2+3*a^2). I could not find any such squares except when a=b. See link to ZS.
%C Letting j := 24k+25n in (4k+3n)(4n+3k)=x^2 yields the Pell-like equation j^2 - 48 x^2 = 49 n^2. The recurrence relationship for solutions to Pell equations implies that if k,x is a solution for n, then so is k1=18817k+19600n-5432x, x1=18817x-65184k-67900n. As a result, if there is a solution with 109/4n < k < 393n, then there is also one with n < k < 109/4n, so either n < a(n) <= 109/4n or a(n)=393n. - _David Applegate_, Jan 09 2014
%H Charles R Greathouse IV, <a href="/A083752/b083752.txt">Table of n, a(n) for n = 1..10000</a>
%H Zak Seidov, <a href="/A083752/a083752.pdf">Two "triangles" in a right triangle</a> [Cached copy, pdf file, with permission]
%F (4a(n)+3n)(4n+3a(n)) is a square.
%F n < a(n) <= 393n. - _Charles R Greathouse IV_, Dec 13 2013
%e a(24)=157 because (4*157+3*24)(3*157+4*24)= 396900=630*630.
%p a:= proc(n) local k; for k from n+1
%p while not issqr((4*k+3*n)*(4*n+3*k)) do od; k
%p end:
%p seq(a(n), n=1..50); # _Alois P. Heinz_, Dec 13 2013
%t a[n_] := For[k = n + 1, True, k++, If[IntegerQ[Sqrt[(4k+3n)(4n+3k)]], Return[k]]]; Table[an = a[n]; Print[an]; an, {n, 1, 50}] (* _Jean-François Alcover_, Oct 31 2016 *)
%o (PARI) a(n)=my(k=n+1); while(!issquare((4*k+3*n)*(4*n+3*k)), k++); k \\ _Charles R Greathouse IV_, Dec 13 2013
%o (PARI) diff(v)=vector(#v-1,i,v[i+1]-v[i])
%o a(n)=my(v=select(k->issquare(12*Mod(k,n)^2),[0..n-1])); forstep(k=n+v[1], 393*n, diff(concat(v,n)), if(issquare((4*k+3*n)*(4*n+3*k)) && k>n, return(k))) \\ _Charles R Greathouse IV_, Dec 13 2013
%o (PARI) a(n)=for(k=n+1, 109*n\4, if(issquare((4*k+3*n)*(4*n+3*k)), return(k))); 393*n \\ _Charles R Greathouse IV_, Jan 09 2014
%o (Sage)
%o def a(n):
%o k = n + 1
%o while not is_square((4*k+3*n)*(4*n+3*k)):
%o k += 1
%o return k
%o [a(n) for n in (1..44)] # _Peter Luschny_, Jun 25 2014
%o (Haskell)
%o a083752 n = head [k | k <- [n+1..], a010052 (12*(k+n)^2 + k*n) == 1]
%o -- _Reinhard Zumkeller_, Apr 06 2015
%Y Cf. A085018, A085019.
%Y Cf. A010052, A235188.
%K nonn
%O 1,1
%A _Zak Seidov_, Jun 17 2003
%E a(12) corrected by _Charles R Greathouse IV_, Dec 13 2013