A004483 Tersum n + 2.
2, 0, 1, 5, 3, 4, 8, 6, 7, 11, 9, 10, 14, 12, 13, 17, 15, 16, 20, 18, 19, 23, 21, 22, 26, 24, 25, 29, 27, 28, 32, 30, 31, 35, 33, 34, 38, 36, 37, 41, 39, 40, 44, 42, 43, 47, 45, 46, 50, 48, 49, 53, 51, 52, 56, 54, 55, 59, 57, 58, 62, 60, 61, 65, 63, 64, 68, 66, 67
Offset: 0
References
- E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 76.
Links
- Andreas Dress, Achim Flammenkamp, and Norbert Pink, Additive periodicity of the Sprague-Grundy function of certain Nim games, Adv. Appl. Math., 22, p. 249-270 (1999).
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).
Programs
-
Mathematica
a[n_] := If[Divisible[n, 3], n+2, n-1]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Oct 25 2013 *) LinearRecurrence[{1,0,1,-1},{2,0,1,5},70] (* Harvey P. Dale, Feb 07 2018 *)
Formula
Periodic with period and saltus 3: a(n) = 3*floor(n/3) + ((n+2) mod 3).
a(n) = n + 2*cos(2*n*Pi/3). - Wesley Ivan Hurt, Sep 27 2017
From R. J. Mathar, Dec 14 2017: (Start)
G.f.: ( 2+x^2+2*x^3-2*x ) / ( (1+x+x^2)*(x-1)^2 ).
a(n) = n + A099837(n) if n > 0. (End)
Sum_{n>=2} (-1)^n/a(n) = 2*Pi/(3*sqrt(3)) + log(2)/3 - 1/2. - Amiram Eldar, Aug 21 2023
Extensions
Edited by N. J. A. Sloane at the suggestion of Philippe Deléham, Nov 20 2007
Comments