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!)
A320471 a(n) = floor(sqrt(n)) mod ceiling(sqrt(n)). 1
0, 1, 1, 0, 2, 2, 2, 2, 0, 3, 3, 3, 3, 3, 3, 0, 4, 4, 4, 4, 4, 4, 4, 4, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 9, 9, 9, 9, 9, 9, 9 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Sequence consists of zeros interleaved with the positive integers, each positive integer k appearing 2k times.

LINKS

Table of n, a(n) for n=1..87.

FORMULA

a(n) = A000196(n) - A037213(n).

a(n) = A000196(n)*A049240(n).

a(n) = A000196(n) mod A003059(n).

a(n) = (n - A173517(n)) - A037213(n)^2.

a(n) = binomial(ceiling(sqrt(n)),floor(sqrt(n))) - 1.

From David A. Corneth, Nov 04 2018: (Start)

a(k^2) = 0.

a(m) = floor(sqrt(m)) for nonsquare m. (End)

MAPLE

a:= proc(n) modp(floor(sqrt(n)), ceil(sqrt(n))) end: seq(a(n), n=1..100); # Muniru A Asiru, Oct 17 2018

MATHEMATICA

Array[Mod[Floor@ #, Ceiling@ #] &@ Sqrt@ # &, 99] (* or *)

Array[IntegerPart@ # - If[IntegerQ@ #, #, 0] &@ Sqrt@ # &, 99] (* or *)

Flatten@ Array[{0}~Join~ConstantArray[#, 2 #] &, 9] (* Michael De Vlieger, Oct 15 2018 *)

PROG

(PARI) a(n) = sqrtint(n) % (1+sqrtint(n-1)); \\ Michel Marcus, Nov 04 2018

(PARI) a(n) = sqrtint(n-1) * !issquare(n) \\ David A. Corneth, Nov 04 2018

[Binomial(Ceiling(Sqrt(n)), Floor(Sqrt(n))) - 1: n in [1..100]]; // Vincenzo Librandi, Dec 02 2018

CROSSREFS

Cf. A000196, A003059, A037213, A049240, A173517.

Sequence in context: A305629 A214664 A214666 * A333180 A127444 A241477

Adjacent sequences:  A320468 A320469 A320470 * A320472 A320473 A320474

KEYWORD

nonn

AUTHOR

Kritsada Moomuang, Oct 13 2018

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 May 16 18:05 EDT 2021. Contains 343949 sequences. (Running on oeis4.)