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.

A179820 a(n) = n-th triangular number mod (n+2).

This page as a plain text file.
%I A179820 #17 Apr 02 2024 13:05:53
%S A179820 0,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,1,11,1,12,1,13,1,14,1,15,1,16,1,
%T A179820 17,1,18,1,19,1,20,1,21,1,22,1,23,1,24,1,25,1,26,1,27,1,28,1,29,1,30,
%U A179820 1,31,1,32,1,33,1,34,1,35,1,36,1,37,1,38,1,39,1,40,1,41,1,42,1,43,1,44,1,45
%N A179820 a(n) = n-th triangular number mod (n+2).
%H A179820 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).
%F A179820 a(0)=0, afterwards if n is odd then a(n)=1 else a(n)=(n+4)/2
%F A179820 a(0)=0, afterwards a(n)=1 for odd n and n/2+2 for even n.
%F A179820 a(n)= +2*a(n-2) -a(n-4), n>4. a(n) = (6+n*((-1)^n+1)+2*(-1)^n)/4, n>0. G.f.: -x*(-1-3*x+x^2+2*x^3) / ( (x-1)^2*(1+x)^2 ). [From _R. J. Mathar_, Aug 03 2010]
%t A179820 Table[Mod[n(n+1)/2,n+2],{n,0,200}]
%t A179820 LinearRecurrence[{0,2,0,-1},{0,1,3,1,4},110] (* or *) Join[{0,1},Riffle[Range[3,50],1]] (* _Harvey P. Dale_, Apr 02 2024 *)
%Y A179820 Cf. A000217, A057979, A007879, A158416.
%Y A179820 Essentially the same as A133622.
%K A179820 nonn,easy
%O A179820 0,3
%A A179820 _Zak Seidov_, Jul 28 2010