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!)
A277425 a(n) = sqrt(16*t^2 - 32*t + k^2 + 8*k - 8*k*t + 16), where t = ceiling(sqrt(n)) and k = t^2 - n. 1
0, 2, 3, 4, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, 8, 9, 10, 11, 12, 13, 14, 15, 16, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The equation 16*t^2 - 32*t + k^2 + 8*k - 8*k*t + 16 always produces a square, for any number n, with any t and k (i.e., t can be incremented and a corresponding k value is produced).
LINKS
FORMULA
a(n) ~ 2*sqrt(n). - Charles R Greathouse IV, Oct 14 2016
a(n) = n - (floor(sqrt(n-1))-1)^2. - Charles R Greathouse IV, Oct 14 2016
a(n) = n - ceiling(sqrt(n) - 2)^2. - Vincenzo Librandi, Nov 06 2016
EXAMPLE
n = 3, f(n) = 3; n = 11, f(n) = 7; n = 64, f(n) = 28; n = 103, f(n) = 22; n=208, f(n)= 39.
MAPLE
seq(n-ceil(sqrt(n)-2)^2, n = 1 .. 64); # Ridouane Oudra, Jun 11 2019
MATHEMATICA
Table[Function[t, Function[k, Sqrt[16 t^2 - 32 t + k^2 + 8 k - 8 k t + 16]][t^2 - n]]@ Ceiling@ Sqrt@ n, {n, 64}] (* or *)
Table[n - Ceiling[Sqrt[n] - 2]^2, {n, 64}] (* Michael De Vlieger, Nov 06 2016 *)
PROG
(PARI) a(n) = n - (sqrtint(n-1)-1)^2 \\ Charles R Greathouse IV, Oct 14 2016
(Magma) [n-Ceiling(Sqrt(n)-2)^2: n in [1..80]]; // Vincenzo Librandi, Nov 06 2016
CROSSREFS
Sequence in context: A069210 A195172 A367193 * A245335 A244230 A277814
KEYWORD
nonn,easy
AUTHOR
Joseph Foley, Oct 14 2016
STATUS
approved

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 April 16 11:08 EDT 2024. Contains 371711 sequences. (Running on oeis4.)