login
Period 7: repeat [1, 2, 3, 4, 5, 6, 7].
1

%I #42 Jun 29 2024 09:33:36

%S 1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,

%T 7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,

%U 6,7,1,2,3,4,5,6,7,1,2,3,4

%N Period 7: repeat [1, 2, 3, 4, 5, 6, 7].

%C Partial sums are given by A130485(n)+n+1. - _Hieronymus Fischer_, Jun 08 2007

%C Decimal expansion of 1234567/9999999 = 0.123456712345671234567... - _Eric Desbiaux_, Nov 03 2008

%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 a(n) = 1 + (n mod 7). - _Paolo P. Lava_, Nov 21 2006

%F a(n) = A010876(n) + 1. G.f.: (Sum_{k=0..6} (k+1)*x^k)/(1-x^7). Also (7*x^8-8*x^7+1)/((1-x^7)*(1-x)^2). - _Hieronymus Fischer_, Jun 08 2007

%F From _Wesley Ivan Hurt_, Jul 18 2016: (Start)

%F a(n) = a(n-7) for n>6.

%F a(n) = 1 - 6*floor(n/7) + Sum_{k=1..6} floor((n + k)/7). (End)

%p seq(op([1, 2, 3, 4, 5, 6, 7]), n=0..20); # _Wesley Ivan Hurt_, Jul 18 2016

%t PadRight[{}, 100, {1, 2, 3, 4, 5, 6, 7}] (* _Wesley Ivan Hurt_, Jul 18 2016 *)

%o (PARI) a(n)=n%7+1 \\ _Charles R Greathouse IV_, Jul 13 2016

%o (Magma) &cat [[1, 2, 3, 4, 5, 6, 7]^^20]; // _Wesley Ivan Hurt_, Jul 18 2016

%Y Cf. A002264, A002265, A002266, A004526, A010872, A010873, A010874, A010875, A010876, A010877, A130485.

%Y Cf. A177160 (decimal expansion of (4502+sqrt(29964677))/6961).

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_