%I #21 Sep 08 2022 08:45:21
%S 0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,1,
%T 4,0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,
%U 1,4,0,3,6,2,5,1,4,0,3,6,2,5,1,4,0,3,6,2,5,1
%N a(n) = 3*n mod 7.
%C Period 7: repeat [0, 3, 6, 2, 5, 1, 4].
%C 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
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,0,0,1).
%F G.f.: (3*x+6*x^2+2*x^3+5*x^4+x^5+4*x^6)/(1-x^7).
%F a(n) = mod(n*(7*n-1)/2, 7) = mod(A022264(n), 7).
%F Recurrence: a(n) = a(n-7) for n > 6. - _Wesley Ivan Hurt_, Apr 10 2015
%F 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
%F a(n) = A010876(3*n). - _R. J. Mathar_, Jan 15 2021
%p A111952:=n->3*n mod 7: seq(A111952(n), n=0..100); # _Wesley Ivan Hurt_, Apr 10 2015
%t Mod[3 Range[0, 100], 7] (* _Wesley Ivan Hurt_, Apr 10 2015 *)
%o (PARI) a(n)=3*n%7 \\ _Charles R Greathouse IV_, Jul 23, 2011
%o (Magma) [3*n mod 7 : n in [0..100]]; // _Wesley Ivan Hurt_, Apr 10 2015
%Y Cf. A022264.
%K easy,nonn
%O 0,2
%A _Paul Barry_, Aug 22 2005
|