login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101000 Periodic sequence with period 3. 4

%I #26 Dec 14 2023 05:16:20

%S 0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,

%T 1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,

%U 3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3,0,1,3

%N Periodic sequence with period 3.

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

%F a(n) = floor((n mod 3)*3/2). - _Reinhard Zumkeller_, Jun 23 2007

%F a(n) = 4 - a(n-1) - a(n-2) for n > 1. - _Reinhard Zumkeller_, Apr 13 2008

%F G.f.: x*(1+3*x)/(1-x^3). - _Jaume Oliver Lafont_, Mar 24 2009

%F a(n) = 2^(n mod 3) - 1. - _Wesley Ivan Hurt_, Apr 16 2014

%p A101000:=n->2^(n mod 3) - 1; seq(A101000(n), n=0..100); # _Wesley Ivan Hurt_, Apr 16 2014

%t PadRight[{},120,{0,1,3}] (* _Harvey P. Dale_, Apr 28 2012 *)

%t Table[2^Mod[n, 3] - 1, {n, 0, 100}] (* _Wesley Ivan Hurt_, Apr 16 2014 *)

%o (PARI) a(n)=n%3+(n%3==2) \\ _Jaume Oliver Lafont_, Mar 24 2009

%o (PARI) a(n)=2^(n%3)-1 \\ _Jaume Oliver Lafont_, Mar 24 2009

%K nonn,easy

%O 0,3

%A _N. J. A. Sloane_, Jun 17 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 13:27 EDT 2024. Contains 371971 sequences. (Running on oeis4.)