The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A063942 Follow k with k-1 and k-2. 3

%I

%S 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,

%T 9,12,11,10,13,12,11,14,13,12,15,14,13,16,15,14,17,16,15,18,17,16,19,

%U 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

%N Follow k with k-1 and k-2.

%H Harry J. Smith, <a href="/A063942/b063942.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).

%F G.f.: ( 1-x^2+2*x^3-x ) / ( (1+x+x^2)*(x-1)^2 ). - _R. J. Mathar_, Jul 14 2015

%F a(3n) = n+1. a(3n+1) = n. a(3n+2) = n-1. - _R. J. Mathar_, Jan 10 2017

%F a(n) = (3*n-3-12*cos(2*(n-5)*Pi/3)+4*sqrt(3)*sin(2*(n-5)*Pi/3))/9. - _Wesley Ivan Hurt_, Sep 29 2017

%o (PARI) a(n) = (n\3)-(n%3)+1; j=[]; for(n=0,200,j=concat(j,a(n))); j

%o (PARI) { for (n=0, 1000, write("b063942.txt", n, " ", (n\3) - (n%3) + 1) ) } \\ _Harry J. Smith_, Sep 03 2009

%Y Cf. A028242.

%K easy,sign

%O 0,4

%A _Jason Earls_, Sep 01 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 15 04:03 EDT 2021. Contains 343909 sequences. (Running on oeis4.)