

A063942


Follow k with k1 and k2.


3



1, 0, 1, 2, 1, 0, 3, 2, 1, 4, 3, 2, 5, 4, 3, 6, 5, 4, 7, 6, 5, 8, 7, 6, 9, 8, 7, 10, 9, 8, 11, 10, 9, 12, 11, 10, 13, 12, 11, 14, 13, 12, 15, 14, 13, 16, 15, 14, 17, 16, 15, 18, 17, 16, 19, 18, 17, 20, 19, 18, 21, 20, 19, 22, 21, 20, 23, 22, 21, 24, 23, 22, 25, 24, 23, 26, 25, 24, 27, 26, 25, 28, 27, 26, 29, 28, 27, 30, 29, 28, 31, 30, 29, 32
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,4


LINKS

Harry J. Smith, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,1).


FORMULA

G.f.: ( 1x^2+2*x^3x ) / ( (1+x+x^2)*(x1)^2 ).  R. J. Mathar, Jul 14 2015
a(3n) = n+1. a(3n+1) = n. a(3n+2) = n1.  R. J. Mathar, Jan 10 2017
a(n) = (3*n312*cos(2*(n5)*Pi/3)+4*sqrt(3)*sin(2*(n5)*Pi/3))/9.  Wesley Ivan Hurt, Sep 29 2017
E.g.f.: exp(x)*(x  1)/3 + 4*exp(x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9.  Stefano Spezia, Oct 02 2022
Sum_{n>=6} (1)^n/a(n) = 3*(log(2)1/2).  Amiram Eldar, Oct 04 2022


MATHEMATICA

LinearRecurrence[{1, 0, 1, 1}, {1, 0, 1, 2}, 100] (* Amiram Eldar, Oct 04 2022 *)


PROG

(PARI) a(n) = (n\3)(n%3)+1; j=[]; for(n=0, 200, j=concat(j, a(n))); j
(PARI) { for (n=0, 1000, write("b063942.txt", n, " ", (n\3)  (n%3) + 1) ) } \\ Harry J. Smith, Sep 03 2009


CROSSREFS

Cf. A028242.
Sequence in context: A176095 A295508 A260672 * A263405 A106384 A333119
Adjacent sequences: A063939 A063940 A063941 * A063943 A063944 A063945


KEYWORD

easy,sign


AUTHOR

Jason Earls, Sep 01 2001


STATUS

approved



