OFFSET
0,6
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Vladimir Baltić, Applications of the finite state automata for counting restricted permutations and variations, Yugoslav Journal of Operations Research, 22 (2012), Number 2, 183-198; alternative link. - From N. J. A. Sloane, Jan 02 2013
Index entries for linear recurrences with constant coefficients, signature (1,0,2,-2,0,-1,1).
FORMULA
From Paul Barry, Sep 14 2003: (Start)
Partial sums of A087509.
a(n+1) = Sum_{j=0..n} Sum_{k=0..j} [mod(j*k, 3)=2], where [] is the Iverson bracket. (End)
Empirical g.f.: -x^3*(x^2+1) / ((x-1)^3*(x^2+x+1)^2). - Colin Barker, Mar 31 2013
From Amiram Eldar, May 10 2025: (Start)
Sum_{n>=3} 1/a(n) = Pi^2/3 + 1.
Sum_{n>=3} (-1)^(n+1)/a(n) = 2*log(2)-1. (End)
MATHEMATICA
Table[Floor[n/3]Floor[(n+1)/3], {n, 0, 100}] (* Harvey P. Dale, Sep 21 2024 *)
(* Alternative: *)
LinearRecurrence[{1, 0, 2, -2, 0, -1, 1}, {0, 0, 0, 1, 1, 2, 4}, 100] (* Harvey P. Dale, Sep 21 2024 *)
PROG
(Magma) [Floor(n/3)*Floor((n+1)/3): n in [0..60]]; // Vincenzo Librandi, Aug 20 2011
(Haskell)
a008133 n = a008133_list !! n
a008133_list = zipWith (*) (tail ts) ts where ts = map (`div` 3) [0..]
-- Reinhard Zumkeller, Oct 09 2011
(PARI) a(n) = floor(n/3)*floor((n+1)/3); /* Joerg Arndt, Mar 31 2013 */
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
STATUS
approved
