The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A038759 a(n) = ceiling(sqrt(n))*floor(sqrt(n)). 4
0, 1, 2, 2, 4, 6, 6, 6, 6, 9, 12, 12, 12, 12, 12, 12, 16, 20, 20, 20, 20, 20, 20, 20, 20, 25, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 36, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 49, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 64, 72, 72, 72, 72, 72, 72, 72 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) = n iff n is a square or a pronic (or heteromecic) number of form k(k+1). The sequence interleaves individual squares with 2k copies of each pronic.
LINKS
FORMULA
a(n) = A003059(n)*A000196(n) = n - A038760(n).
a(A002620(n)) = A002620(n). - Bernard Schott, Nov 06 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 (A072691). - Amiram Eldar, Dec 04 2022
EXAMPLE
a(31) = 30 since 6 and 5 are on either side of the square root of 31 and 6*5 = 30.
MATHEMATICA
a[n_] := Ceiling[Sqrt[n]]*Floor[Sqrt[n]]; Array[a, 70, 0] (* Amiram Eldar, Dec 04 2022 *)
PROG
(Python)
from math import isqrt
def A038759(n): return m+n+k if (m:=(k:=isqrt(n))**2-n) else n # Chai Wah Wu, Jul 28 2022
(PARI) a(n) = my(r, s=sqrtint(n, &r)); if(r, n-r+s, n); \\ Kevin Ryde, Jul 30 2022
CROSSREFS
Sequence in context: A118960 A107797 A316788 * A045999 A075569 A338276
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, May 03 2000
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 May 14 12:38 EDT 2024. Contains 372533 sequences. (Running on oeis4.)