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!)
A161382 (0,1)-sequence where n-th run has length n^2. 2

%I #7 Jul 06 2016 09:37:07

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

%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0

%N (0,1)-sequence where n-th run has length n^2.

%C a(n) = A161385(n) - 1. - _Reinhard Zumkeller_, Aug 10 2014

%H Reinhard Zumkeller, <a href="/A161382/b161382.txt">Table of n, a(n) for n = 1..10000</a>

%t Table[{Table[0,n^2],Table[1,(n+1)^2]},{n,1,7,2}]//Flatten (* _Harvey P. Dale_, Jul 06 2016 *)

%o (Haskell)

%o a161382 n = a161382_list !! (n-1)

%o a161382_list = concatMap (\x -> replicate (x ^ 2) (1 - mod x 2)) [1..]

%o -- _Reinhard Zumkeller_, Aug 10 2014

%Y Cf. A161385.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Nov 29 2009

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 8 02:29 EDT 2024. Contains 372317 sequences. (Running on oeis4.)