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.

A152832 a(0) = -2; a(n) = n - a(n-1) for n > 0.

This page as a plain text file.
%I A152832 #19 Apr 23 2024 06:58:51
%S A152832 -2,3,-1,4,0,5,1,6,2,7,3,8,4,9,5,10,6,11,7,12,8,13,9,14,10,15,11,16,
%T A152832 12,17,13,18,14,19,15,20,16,21,17,22,18,23,19,24,20,25,21,26,22,27,23,
%U A152832 28,24,29,25,30,26,31,27,32,28,33,29,34,30,35,31,36,32,37,33,38,34,39,35
%N A152832 a(0) = -2; a(n) = n - a(n-1) for n > 0.
%H A152832 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,-1).
%F A152832 From _R. J. Mathar_, Jan 03 2009, Aug 14 2009: (Start)
%F A152832 a(n) = (n+1)/2-(9*(-1)^n+1)/4.
%F A152832 G.f.: -(2*x-1)*(x-2)/((1+x)*(x-1)^2).
%F A152832 a(n) = a(n-1)+a(n-2)-a(n-3). (End)
%t A152832 lst={};a=2;Do[a=n-a;AppendTo[lst,a],{n,0,6!}];lst
%t A152832 RecurrenceTable[{a[0]==-2,a[n]==n-a[n-1]},a,{n,80}] (* or *) With[ {nn=40}, Riffle[ Range[-2,nn-2],Range[3,nn+3]]] (* _Harvey P. Dale_, Jun 02 2019 *)
%Y A152832 Cf. A084964
%K A152832 sign,easy
%O A152832 0,1
%A A152832 _Vladimir Joseph Stephan Orlovsky_, Dec 14 2008
%E A152832 Definition corrected by _N. J. A. Sloane_, Jan 11 2009
%E A152832 Formula adapted to offset by _R. J. Mathar_, Aug 14 2009