A141430 a(n) = A000111(n) mod 9.
1, 1, 1, 2, 5, 7, 7, 2, 8, 7, 4, 2, 2, 7, 1, 2, 5, 7, 7, 2, 8, 7, 4, 2, 2, 7, 1, 2, 5, 7, 7, 2, 8, 7, 4, 2, 2, 7, 1, 2, 5, 7, 7, 2, 8, 7, 4, 2, 2, 7
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,-1,1).
Programs
-
Python
def A141430(n): return (2, 7, 1, 2, 5, 7, 7, 2, 8, 7, 4, 2)[n%12] if n>1 else 1 # Chai Wah Wu, Apr 17 2023
Formula
a(n+12) = a(n), n > 1.
a(n) + a(n+6) = 9, n > 1.
a(n+11-p) - a(n+p) = 6 (p=0 or 5), 0 (p=1 or 4), -3 (p=2 or 3), any n > 1.
G.f.: (6x^8-5x^7+x^6+2x^5+3x^4+x^3+1) / ((1-x)(x^2+1)(x^4-x^2+1)). - R. J. Mathar, Dec 05 2008
a(n) = 9/2 - (3/2)*cos(Pi*n/6) + (1/2)*3^(1/2)*sin(Pi*n/6) - (1/2)*cos(Pi*n/2) - (5/2)*sin(Pi*n/2) - (3/2)*cos(5*Pi*n/6) - (1/2)*3^(1/2)*sin(5*Pi*n/6). - Richard Choulet, Dec 12 2008
Extensions
Edited by R. J. Mathar, Dec 05 2008
Comments