|
|
A130481
|
|
a(n) = Sum_{k=0..n} (k mod 3) (i.e., partial sums of A010872).
|
|
31
|
|
|
0, 1, 3, 3, 4, 6, 6, 7, 9, 9, 10, 12, 12, 13, 15, 15, 16, 18, 18, 19, 21, 21, 22, 24, 24, 25, 27, 27, 28, 30, 30, 31, 33, 33, 34, 36, 36, 37, 39, 39, 40, 42, 42, 43, 45, 45, 46, 48, 48, 49, 51, 51, 52, 54, 54, 55, 57, 57, 58, 60, 60, 61, 63, 63, 64, 66, 66, 67, 69, 69, 70, 72, 72
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 3, A[i,i]:=1, A[i,i-1]=-1. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 24 2010
Conjecture: a(n) is the exponent of the largest power of 2 that divides all the entries of the matrix {{3,1},{1,-1}}^n. - Greg Dresden, Sep 09 2018
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(1 + 2*x)/((1-x^3)*(1-x)).
a(n) = n + 1 - (Fibonacci(n+1) mod 2). - Gary Detlefs, Mar 13 2011
a(n) = n when n+1 is not a multiple of 3, and a(n) = n+1 when n+1 is a multiple of 3. - Dennis P. Walsh, Aug 06 2012
a(n) = n + (1-cos(2*(n+2)*Pi/3))/3 + sin(2*(n+2)*Pi/3)/sqrt(3). - Wesley Ivan Hurt, Sep 27 2017
E.g.f.: ((1 + 3*x)*cosh(x) - (cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))*(cosh(x/2) - sinh(x/2)) + (1 + 3*x)*sinh(x))/3. - Stefano Spezia, May 28 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) + log(2)/3. - Amiram Eldar, Sep 17 2022
|
|
MAPLE
|
seq(coeff(series(x*(1+2*x)/((1-x^3)*(1-x)), x, n+1), x, n), n = 0..80); # G. C. Greubel, Aug 31 2019
|
|
MATHEMATICA
|
a[n_]:= Floor[(n+1)/3] + Floor[2(n+1)/3]; Table[a[n], {n, 0, 80}] (* Clark Kimberling, May 28 2012 *)
a[n_]:= IntegerExponent[A104537[n + 1], 2];
CoefficientList[Series[x(1+2x)/((1-x^3)(1-x)), {x, 0, 80}], x] (* Stefano Spezia, Sep 09 2018 *)
LinearRecurrence[{1, 0, 1, -1}, {0, 1, 3, 3}, 100] (* Harvey P. Dale, Jun 14 2021 *)
|
|
PROG
|
(PARI) main(size)=my(n, k); vector(size, n, sum(k=0, n, k%3)) \\ Anders Hellström, Jul 14 2015
(Magma) [Floor((n+1)/3) + Floor(2*(n+1)/3): n in [0..80]]; // G. C. Greubel, Aug 31 2019
(Sage)
P.<x> = PowerSeriesRing(ZZ, prec)
return P(x*(1+2*x)/((1-x^3)*(1-x))).list()
(GAP) List([0..80], n-> Int((n+1)/3) + Int(2*(n+1)/3)); # G. C. Greubel, Aug 31 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|