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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A023969 Round(sqrt(n)) - floor(sqrt(n)). 2
0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

First bit in fractional part of binary expansion of square root of n.

FORMULA

Runs are 0^1, 0^2 1, 0^3 1^2, 0^4 1^3, ...

a(n) = 1 iff n >= 3 and n is in the interval [k*(k+1) + 1, ..., k*(k+1) + k] for some k >= 1.

a(n) = floor(2*sqrt(n))-2*floor(sqrt(n)). [Mircea Merca, Jan 31 2012]

MATHEMATICA

Array[ Function[ n, RealDigits[ N[ Power[ n, 1/2 ], 10 ], 2 ]// (#[ [ 1, #[ [ 2 ] ]+1 ] ])& ], 110 ]

PROG

(PARI) a(n)=sqrtint(4*n)-2*sqrtint(n) \\ Charles R Greathouse IV, Jan 31 2012

CROSSREFS

Cf. A080343, A080344.

Sequence in context: A129251 A144602 A160351 * A060039 A107078 A163533

Adjacent sequences:  A023966 A023967 A023968 * A023970 A023971 A023972

KEYWORD

nonn

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Olivier Gerard (olivier.gerard(AT)gmail.com)

EXTENSIONS

Revised by N. J. A. Sloane (njas(AT)research.att.com), Mar 20 2003.

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 04:58 EST 2012. Contains 205985 sequences.