login
A140430
Period 6: repeat [3, 2, 4, 1, 2, 0].
2
3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2, 4, 1, 2, 0, 3, 2
OFFSET
0,1
COMMENTS
Associate to sequence identical to half its p-th differences.
Corresponding n-th differences table:
3, 2, 4, 1, 2, 0, 3;
-1, 2, -3, 1, -2, 3, -1;
3, -5, 4, -3, 5, -4, 3;
-8, 9, -7, 8, -9, 7, -8;
17, -16, 15, -17, 16, -15, 17;
-33, 31, -32, 33, -31, 32, -33;
64, -63, 65, -64, 63, -65, 64;
Note that the main diagonal is 3 followed by A000079(n+1).
Note also the southeast diagonal 4, 1, 5, 7, 17 is 4 followed by A014551(n+1).
Note also 3*A001045(n+1), one signed and one unsigned, in two southeast diagonals.
Starting from second line, the first column is A130750 signed.
Starting from second line, the second column is A130752 signed.
Starting from second line, the third column is A130755 signed.
FORMULA
From Wesley Ivan Hurt, Aug 29 2014: (Start)
G.f.: (3-x+2*x^2)/((1-x)*(1+x^3)).
a(n) = a(n-1)-a(n-3)+a(n-4);
a(n) = 2 + ((-n-2) mod 3) * (-1)^n. (End)
a(n) = (6 + 3*cos(n*Pi) + 2*sqrt(3)*sin(n*Pi/3))/3. - Wesley Ivan Hurt, Jun 20 2016
MAPLE
A140430:=n->2+((-n-2) mod 3)*(-1)^n: seq(A140430(n), n=0..100); # Wesley Ivan Hurt, Aug 29 2014
MATHEMATICA
CoefficientList[Series[(3 - x + 2 x^2)/((1 - x)*(1 + x^3)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Aug 29 2014 *)
PadRight[{}, 120, {3, 2, 4, 1, 2, 0}] (* Harvey P. Dale, Jan 21 2023 *)
PROG
(PARI) a(n)=[3, 2, 4, 1, 2, 0][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
(Magma) [2 + ((-n-2) mod 3)*(-1)^n : n in [0..100]]; // Wesley Ivan Hurt, Aug 29 2014
CROSSREFS
Cf. A000079 (2^n), A001045 (Jacobsthal), A014551 (Jacobsthal-Lucas).
Sequence in context: A154879 A097673 A226377 * A377511 A123359 A376070
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 25 2008
EXTENSIONS
More terms from Wesley Ivan Hurt, Aug 29 2014
STATUS
approved