This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A026430 #54 Oct 22 2024 10:08:01 %S A026430 0,1,3,5,6,8,9,10,12,14,15,16,18,19,21,23,24,26,27,28,30,31,33,35,36, %T A026430 37,39,41,42,44,45,46,48,50,51,52,54,55,57,59,60,61,63,65,66,68,69,70, %U A026430 72,73,75,77,78,80,81,82,84,86,87,88,90,91,93 %N A026430 a(n) is the sum of first n terms of A001285 (Thue-Morse sequence). %H A026430 Winston de Greef, <a href="/A026430/b026430.txt">Table of n, a(n) for n = 0..10000</a> (first 1001 terms from T. D. Noe) %H A026430 Nicholas John Bizzell-Browning, <a href="https://bura.brunel.ac.uk/handle/2438/29960">LIE scales: Composing with scales of linear intervallic expansion</a>, Ph. D. Thesis, Brunel Univ. (UK, 2024). See p. 143. %F A026430 a(0)=0, a(1)=1, a(2n) = 3n, a(2n+1) = -a(n) + a(n+1) + 3n. - _Ralf Stephan_, Oct 08 2003 %F A026430 G.f.: x*(3/(1 - x)^2 - Product_{k>=1} (1 - x^(2^k)))/2. - _Ilya Gutkovskiy_, Apr 03 2019 %t A026430 A001285 = Table[ Mod[ Sum[ Mod[ Binomial[n, k], 2], {k, 0, n}], 3], {n, 0, 61}]; Accumulate[A001285] (* _Jean-François Alcover_, Sep 25 2012 *) %t A026430 Join[{0}, Accumulate[1 + ThueMorse /@ Range[0, 100]]] (* _Jean-François Alcover_, Sep 18 2019, from version 10.2 *) %o A026430 (Haskell) %o A026430 a026430 n = a026430_list !! n %o A026430 a026430_list = scanl (+) 0 a001285_list -- _Reinhard Zumkeller_, Jun 28 2013 %o A026430 (PARI) first(n)=my(v=vector(n)); v[1]=1; for(k=2,n,v[k]=if(k%2,v[k\2+1]-v[k\2])+k\2*3); concat(0,v) \\ _Charles R Greathouse IV_, May 09 2016 %o A026430 (Python) %o A026430 from itertools import accumulate, islice %o A026430 def A026430_gen(): # generator of terms %o A026430 yield from (0,1) %o A026430 blist, s = [1], 1 %o A026430 while True: %o A026430 c = [3-d for d in blist] %o A026430 blist += c %o A026430 yield from (s+d for d in accumulate(c)) %o A026430 s += sum(c) %o A026430 A026430_list = list(islice(A026430_gen(),30)) # _Chai Wah Wu_, Feb 22 2023 %o A026430 (Python) %o A026430 def A026430(n): return n+(n-1>>1)+(n-1&1|(n.bit_count()&1^1)) # _Chai Wah Wu_, Mar 01 2023 %Y A026430 Cf. A001285, A356133 (complement). %Y A026430 Cf. A115384. %K A026430 nonn,nice %O A026430 0,3 %A A026430 _Clark Kimberling_