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.

A061800 a(n) = n + (-1)^(n mod 3).

Original entry on oeis.org

1, 0, 3, 4, 3, 6, 7, 6, 9, 10, 9, 12, 13, 12, 15, 16, 15, 18, 19, 18, 21, 22, 21, 24, 25, 24, 27, 28, 27, 30, 31, 30, 33, 34, 33, 36, 37, 36, 39, 40, 39, 42, 43, 42, 45, 46, 45, 48, 49, 48, 51, 52, 51, 54, 55, 54, 57, 58, 57, 60, 61, 60, 63, 64, 63, 66, 67, 66, 69, 70, 69, 72
Offset: 0

Views

Author

Olivier Gérard, Jun 22 2001

Keywords

Comments

The arithmetic function v_3(n,1) as defined in A289187. - Robert Price, Aug 22 2017; corrected by Ridouane Oudra, Dec 28 2024

Examples

			a(4) = 4 + (-1)^1 = 3.
		

Crossrefs

Programs

Formula

O.g.f.: (1-x+3*x^2)/((-1+x)^2*(1+x+x^2)). - R. J. Mathar, Apr 02 2008
a(n) = (3*n + 1 - 4*cos(2*(n+2)*Pi/3))/3. - Wesley Ivan Hurt, Sep 26 2017
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 3. - Wesley Ivan Hurt, Oct 07 2017
a(n) = n + 2 - gcd(n+2,3). - Ridouane Oudra, Dec 28 2024
Sum_{n>=2} (-1)^n/a(n) = Pi/(3*sqrt(3)) + log(2) - 1. - Amiram Eldar, Jan 15 2025