login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245474 a(n) = smallest positive integer s such that s*n - floor(sqrt(s*n))^2 is a square. 3
1, 1, 1, 3, 1, 1, 6, 7, 1, 1, 1, 11, 3, 1, 14, 3, 1, 1, 2, 19, 1, 21, 22, 23, 6, 1, 1, 3, 7, 1, 3, 31, 2, 33, 1, 35, 1, 1, 38, 6, 1, 2, 42, 43, 11, 1, 46, 47, 3, 1, 1, 3, 2, 1, 6, 55, 14, 57, 1, 59, 6, 2, 62, 7, 1, 1, 66, 67, 1, 69, 35, 71, 2, 1, 2, 3, 19 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

a(n) <= n for n > 0. If prime p == 3 (mod 4) then a(p) = p.

Conjecture: a(p) < p for prime p == 1 (mod 4).

Outline of proof of conjecture: write p = x^2 + y^2.  Since gcd(x,y) = 1, there are u,v with x*u + y*v = 1, u^2 + v^2 < y^2 + x^2 = p.  Taking s = u^2 + v^2, s*p = (u*y+v*x)^2 + 1^2, and |u*y+v*x| = floor(sqrt(s*p)). - Robert Israel, Aug 04 2014

For the first 100000 primes p == 1 (mod 4), a(p) < sqrt(p)/2. - Robert Israel, Aug 03 2014

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

MAPLE

A:= proc(n) local s, a;

     for s from 1 do

       a:= floor(sqrt(s*n));

       if issqr(s*n-a^2) then return s fi

     od

end proc:

seq(A(n), n=0..1000); # Robert Israel, Jul 23 2014

MATHEMATICA

a245474[n_Integer] := Catch[

  Do[

   If[IntegerQ[Sqrt[(s*n - Floor[Sqrt[s*n]]^2)]] == True, Throw[s]],

   {s, n}]

  ]; Map[a245474, Range[100]] (* Michael De Vlieger, Aug 03 2014 *)

PROG

(PARI) a(n) = s=1; while(!issquare(s*n-sqrtint(s*n)^2), s++); s \\ Colin Barker, Jul 23 2014

CROSSREFS

Cf. A145022, A145023.

Sequence in context: A143362 A182823 A210866 * A338369 A339231 A133713

Adjacent sequences:  A245471 A245472 A245473 * A245475 A245476 A245477

KEYWORD

nonn

AUTHOR

Thomas Ordowski, Jul 23 2014

EXTENSIONS

More terms from Colin Barker, Jul 23 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 3 22:03 EDT 2021. Contains 346441 sequences. (Running on oeis4.)