cp's OEIS Frontend

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.

A130198 Single paradiddle. In percussion, the paradiddle is a four-note drum sticking pattern consisting of two alternating notes followed by two notes on the same hand.

This page as a plain text file.
%I A130198 #42 Sep 21 2024 07:29:21
%S A130198 0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,
%T A130198 0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,
%U A130198 1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1
%N A130198 Single paradiddle. In percussion, the paradiddle is a four-note drum sticking pattern consisting of two alternating notes followed by two notes on the same hand.
%C A130198 Also the binary expansion of the constant 5/17 = 2^(-2) + 2^(-5) + 2^(-7) + ... - _R. J. Mathar_, Mar 27 2009
%C A130198 Period 8: repeat [0, 1, 0, 0, 1, 0, 1, 1]. - _Wesley Ivan Hurt_, Aug 23 2015
%H A130198 Wikipedia, <a href="http://en.wikipedia.org/wiki/Paradiddle">Paradiddle</a>
%H A130198 <a href="/index/Mu#music">Index entries for sequences related to music</a>
%H A130198 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,-1,1).
%F A130198 From _R. J. Mathar_, Mar 27 2009: (Start)
%F A130198 a(n) = a(n-8) = a(n-1) - a(n-4) + a(n-5).
%F A130198 G.f.: -x*(1+x^3-x)/((x-1)*(1+x^4)). (End)
%F A130198 a(n) = (1-(-1)^((n+5)*(n+6)*(n^2+11*n+32)/8))/2. - _Wesley Ivan Hurt_, Aug 23 2015
%F A130198 a(n) = A165211(n+5). - _Wesley Ivan Hurt_, Aug 23 2015
%p A130198 A130198:= n -> [0, 1, 0, 0, 1, 0, 1, 1][(n mod 8)+1]: seq(A130198(n), n=0..100); # _Wesley Ivan Hurt_, Aug 23 2015
%t A130198 CoefficientList[Series[x*(1 - x + x^3)/((1 - x)*(1 + x^4)), {x, 0, 30}], x] (* _Wesley Ivan Hurt_, Aug 23 2015 *)
%o A130198 (PARI) a(n)=((n%8>3)+(n%4==1))%2 \\ _Jaume Oliver Lafont_, Mar 19 2009
%o A130198 (PARI) a(n)=210\2^(n%8)%2; \\ _Jaume Oliver Lafont_, Mar 24 2009
%o A130198 (PARI) apply( A130198(n)=bittest(210,n%8), [0..99]) \\ _M. F. Hasler_, May 24 2019
%o A130198 (Magma) [(1-(-1)^((n+5)*(n+6)*(n^2+11*n+32) div 8))/2 : n in [0..100]]; // _Wesley Ivan Hurt_, Aug 23 2015
%o A130198 (Python)
%o A130198 def A130198(n): return n&1^bool(n+1&4) # _Chai Wah Wu_, Aug 30 2024
%Y A130198 Cf. A121262, A131078. - _Jaume Oliver Lafont_, Mar 19 2009
%Y A130198 Cf. A165211.
%K A130198 nonn,easy
%O A130198 0,1
%A A130198 _Simone Severini_, May 16 2007