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.

A177219 a(1) = 1; a(2n) = -a(n); a(2n+1) = -a(n) + a(n+1).

This page as a plain text file.
%I A177219 #21 Mar 28 2025 17:35:02
%S A177219 1,-1,-2,1,-1,2,3,-1,-2,1,3,-2,1,-3,-4,1,-1,2,3,-1,2,-3,-5,2,3,-1,-4,
%T A177219 3,-1,4,5,-1,-2,1,3,-2,1,-3,-4,1,3,-2,-5,3,-2,5,7,-2,1,-3,-4,1,-3,4,7,
%U A177219 -3,-4,1,5,-4,1,-5,-6,1,-1,2,3,-1,2,-3,-5,2,3,-1,-4,3,-1,4,5,-1
%N A177219 a(1) = 1; a(2n) = -a(n); a(2n+1) = -a(n) + a(n+1).
%H A177219 J.-P. Allouche and M. Mendès France, <a href="http://arxiv.org/abs/1202.0211">Stern-Brocot polynomials and power series</a>, arXiv preprint arXiv:1202.0211 [math.NT], 2012. - From _N. J. A. Sloane_, May 10 2012
%F A177219 Let M = an infinite lower triangular matrix with (1, -1, -1, 0, 0, 0,...) in every column, shifted down twice for columns k >1. Then the sequence is the left-shifted vector of Lim_{n->inf} M^n.
%F A177219 G.f.: x*Product_{k>=0} (1 - x^(2^k) - x^(2^(k + 1))). - _Ilya Gutkovskiy_, Aug 30 2017
%e A177219 a(6) = 2 = (-1)*a(3) = (-1)*(-2). a(7) = 3 = (-1)*a(3) + a(4) = (-1)*(-2) + 1.
%p A177219 A177219 := proc(n)
%p A177219     local npr ;
%p A177219     npr := floor(n/2) ;
%p A177219     if n = 1 then
%p A177219         1;
%p A177219     elif type(n,'even') then
%p A177219         -procname(npr) ;
%p A177219     else
%p A177219         -procname(npr)+procname(npr+1) ;
%p A177219     end if;
%p A177219 end proc: # _R. J. Mathar_, Mar 14 2014
%t A177219 a[1] = 1; a[n_] := a[n] = If[EvenQ[n], -a[n/2], -a[(n-1)/2]+a[(n-1)/2+1]];
%t A177219 Array[a, 80] (* _Jean-François Alcover_, Nov 24 2017 *)
%K A177219 sign,easy
%O A177219 1,3
%A A177219 _Gary W. Adamson_, May 04 2010