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!)
A080343 a(n) = round(sqrt(2*n)) - floor(sqrt(2*n)). 3

%I #11 Aug 19 2016 04:33:38

%S 0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,

%T 0,0,0,1,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,1,

%U 1,1,1,1,0,0,0,0,0,0,0,1,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

%N a(n) = round(sqrt(2*n)) - floor(sqrt(2*n)).

%H Chai Wah Wu, <a href="/A080343/b080343.txt">Table of n, a(n) for n = 0..10000</a>

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

%F a(n) = 1 iff n >= 4 and n is in the interval [t_k + 1, ..., t_k + floor(k/2)] for some k >= 2, where t_k = k*(k+1)/2 is a triangular number.

%F a(n) = A023969(2*n). - _Michel Marcus_, Aug 19 2016

%o (Python)

%o from gmpy2 import isqrt_rem

%o def A080343(n):

%o i, j = isqrt_rem(2*n)

%o return int(4*(j-i) >= 1) # _Chai Wah Wu_, Aug 16 2016

%Y Cf. A023969, A080352.

%K nonn

%O 0,1

%A _N. J. A. Sloane_, Mar 20 2003

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 July 17 04:55 EDT 2024. Contains 374360 sequences. (Running on oeis4.)