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!)
A111102 Cumulative sum of squares of Kolakoski sequence (A000002). 1

%I #13 Dec 30 2019 13:27:14

%S 1,5,9,10,11,15,16,20,24,25,29,33,34,35,39,40,41,45,49,50,54,55,56,60,

%T 61,65,69,70,71,75,76,77,81,82,86,90,91,95,99,100,101,105,106,110,114,

%U 115,119,120,121,125,126,127,131,135,136,140,144,145,146,150,151,155,159,160,164,168,169,170,174

%N Cumulative sum of squares of Kolakoski sequence (A000002).

%C a(n) is prime for n = 2, 5, 11, 17, 25, 29. a(n) is semiprime for n = 3, 4, 6, 10, 12, 13, 14, 15, 19, 22, 26, 27. a(n) is a perfect square for n = 1, 3, 7, 10, 19.

%H G. C. Greubel, <a href="/A111102/b111102.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = Sum_{i=1..n} A000002(i)^2.

%t A000002[n_]:= If[n<3, Max[0, n], Module[{an = {1,2,2}, m = 3}, While[Length[an] < n, an = Join[an, Table[Mod[m, 2, 1], {an[[m]]}]]; m++]; an[[n]]]]; Table[Sum[A000002[j]^2, {j, n}], {n, 1, 70}] (* _G. C. Greubel_, Dec 18 2019; Somos code of A000002 *)

%Y Cf. A000002.

%K easy,nonn

%O 1,2

%A _Jonathan Vos Post_, Oct 13 2005

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 August 20 03:42 EDT 2024. Contains 375310 sequences. (Running on oeis4.)