cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A083752 Minimal k > n such that (4k+3n)(4n+3k) is a square.

Original entry on oeis.org

393, 786, 1179, 109, 1965, 2358, 2751, 218, 3537, 3930, 4323, 327, 132, 5502, 5895, 436, 6681, 7074, 7467, 545, 8253, 8646, 9039, 157, 9825, 264, 10611, 763, 11397, 11790, 12183, 872, 481, 13362, 13755, 981, 184, 14934, 396, 1090, 16113, 16506, 16899, 1199
Offset: 1

Views

Author

Zak Seidov, Jun 17 2003

Keywords

Comments

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.
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

Examples

			a(24)=157 because (4*157+3*24)(3*157+4*24)= 396900=630*630.
		

Crossrefs

Programs

  • Haskell
    a083752 n = head [k | k <- [n+1..], a010052 (12*(k+n)^2 + k*n) == 1]
    -- Reinhard Zumkeller, Apr 06 2015
  • Maple
    a:= proc(n) local k; for k from n+1
          while not issqr((4*k+3*n)*(4*n+3*k)) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Dec 13 2013
  • Mathematica
    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 *)
  • 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
    
  • PARI
    diff(v)=vector(#v-1,i,v[i+1]-v[i])
    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
    
  • 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
    
  • Sage
    def a(n):
        k = n + 1
        while not is_square((4*k+3*n)*(4*n+3*k)):
            k += 1
        return k
    [a(n) for n in (1..44)] # Peter Luschny, Jun 25 2014
    

Formula

(4a(n)+3n)(4n+3a(n)) is a square.
n < a(n) <= 393n. - Charles R Greathouse IV, Dec 13 2013

Extensions

a(12) corrected by Charles R Greathouse IV, Dec 13 2013