The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A147534 a(n) is congruent to (1,1,2) mod 3. 1

%I #27 Sep 08 2022 08:45:38

%S 1,1,2,4,4,5,7,7,8,10,10,11,13,13,14,16,16,17,19,19,20,22,22,23,25,25,

%T 26,28,28,29,31,31,32,34,34,35,37,37,38,40,40,41,43,43,44,46,46,47,49,

%U 49,50,52,52,53,55,55,56,58,58,59,61,61,62,64,64,65,67,67,68,70,70,71

%N a(n) is congruent to (1,1,2) mod 3.

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

%F a(n) = a(n-3)+3 = n-2/3-A131713(n)/3. G.f.: x*(1+x^2+x^3)/((1-x)^2*(1+x+x^2)). [_R. J. Mathar_, Nov 07 2008]

%F a(1)=1, a(2)=1, a(3)=2, a(4)=4, a(n)=a(n-1)+a(n-3)-a(n-4) for n>4. - _Harvey P. Dale_, Dec 09 2012

%F a(n) = (3*n - 2 - cos(2*n*Pi/3) + sqrt(3)*sin(2*n*Pi/3))/3. - _Wesley Ivan Hurt_, Jul 24 2016

%F a(n) = 1 + floor((n-1)/3) + floor(2*(n-1)/3). - _Wesley Ivan Hurt_, Jul 25 2016

%F a(n) = n - sign((n-1) mod 3). - _Wesley Ivan Hurt_, Sep 25 2017

%p a:=n->add(chrem( [n,j], [1,3] ), j=1..n): seq(a(n)+1, n=-1..70); # _Zerinvary Lajos_, Apr 08 2009

%t LinearRecurrence[{1,0,1,-1},{1,1,2,4},80] (* _Harvey P. Dale_, Dec 09 2012 *)

%o (Magma) I:=[1,1,2]; [n le 3 select I[n] else Self(n-3)+3: n in [1..70]]; // _Vincenzo Librandi_, Jul 25 2016

%Y Cf. A004396 for a(n) congruent to (0, 1, 1) mod 2.

%Y Cf. A131713.

%K easy,nonn

%O 1,3

%A _Giovanni Teofilatto_, Nov 06 2008

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 May 13 11:34 EDT 2024. Contains 372504 sequences. (Running on oeis4.)