login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179820 a(n) = n-th triangular number mod (n+2). 1
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(0)=0, afterwards if n is odd then a(n)=1 else a(n)=(n+4)/2
a(0)=0, afterwards a(n)=1 for odd n and n/2+2 for even n.
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]
MATHEMATICA
Table[Mod[n(n+1)/2, n+2], {n, 0, 200}]
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 *)
CROSSREFS
Essentially the same as A133622.
Sequence in context: A324542 A349042 A302792 * A364098 A363521 A166050
KEYWORD
nonn,easy
AUTHOR
Zak Seidov, Jul 28 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 03:30 EDT 2024. Contains 371906 sequences. (Running on oeis4.)