[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a131531 -id:a131531
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = A000045(n) + A131531(n+3).
+20
5
1, 1, 1, 1, 3, 5, 9, 13, 21, 33, 55, 89, 145, 233, 377, 609, 987, 1597, 2585, 4181, 6765, 10945, 17711, 28657, 46369, 75025, 121393, 196417, 317811, 514229, 832041, 1346269, 2178309, 3524577, 5702887, 9227465, 14930353, 24157817, 39088169
OFFSET
0,5
FORMULA
G.f.: (1-x^2+x^4)/((1+x)*(1-x+x^2)*(1-x-x^2)). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
MATHEMATICA
LinearRecurrence[{1, 1, -1, 1, 1}, {1, 1, 1, 1, 3}, 40] (* Jean-François Alcover, Aug 16 2017 *)
Table[Fibonacci@ n + Boole[Mod[n, 3] == 0] - 2 Boole[Mod[n, 6] == 3], {n, 0, 40}] (* Michael De Vlieger, Aug 16 2017 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1-x^2+x^4)/((1+x^3)*(1-x-x^2))) \\ G. C. Greubel, Jun 11 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x^2+x^4)/((1+x^3)*(1-x-x^2)) )); // G. C. Greubel, Jun 11 2019
(Sage) ((1-x^2+x^4)/((1+x^3)*(1-x-x^2))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Aug 03 2008
EXTENSIONS
Definition corrected by R. J. Mathar, Sep 16 2009
More terms from R. J. Mathar, Sep 27 2009
STATUS
approved
Array T(n,k) read by antidiagonals: the k-th term of the n-th difference of A131531.
+20
4
0, 0, 0, 1, 1, 1, 0, -1, -2, -3, 0, 0, 1, 3, 6, -1, -1, -1, -2, -5, -11, 0, 1, 2, 3, 5, 10, 21, 0, 0, -1, -3, -6, -11, -21, -42, 1, 1, 1, 2, 5, 11, 22, 43, 85, 0, -1, -2, -3, -5, -10, -21, -43, -86, -171, 0, 0, 1, 3, 6, 11, 21, 42, 85, 171, 342, -1, -1, -1, -2, -5, -11, -22, -43, -85, -170, -341, -683, 0, 1, 2, 3, 5, 10, 21, 43, 86, 171, 341, 682, 1365
OFFSET
0,9
COMMENTS
The array contains A131708(0) in diagonal 0, then -A024495(0..1) in diagonal 1, then A024493(0..2) in diagonal 2, then -A131708(0..3), then A024495(0..4), then -A024493(0..5).
FORMULA
T(0,k) = A131531(k). T(n,k) = T(n-1,k+1) - T(n-1,k), n > 0.
T(n,n) = A001045(n). T(n,n+1) = -A001045(n). T(n,n+2) = A078008(n).
T(n,0) = -T(n,3) = (-1)^(n+1)*A024495(n).
T(n,1) = (-1)^(n+1)*A131708(n).
T(n,2) = (-1)^n*A024493(n).
T(n,k+6) = T(n,k).
a(n) = A131708(0), -A024495(0,1), A024493(0,1,2), -A131708(0,1,2,3), A024495(0,1,2,3,4), -A024493(0,1,2,3,4,5).
EXAMPLE
The table starts in row n=0 with columns k >= 0 as:
0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0 A131531
0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1 A092220
1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2, 1, -1, 2, -1, 1, -2 A131556
-3, 3, -2, 3, -3, 2, -3, 3, -2, 3, -3, 2, -3, 3, -2, 3, -3, 2, -3 A164359
6, -5, 5, -6, 5, -5, 6, -5, 5, -6, 5, -5, 6, -5, 5, -6, 5, -5, 6, -5
-11, 10, -11, 11, -10, 11, -11, 10, -11, 11, -10, 11, -11, 10, -11
21, -21, 22, -21, 21, -22, 21, -21, 22, -21, 21, -22, 21, -21, 22
MAPLE
A131531 := proc(n) op((n mod 6)+1, [0, 0, 1, 0, 0, -1]) ; end proc:
A167613 := proc(n, k) option remember; if n= 0 then A131531(k); else procname(n-1, k+1)-procname(n-1, k) ; end if; end proc: # R. J. Mathar, Dec 17 2010
MATHEMATICA
nmax = 13;
A131531 = Table[{0, 0, 1, 0, 0, -1}, {nmax}] // Flatten;
T[n_] := T[n] = Differences[A131531, n];
T[n_, k_] := T[n][[k]];
Table[T[n-k, k], {n, 1, nmax}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 20 2023 *)
CROSSREFS
Cf. A167617 (antidiagonal sums).
KEYWORD
tabl,easy,sign
AUTHOR
Paul Curtz, Nov 07 2009
STATUS
approved
Expansion of x^3/(1 - 2*x + x^3 - 2*x^4) = x^3/( (1-2*x)*(1+x)*(1-x+x^2) ).
+10
26
0, 0, 0, 1, 2, 4, 7, 14, 28, 57, 114, 228, 455, 910, 1820, 3641, 7282, 14564, 29127, 58254, 116508, 233017, 466034, 932068, 1864135, 3728270, 7456540, 14913081, 29826162, 59652324, 119304647, 238609294, 477218588, 954437177, 1908874354, 3817748708
OFFSET
0,5
COMMENTS
A transform of the Jacobsthal numbers. A059633 is the equivalent transform of the Fibonacci numbers.
Paul Curtz, Aug 05 2007, observes that the inverse binomial transform of 0,0,0,1,2,4,7,14,28,57,114,228,455,910,1820,... gives the same sequence up to signs. That is, the extended sequence is an eigensequence for the inverse binomial transform (an autosequence).
The round() function enables the closed (non-recurrence) formula to take a very simple form: see Formula section. This can be generalized without loss of simplicity to a(n) = round(b^n/c), where b and c are very small, incommensurate integers (c may also be an integer fraction). Particular choices of small integers for b and c produce a number of well-known sequences which are usually defined by a recurrence - see Cross Reference. - Ross Drewe, Sep 03 2009
LINKS
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, arXiv:math/0205301 [math.CO], 2002. [Link to arXiv version]
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
N. J. A. Sloane, Transforms
FORMULA
a(n) = 2a(n-1) - a(n-3) + 2a(n-4).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*A001045(k).
a(n) = Sum_{k=0..n} binomial((n+k)/2,k)*A001045((n-k)/2)*(1+(-1)^(n-k))/2.
a(3n) = A015565(n), a(3n+1) = 2*A015565(n), a(3n+2) = 4*A015565(n). - Paul Curtz, Nov 30 2007
From Paul Curtz, Dec 16 2007: (Start)
a(n+1) - 2a(n) = A131531(n).
a(n) + a(n+3) = 2^n. (End)
a(n) = round(2^n/9). - Ross Drewe, Sep 03 2009
9*a(n) = 2^n + (-1)^n - 3*A010892(n). - R. J. Mathar, Mar 24 2018
MAPLE
A010892 := proc(n) op((n mod 6)+1, [1, 1, 0, -1, -1, 0]) ; end proc:
A113405 := proc(n) (2^n-(-1)^n)/9 -A010892(n-1)/3; end proc: # R. J. Mathar, Dec 17 2010
MATHEMATICA
CoefficientList[Series[x^3/(1-2x+x^3-2x^4), {x, 0, 40}], x] (* or *) LinearRecurrence[{2, 0, -1, 2}, {0, 0, 0, 1}, 40] (* Harvey P. Dale, Apr 30 2011 *)
PROG
(PARI) a(n)=2^n\/9 \\ Charles R Greathouse IV, Jun 05, 2011
(Magma) [Round(2^n/9): n in [0..40]]; // Vincenzo Librandi, Aug 11 2011
CROSSREFS
From Ross Drewe, Sep 03 2009: (Start)
Other sequences a(n) = round(b^n / c), where b and c are very small integers:
A001045 b = 2; c = 3
A007910 b = 2; c = 5
A016029 b = 2; c = 5/3
A077947 b = 2; c = 7
abs(A078043) b = 2; c = 7/3
A007051 b = 3; c = 2
A015518 b = 3; c = 4
A034478 b = 5; c = 2
A003463 b = 5; c = 4
A015531 b = 5; c = 6
(End)
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 28 2005
EXTENSIONS
Edited by N. J. A. Sloane, Dec 13 2007
STATUS
approved
Period 6: repeat [1, 1, 1, 0, 0, 0].
+10
23
1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1
OFFSET
0,1
COMMENTS
For periodic sequences having a period of 2*k and composed of k ones followed by k zeros we have a(n) = floor(((n+k) mod 2*k)/k). Sequences of this form are A000035(n+1) (k=1), A133872(n) (k=2), this sequence (k=3), A131078(n) (k=4), and A112713(n-1) (k=5). - Gary Detlefs, May 17 2011
FORMULA
G.f.: (1+x+x^2)/(1-x^6) = 1/((1-x)*(1+x)*(1-x+x^2)).
a(n) = a(n-6) for n>=6, a(0)=a(1)=a(2)=1, a(3)=a(4)=a(5)=0.
a(n) = ((-1)^floor((5*n + 2)/3) + 1)/2 = ( (-1)^floor(n/3) + 1 )/2. [Simplified by Bruno Berselli, Jul 09 2013]
a(n) = Sum_{k=0..floor(n/2)} U(n-2k, 1/2). - Paul Barry, Nov 15 2003
From Paul Barry, Mar 14 2004: (Start)
Partial sums of expansion of 1/(1+x^3), see A131531.
a(n) = 2*sin(Pi*n/3 + Pi/6)/3 + cos(Pi*n)/6 + 1/2. (End)
a(n) = floor(((n+3) mod 6)/3).
a(n) = floor((5*n-1)/3) mod 2. - Gary Detlefs, May 17 2011
a(n) = 1/2 + cos(Pi*n/3)/3 + sin(Pi*n/3)/sqrt(3) + (-1)^n/6. - R. J. Mathar, Oct 08 2011
a(n) = floor(((n+2)^2)/3) mod 2. - Wesley Ivan Hurt, Jun 29 2013
a(n) = A079979(n) + A079979(n-1) + A079979(n-2). - R. J. Mathar, Jul 10 2015
a(n) = a(n-1) - a(n-3) + a(n-4) for n > 3. - Wesley Ivan Hurt, Jul 05 2016
a(n) = 2*floor(n/6) - floor(n/3) + 1. - Ridouane Oudra, Dec 14 2021
MAPLE
seq(op([1, 1, 1, 0, 0, 0]), n=0..40); # Wesley Ivan Hurt, Jul 05 2016
MATHEMATICA
CoefficientList[Series[(1 + x + x^2)/(1 - x^6), {x, 0, 50}], x]
Flatten[Table[{1, 1, 1, 0, 0, 0}, {20}]] (* Harvey P. Dale, Jul 17 2011 *)
PROG
(PARI) a(n)=n%6<3 \\ Jaume Oliver Lafont, Mar 17 2009
(Magma) &cat [[1, 1, 1, 0, 0, 0]^^30]; // Wesley Ivan Hurt, Jul 05 2016
(Python)
def A088911(n): return int(n % 6 < 3) # Chai Wah Wu, May 25 2022
KEYWORD
nonn,easy
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003
STATUS
approved
Period 6: repeat [1, 1, 1, -1, -1, -1].
+10
15
1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1
OFFSET
0,1
FORMULA
a(n+6) = a(n), a(0)=a(1)=a(2)=-a(3)=-a(4)=-a(5)=1.
a(n) = ((-1)^n * (4 * (cos((2*n + 1)*Pi/3) + cos(n*Pi)) + 1) - 4) / 3. - Federico Acha Neckar (f0383864(AT)hotmail.com), Sep 01 2007
a(n) = (-1)^n * (4 * cos((2*n + 1) * Pi/3) + 1) / 3. - Federico Acha Neckar (f0383864(AT)hotmail.com), Sep 02 2007
G.f.: (1+x+x^2)/((1+x)*(x^2-x+1)). - R. J. Mathar, Nov 14 2007
a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4) for n>3. - Paul Curtz, Nov 22 2007
a(n) = (-1)^floor(n/3). Compare with A057077, A143621 and A143622. Define E(k) = Sum_{n >= 0} a(n)*n^k/n! for k = 0,1,2,... . Then E(k) is an integral linear combination of E(0), E(1) and E(2) (a Dobinski-type relation). Precisely, E(k) = A143628(k)*E(0) + A143629(k)*E(1) + A143630(k)*E(2). - Peter Bala, Aug 28 2008
Euler transform of length 6 sequence [1, 0, -2, 0, 0, 1]. - Michael Somos, Feb 26 2011
a(n) = b(2*n + 1) where b(n) is multiplicative with b(2^e) = 0^e, b(3^e) = -(-1)^e if e>0, b(p^e) = 1 if p == 1 (mod 4), b(p^e) = (-1)^e if p == 3 (mod 4) and p>3. - Michael Somos, Feb 26 2011
a(n + 3) = a(-1 - n) = -a(n) for all n in Z. - Michael Somos, Feb 26 2011
a(n) = (-1)^n * A257075(n) for all n in Z. - Michael Somos, Apr 15 2015
G.f.: 1 / (1 - x / (1 + 2*x^2 / (1 + x / (1 + x / (1 - x))))). - Michael Somos, Apr 15 2015
From Wesley Ivan Hurt, Jul 05 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = (cos(n*Pi) + 2*cos(n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3)) / 3. (End)
a(n)*a(n-4) = a(n-1)*a(n-3) for all n in Z. - Michael Somos, Feb 25 2020
EXAMPLE
G.f. = 1 + x + x^2 - x^3 - x^4 - x^5 + x^6 + x^7 + x^8 - x^9 - x^10 - x^11 + ...
G.f. = q + q^3 + q^5 - q^7 - q^9 - q^11 + q^13 + q^15 + q^17 - q^19 - q^21 + ...
MAPLE
seq(op([1, 1, 1, -1, -1, -1]), n=0..30); # Wesley Ivan Hurt, Jul 05 2016
MATHEMATICA
a[ n_] := (-1)^Quotient[n, 3]; (* Michael Somos, Apr 24 2014 *)
PadRight[{}, 100, {1, 1, 1, -1, -1, -1}] (* Wesley Ivan Hurt, Jul 05 2016 *)
PROG
(PARI) {a(n) = (-1) ^ (n\3)}; /* Michael Somos, Feb 26 2011 */
(Magma) &cat [[1, 1, 1, -1, -1, -1]^^20]; // Wesley Ivan Hurt, Jul 05 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Aug 03 2007
STATUS
approved
Expansion of x*(1-x)/ ((1+x)*(1-x+x^2)) in powers of x.
+10
7
0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1, 1, 0, 1, -1, 0, -1
OFFSET
0,1
COMMENTS
Period 6: repeat [0, 1, -1, 0, -1, 1]. - Joerg Arndt, Aug 28 2024
Multiplicative with a(2^e) = -1, a(3^e) = 0, a(p^e) = 1 otherwise. - David W. Wilson, Jun 12 2005
Transform of the Jacobsthal numbers A001045 under the Riordan array A102587. - Paul Barry, Jul 14 2005
The BINOMIAL transform generates (-1)^(n+1)*A024495(n+1). - R. J. Mathar, Apr 07 2008
FORMULA
a(n) = 2*cos(Pi*n/3)/3 - 2(-1)^n/3.
From Michael Somos, Apr 10 2011: (Start)
Euler transform of length 6 sequence [-1, 0, -1, 0, 0, 1].
Moebius transform is length 6 sequence [1, -2, -1, 0, 0, 2].
G.f.: x * (1 - x) * (1 - x^3) / (1 - x^6).
a(n) = a(-n), a(n + 3) = -a(n), a(3*n) = 0, for all n in Z. (End)
a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4). - Paul Curtz, Dec 10 2007
a(n) = ( (-1)^floor((n+1)/3) - (-1)^n )/2. - Bruno Berselli, Jul 09 2013
a(n) = S(n-1,-1), n >= 0, with Chebyshev's S-polynomials evaluated at -1 (see A049310). - Wolfdieter Lang, Sep 06 2013
a(n) = A131531(n+2) - A131531(n+1) . - R. J. Mathar, Nov 28 2019
a(n) = A128834(n^2). - Ridouane Oudra, Oct 30 2024
E.g.f.: 2*(exp(x/2)*cos(sqrt(3)*x/2) - cosh(x) + sinh(x))/3. - Stefano Spezia, Oct 31 2024
EXAMPLE
G.f. = x - x^2 - x^4 + x^5 + x^7 - x^8 - x^10 + x^11 + x^13 - x^14 - x^16 + x^17 + ...
MAPLE
seq(2*sin(Pi*n^2/3)/sqrt(3), n=0..100); # Ridouane Oudra, Oct 30 2024
MATHEMATICA
a[ n_] := {1, -1, 0, -1, 1, 0}[[Mod[n, 6, 1]]]; (* Michael Somos, Aug 25 2014 *)
LinearRecurrence[{0, 0, -1}, {0, 1, -1}, 120] (* or *) PadRight[{}, 120, {0, 1, -1, 0, -1, 1}] (* Harvey P. Dale, Mar 30 2016 *)
PROG
(PARI) {a(n) = [0, 1, -1, 0, -1, 1][n%6 + 1]}; /* Michael Somos, Apr 10 2011 */
CROSSREFS
KEYWORD
sign,easy,mult
AUTHOR
Paul Barry, Feb 25 2004
STATUS
approved
Expansion of (1/2)*(1/x^2 - 1/x)*(1-x-sqrt(1-2*x+x^2-4*x^3)) - x.
+10
5
0, 0, 0, 0, 1, 2, 3, 6, 13, 26, 52, 108, 226, 472, 993, 2106, 4485, 9586, 20576, 44332, 95814, 207688, 451438, 983736, 2148618, 4702976, 10314672, 22664452, 49887084, 109985772, 242854669, 537004218, 1189032613, 2636096922, 5851266616, 13002628132, 28925389870, 64412505472, 143576017410
OFFSET
0,6
COMMENTS
From Paul Barry, May 24 2009: (Start)
Hankel transform of A052702 is A160705. Hankel transform of A052702(n+1) is A160706.
Hankel transform of A052702(n+2) is -A131531(n+1). Hankel transform of A052702(n+3) is A160706(n+5).
Hankel transform of A052702(n+4) is A160705(n+5). (End)
For n > 1, number of Dyck (n-1)-paths with each descent length one greater or one less than the preceding ascent length. - David Scambler, May 11 2012
FORMULA
Recurrence: {a(1)=0, a(2)=0, a(4)=1, a(3)=0, a(6)=3, a(7)=6, a(5)=2, (-2+4*n)*a(n)+(-7-5*n)*a(n+1)+(8+3*n)*a(n+2)+(-13-3*n)*a(n+3)+(n+6)*a(n+4)}.
From Paul Barry, May 24 2009: (Start)
G.f.: (1-2*x+x^2-2*x^3-(1-x)*sqrt(1-2*x+x^2-4*x^3))/(2*x^2).
a(n+1) = Sum_{k=0..n-1} C(n-k-1,2k-1)*A000108(k). (End)
a(n) = A023431(n-1)-A023431(n-2). - R. J. Mathar, Jan 13 2025
MAPLE
spec := [S, {B=Prod(C, Z), S=Prod(B, B), C=Union(S, B, Z)}, unlabeled]: seq(combstruct[count](spec, size=n), n=0..20);
MATHEMATICA
a[n_] := Sum[Binomial[n-k-2, 2k-1] CatalanNumber[k], {k, 0, n-2}];
Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 11 2022, after Paul Barry *)
PROG
(PARI)
x='x+O('x^66);
s='a0+(1-2*x+x^2-2*x^3-(1-x)*sqrt(1-2*x+x^2-4*x^3))/(2*x^2);
v=Vec(s); v[1]-='a0; v
/* Joerg Arndt, May 11 2012 */
CROSSREFS
Cf. A023431.
KEYWORD
easy,nonn
AUTHOR
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
EXTENSIONS
More terms from Joerg Arndt, May 11 2012
STATUS
approved
Size of "uniform" Hamming covers of distance 1, that is, Hamming covers in which all vectors of equal weight are treated the same, included or excluded from the cover together.
+10
5
1, 2, 2, 5, 10, 22, 43, 86, 170, 341, 682, 1366, 2731, 5462, 10922, 21845, 43690, 87382, 174763, 349526, 699050, 1398101, 2796202, 5592406, 11184811, 22369622, 44739242, 89478485, 178956970, 357913942, 715827883, 1431655766, 2863311530, 5726623061
OFFSET
1,2
COMMENTS
Motivation: consideration of the "hats" problem (which boils down to normal hamming covering codes) in the case when the people are indistinguishable or unlabeled.
From Paul Curtz, May 26 2011: (Start)
If we add a(0)=1 in front and build the table of a(n) and iterated differences in further rows we get:
1, 1, 2, 2, 5, 10,
0, 1, 0, 3, 5, 12,
1, -1, 3, 2, 7, 9,
-2, 4, -1, 5, 2, 13,
6, -5, 6, -3, 11, 6
-11, 11, -9, 14, -5, 21.
The first column is the inverse binomial transform, which is 1,0 followed by (-1)^n*A083322(n-1), n>=2.
The main diagonal in the table above is A001045, the adjacent upper diagonals are A078008, A048573 and A062092. (End)
FORMULA
If (n mod 6 = 5) then sum(binomial(n, 3*i+1), i=0..n/3); elif (n mod 6 = 2) then sum(binomial(n, 3*i), i=0..n/3)+1; else sum(binomial(n, 3*i), i=0..n/3); fi;
G.f.: x*(2*x^3-2*x^2+1)/( (1-2*x)*(1+x)*(1-x+x^2) ).
a(n)=2*a(n-1)-a(n-3)+2*a(n-4).
From Paul Curtz, May 26 2011: (Start)
a(n+1) - 2*a(n) has period length 6: repeat 0, -2, 1, 0, 2, -1 (see A080425).
a(n) - A083322(n-1) = A010892(n-1) has period length 6.
a(n) + a(n+3) = 3*2^n = A007283(n).
a(n+6)-a(n) = 21*2^n = A175805(n).
a(n) - A131708(n) = -A131531(n). (End)
MAPLE
hatwork := proc(n, i, covered) local val, val2; options remember;
# computes the minimum cover of the i-bit through n-bit words.
# if covered is true the i-bit words are already covered (by the (i-1)-bit words)
if (i>n or (i = n and covered)) then 0; elif (i = n and not covered) then 1; else
# one choice is to include the i-bit words in the cover
val := hatwork(n, i+1, true) + binomial(n, i);
# the other choice is not to include the i-bit words in the cover
if (covered) then val2 := hatwork (n, i+1, false); if (val2 < val) then val := val2; fi; else
# if the i-bit words were not covered by (i-1), they must be covered by the (i+1)-bit words
if (i <= n) then val2 := hatwork (n, i+2, true) + binomial(n, i+1); if (val2 < val) then val := val2; fi; fi; fi; val; fi; end proc;
A081374 := proc (n) hatwork(n, 0, false); end proc;
MATHEMATICA
LinearRecurrence[{2, 0, -1, 2}, {1, 2, 2, 5}, 40] (* Harvey P. Dale, Feb 11 2015 *)
PROG
(Magma) I:=[1, 2, 2, 5]; [n le 4 select I[n] else 2*Self(n-1)-Self(n-3)+2*Self(n-4): n in [1..40]]; // Vincenzo Librandi, Jul 08 2016
CROSSREFS
Cf. A083322.
KEYWORD
nonn
AUTHOR
David Applegate, Aug 22 2003
STATUS
approved
NW-SE diagonal sums of Riordan array A112468.
+10
3
1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0
OFFSET
1,3
COMMENTS
Matches Fibonacci-sequence, such that F(n) + a(n) and F(n) - a(n) = always even.
Periodic sequence with period: [1,1,2,1,1,0]. - Philippe Deléham, Oct 11 2011
FORMULA
a(n) = 1 + A131531(n) with inverse binomial transform: 1, 0, 1, -3, 6, -11, 21, .., a signed variant of A024495. - R. J. Mathar, Mar 04 2010
a(2n+1) = a(2n)-a(2n-1)+2, a(2n) = a(2n-1)-a(2n-2) with a(1) = a(2)=1. - Philippe Deléham, Oct 11 2011
a(n) = a(n-1)-a(n-3)+a(n-4). - Colin Barker, Sep 26 2014
G.f.: -x*(x^2+1) / ((x-1)*(x+1)*(x^2-x+1)). - Colin Barker, Sep 26 2014
a(n) = 2*ceiling(n/6)-2*floor(n/6)+floor(n/3)-ceiling(n/3). - Wesley Ivan Hurt, Sep 27 2014
a(n) = A001045(n) - A111927(n). - Paul Curtz, Dec 16 2020
MAPLE
A173432:=n->2*ceil(n/6)-2*floor(n/6)+floor(n/3)-ceil(n/3): seq(A173432(n), n=1..100); # Wesley Ivan Hurt, Sep 27 2014
MATHEMATICA
Table[2 Ceiling[n/6] - 2 Floor[n/6] + Floor[n/3] - Ceiling[n/3], {n, 50}] (* Wesley Ivan Hurt, Sep 27 2014 *)
PROG
(PARI) Vec(-x*(x^2+1) / ((x-1)*(x+1)*(x^2-x+1)) + O(x^100)) \\ Colin Barker, Sep 26 2014
(Magma) [2*Ceiling(n/6)-2*Floor(n/6)+Floor(n/3)-Ceiling(n/3) : n in [1..100]]; // Wesley Ivan Hurt, Sep 27 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mark Dols, Feb 18 2010
EXTENSIONS
Corrected and extended by Philippe Deléham, Oct 11 2011
STATUS
approved
a(n) = 2*a(n-1) - a(n-3) + 2*a(n-4), a(0)=a(1)=0, a(2)=2, a(3)=3.
+10
3
0, 0, 2, 3, 6, 10, 21, 42, 86, 171, 342, 682, 1365, 2730, 5462, 10923, 21846, 43690, 87381, 174762, 349526, 699051, 1398102, 2796202, 5592405, 11184810, 22369622, 44739243, 89478486, 178956970, 357913941, 715827882, 1431655766, 2863311531, 5726623062, 11453246122
OFFSET
0,3
COMMENTS
Generally, a(n) is an autosequence if its inverse binomial transform is (-1)^n*a(n). It is of the first kind if the main diagonal is 0's and the first two upper diagonals (just above the main one) are the same. It is of the second kind if the main diagonal is equal to the first upper diagonal multiplied by 2. If the first upper diagonal is an autosequence, the sequence is a super autosequence. Example: A113405. The first upper diagonal is A001045(n). Another super autosequence: 0, 0, 0 followed by A059633(n). The first upper diagonal is A000045(n).
Difference table of a(n):
0, 0, 2, 3, 6, 10, 21, 42, ...
0, 2, 1, 3, 4, 11, 21, 44, ...
2, -1, 2, 1, 7, 10, 23, 41, ...
-3, 3, -1, 6, 3, 13, 18, 45, ... .
This is an autosequence of the second kind. The main diagonal is 2*A001045(n) = A078008(n). More precisely it is a super autosequence, companion of A113405(n).
a(n+1) mod 10 = period 12: repeat 0, 2, 3, 6, 0, 1, 2, 6, 1, 2, 2, 5.
It is shifted A081374(n+1) mod 10 =
period 12: repeat 1, 2, 2, 5, 0, 2, 3, 6, 0, 1, 2, 6.
a(n) mod 9 = period 18:
repeat 0, 0, 2, 3, 6, 1, 3, 6, 5, 0, 0, 7, 6, 3, 8, 6, 3, 4 = c(n).
c(n) + c(n+9) = 0, 0, 9, 9, 9, 9, 9, 9, 9.
FORMULA
a(n+3) = 3*2^n - a(n), a(0)=a(1)=0, a(2)=2.
a(n) = 2*A113405(n+1) - A113405(n).
a(n+1) = 2*a(n) + period 6: repeat 0, 2, -1, 0, -2, 1. a(0)=0.
a(n) = 2^n - A081374(n+1).
a(n+3) = a(n+1) + A130755(n).
G.f.: x^2*(x-2) / ((x+1)*(2*x-1)*(x^2-x+1)). - Colin Barker, May 18 2014
a(n) = A024495(n) + A131531(n).
a(n+6) = a(n) + 21*2^n, a(0)=a(1)=0, a(2)=2, a(3)=3, a(4)=6, a(5)=10.
a(n) = A001045(n) - A092220(n).
a(n+12) = a(n) + 1365*2^n. First 12 values in the Data. (A024495(n+12) = A024495(n) + 1365*2^n).
a(3n) = A132805(n) = 3*A015565(n).
a(3n+1) = A132804(n) = 6*A015565(n).
a(3n+2) = A132397(n) = 2*A082311(n).
a(n) = 1/3*((-1)^n - 2*cos((n*Pi)/3) + 2^n). - Alexander R. Povolotsky, Jun 02 2014
EXAMPLE
G.f. = 2*x^2 + 3*x^3 + 6*x^4 + 10*x^5 + 21*x^6 + 42*x^7 + 86*x^8 + ...
MATHEMATICA
a[n_] := (m = Mod[n, 6]; 1/3*(2^n + (-1)^n + 1/120*(m-6)*(m+1)*(m^3-29*m+40))); Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 19 2014, a non-recursive formula, after Mathematica's RSolve *)
LinearRecurrence[{2, 0, -1, 2}, {0, 0, 2, 3}, 50] (* G. C. Greubel, Feb 21 2017 *)
PROG
(PARI) concat([0, 0], Vec(x^2*(x-2)/((x+1)*(2*x-1)*(x^2-x+1)) + O(x^100))) \\ Colin Barker, May 18 2014
CROSSREFS
Cf. A000032, 1/(n+1), A164555/A027642 (all autosequences of 2nd kind). A007283, A175805.
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, May 17 2014
EXTENSIONS
More terms from Colin Barker, May 18 2014
STATUS
approved

Search completed in 0.012 seconds