login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A010886
Period 7: repeat [1, 2, 3, 4, 5, 6, 7].
1
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, 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, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4
OFFSET
0,2
COMMENTS
Partial sums are given by A130485(n)+n+1. - Hieronymus Fischer, Jun 08 2007
Decimal expansion of 1234567/9999999 = 0.123456712345671234567... - Eric Desbiaux, Nov 03 2008
FORMULA
a(n) = 1 + (n mod 7). - Paolo P. Lava, Nov 21 2006
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
From Wesley Ivan Hurt, Jul 18 2016: (Start)
a(n) = a(n-7) for n>6.
a(n) = 1 - 6*floor(n/7) + Sum_{k=1..6} floor((n + k)/7). (End)
MAPLE
seq(op([1, 2, 3, 4, 5, 6, 7]), n=0..20); # Wesley Ivan Hurt, Jul 18 2016
MATHEMATICA
PadRight[{}, 100, {1, 2, 3, 4, 5, 6, 7}] (* Wesley Ivan Hurt, Jul 18 2016 *)
PROG
(PARI) a(n)=n%7+1 \\ Charles R Greathouse IV, Jul 13 2016
(Magma) &cat [[1, 2, 3, 4, 5, 6, 7]^^20]; // Wesley Ivan Hurt, Jul 18 2016
CROSSREFS
Cf. A177160 (decimal expansion of (4502+sqrt(29964677))/6961).
Sequence in context: A190597 A338881 A053843 * A338481 A338492 A338458
KEYWORD
nonn,easy
STATUS
approved