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.

A131372 Period 7: repeat [1, -1, 0, 1, 0, -1, 1].

This page as a plain text file.
%I A131372 #17 Dec 12 2023 09:24:55
%S A131372 1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,
%T A131372 0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,
%U A131372 0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1,1,-1,0,1,0,-1,1
%N A131372 Period 7: repeat [1, -1, 0, 1, 0, -1, 1].
%H A131372 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,1).
%F A131372 From _Wesley Ivan Hurt_, Dec 23 2016: (Start)
%F A131372 G.f.: (1 - x + x^3 - x^5 + x^6)/(1 - x^7).
%F A131372 a(n) = a(n-7) for all n in Z.
%F A131372 a(n) = 1 - floor((1-n)/7) + floor((3-n)/7) - floor((5-n)/7) + floor((6-n)/7) + floor((7-n)/7) + floor((n-7)/7) + floor((n-6)/7) - floor((n-5)/7) + floor((n-3)/7) - floor((n-1)/7). (End)
%F A131372 G.f.: 1 / (1 + x / (1 - x / (1 + x / (1 - x / (1 - x^2 / (1 + x^4 / (1 + x^3))))))). - _Michael Somos_, Dec 26 2016
%F A131372 a(n) = (-1)^(mod(mod(n, 7), 3)>0) * A098457(n+1). - _Michael Somos_, Dec 26 2016
%e A131372 G.f. = 1 - x + x^3 - x^5 + x^6 + x^7 - x^8 + x^10 - x^12 + x^13 + x^14 + ...
%p A131372 A131372:=n->[1, -1, 0, 1, 0, -1, 1][(n mod 7)+1]: seq(A131372(n), n=0..100); # _Wesley Ivan Hurt_, Dec 23 2016
%t A131372 PadRight[{}, 100, {1, -1, 0, 1, 0, -1, 1}] (* _Wesley Ivan Hurt_, Dec 23 2016 *)
%o A131372 (PARI) a(n)=[1, -1, 0, 1, 0, -1, 1][n%7+1] \\ _Charles R Greathouse IV_, Jul 13 2016
%o A131372 (Magma) &cat [[1, -1, 0, 1, 0, -1, 1]^^20]; // _Wesley Ivan Hurt_, Dec 23 2016
%Y A131372 Cf. A098457, A242062.
%K A131372 sign,easy
%O A131372 0,1
%A A131372 _Paul Curtz_, Oct 01 2007