login
A108356
Count, repeating multiples of 3 four times, all other numbers twice.
2
1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 24, 24, 24, 24, 25, 25, 26, 26, 27, 27, 27, 27, 28, 28, 29, 29, 30
OFFSET
0,3
COMMENTS
Diagonal sums of number triangle A108358. Partial sums of A108357.
FORMULA
G.f.: (1+x^2+x^4)/(1-x-x^8+x^9).
a(n) = a(n-1) + a(n-8) - a(n-9).
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2*k} ((C(k, j)*C(n-k-j, k)*floor((j+2)/2)) mod 2).
G.f.: (1-x^6)/((1-x)(1-x^2)(1-x^8)).
Euler transform of length 8 sequence [ 1, 1, 0, 0, 0, -1, 0, 1]. - Michael Somos, Aug 31 2006
a(n) = floor(n/2) - floor((n+2)/8) + 1. - Ridouane Oudra, Sep 08 2023
MAPLE
seq(floor(n/2) - floor((n+2)/8) + 1, n=0..60); # Ridouane Oudra, Sep 08 2023
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 1, 2, 2, 3, 3, 3, 3, 4}, 80] (* Harvey P. Dale, Oct 06 2017 *)
PROG
(PARI) {a(n)=if(n<0, 0, polcoeff( (x^4+x^2+1)/(x^9-x^8-x+1)+x*O(x^n), n))} /* Michael Somos, Aug 31 2006 */
CROSSREFS
Sequence in context: A356005 A262869 A342678 * A239499 A241139 A294242
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 31 2005
STATUS
approved