OFFSET
0,2
COMMENTS
Period 7: repeat [0, 3, 6, 2, 5, 1, 4].
Draw a regular heptagon with vertices labeled 0..6 going clockwise. Choose any seven consecutive values of a(n) and connect the corresponding vertices in that order with straight lines. This results in a clockwise-inscribed seven-pointed star that remains unbroken during construction. - Wesley Ivan Hurt, Apr 10 2015
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,1).
FORMULA
G.f.: (3*x+6*x^2+2*x^3+5*x^4+x^5+4*x^6)/(1-x^7).
a(n) = mod(n*(7*n-1)/2, 7) = mod(A022264(n), 7).
Recurrence: a(n) = a(n-7) for n > 6. - Wesley Ivan Hurt, Apr 10 2015
a(n) = (21 + 4*(n mod 7) - 3*((n+1) mod 7) + 4*((n+2) mod 7) - 3*((n+3) mod 7) + 4*((n+4) mod 7) - 3*((n+5) mod 7) - 3*((n+6) mod 7))/7. - Wesley Ivan Hurt, Dec 23 2016
a(n) = A010876(3*n). - R. J. Mathar, Jan 15 2021
MAPLE
MATHEMATICA
Mod[3 Range[0, 100], 7] (* Wesley Ivan Hurt, Apr 10 2015 *)
PROG
(PARI) a(n)=3*n%7 \\ Charles R Greathouse IV, Jul 23, 2011
(Magma) [3*n mod 7 : n in [0..100]]; // Wesley Ivan Hurt, Apr 10 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Aug 22 2005
STATUS
approved