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).

This page as a plain text file.
%I A061800 #34 Jan 16 2025 02:37:58
%S A061800 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,
%T A061800 27,28,27,30,31,30,33,34,33,36,37,36,39,40,39,42,43,42,45,46,45,48,49,
%U A061800 48,51,52,51,54,55,54,57,58,57,60,61,60,63,64,63,66,67,66,69,70,69,72
%N A061800 a(n) = n + (-1)^(n mod 3).
%C A061800 The arithmetic function v_3(n,1) as defined in A289187. - _Robert Price_, Aug 22 2017; corrected by _Ridouane Oudra_, Dec 28 2024
%H A061800 Harry J. Smith, <a href="/A061800/b061800.txt">Table of n, a(n) for n=0..1000</a>
%H A061800 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).
%F A061800 O.g.f.: (1-x+3*x^2)/((-1+x)^2*(1+x+x^2)). - _R. J. Mathar_, Apr 02 2008
%F A061800 a(n) = (3*n + 1 - 4*cos(2*(n+2)*Pi/3))/3. - _Wesley Ivan Hurt_, Sep 26 2017
%F A061800 a(n) = a(n-1) + a(n-3) - a(n-4) for n > 3. - _Wesley Ivan Hurt_, Oct 07 2017
%F A061800 a(n) = n + 2 - gcd(n+2,3). - _Ridouane Oudra_, Dec 28 2024
%F A061800 Sum_{n>=2} (-1)^n/a(n) = Pi/(3*sqrt(3)) + log(2) - 1. - _Amiram Eldar_, Jan 15 2025
%e A061800 a(4) = 4 + (-1)^1 = 3.
%p A061800 A061800:=n->n+(-1)^(n mod 3): seq(A061800(n), n=0..150); # _Wesley Ivan Hurt_, Oct 07 2017
%t A061800 Table[n + (-1)^Mod[n, 3], {n, 0, 80}] (* _Vincenzo Librandi_, Aug 23 2017 *)
%o A061800 (PARI) a(n) = { n + (-1)^(n%3) } \\ _Harry J. Smith_, Jul 28 2009
%o A061800 (Magma) [n+(-1)^(n mod 3): n in [0..80]]; // _Vincenzo Librandi_, Aug 23 2017
%Y A061800 Cf. A004442, A014681, A289187.
%K A061800 easy,nonn
%O A061800 0,3
%A A061800 _Olivier Gérard_, Jun 22 2001