A171182 Period 6: repeat [0, 1, 1, 1, 0, 2].
0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1, 1, 0, 2, 0, 1, 1
Offset: 1
Links
- Vladimir Shevelev, A recursion for divisor function over divisors belonging to a prescribed finite sequence of positive integers and a solution of the Lahiri problem for divisor function sigma_x(n), arXiv:0903.1743 [math.NT], 2009. [From _Vladimir Shevelev_, May 21 2010]
- Index entries for linear recurrences with constant coefficients, signature (-1,0,1,1).
Crossrefs
Programs
-
Magma
&cat[[0, 1, 1, 1, 0, 2]^^20]; // Wesley Ivan Hurt, Jun 19 2016
-
Maple
A171182:=n->(1+floor((n-3)^2/2)) mod 3: seq(A171182(n), n=1..100); # Wesley Ivan Hurt, Aug 27 2014
-
Mathematica
PadRight[{},110,{0,1,1,1,0,2}] (* Harvey P. Dale, Jan 28 2013 *) LinearRecurrence[{-1, 0, 1, 1},{0, 1, 1, 1},105] (* Ray Chandler, Aug 26 2015 *)
Formula
a(n) = A115357(n-2) for n>1. - R. J. Mathar, Dec 09 2009
a(2) = 1, a(3) = 1, a(5) = 0, otherwise a(n) = a(n-2) + a(n-3) - a(n-5), where we put a(n) = 0, if n<0. - Vladimir Shevelev, May 21 2010
a(n) = floor(((n+1) mod 6)/3) + 2*floor(((n+5) mod 6)/5). - Gary Detlefs, Feb 15 2014
From Wesley Ivan Hurt, Aug 27 2014: (Start)
G.f.: (2+2*x+x^2)/(1+x-x^3-x^4).
a(n) + a(n-1) = a(n-3) + a(n-4) for n>4.
a(n) = (1 + floor((n-3)^2/2)) mod 3. (End)
a(n) = (5 + 3*cos(n*Pi) + 4*cos(2*n*Pi/3))/6. - Wesley Ivan Hurt, Jun 19 2016
From Amiram Eldar, Sep 16 2023: (Start)
Additive with a(p^e) = 1 if p <= 3, and 0 otherwise.
Extensions
Edited by Charles R Greathouse IV, Mar 23 2010
Comments