login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257217 A257213 - A003059, where A257213(n) = min{d>0 | floor(n/d) = floor(n/(d+1))}, A003059(n) = ceiling(sqrt(n)). 1
1, 1, 1, 0, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 1, 0, 2, 1, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 0, 0, 2, 2, 1, 1, 1, 0, 2, 1, 1, 1, 0, 0, 2, 2, 2, 1, 1, 1, 0, 3, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 1, 1, 1, 0, 3, 2, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 2, 1, 1, 1, 0, 3, 2, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,10

COMMENTS

One has a(n) <= a(n-1) except for n = k^2. The positive jumps occur exactly at the squares, cf. formula.

LINKS

Table of n, a(n) for n=0..85.

FORMULA

a(k^2-1) = 0 for k > 1. Proof: For n = k^2-1 = (k-1)(k+1), floor(n/k) = k-1 = n/(k+1) but n/(k-1) = k+1, thus A257213(n) = k = ceiling(sqrt(n)).

A257213(n) >= floor(sqrt(n))+1 = A257213(n+1) >= A257213(n) = ceiling(sqrt(n)), with strict inequality (in the second relation) when n is a square. Therefore a(n) >= 1 for all n = k^2.

a(k^2) >= d when k > d(d-1). Proof: This follows from k^2/(k+d) = k-d+d^2/(k+d), which shows that a(k) >= d when k > d(d-1).

MATHEMATICA

f[n_] := Block[{d, k}, Reap@ For[k = 0, k <= n, k++, d = 1; While[Floor[k/d] != Floor[k/(d + 1)], d++]; Sow[d - Ceiling[Sqrt@ k]]] // Flatten // Rest]; f@ 85 (* Michael De Vlieger, Apr 18 2015 *)

PROG

(PARI) A257217(n)=A257213(n)-A003059(n)

CROSSREFS

Cf. A003059, A257213.

Sequence in context: A114643 A038498 A319510 * A184154 A284441 A257992

Adjacent sequences:  A257214 A257215 A257216 * A257218 A257219 A257220

KEYWORD

nonn

AUTHOR

M. F. Hasler, Apr 18 2015

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 April 20 02:06 EDT 2019. Contains 322291 sequences. (Running on oeis4.)