OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1).
FORMULA
a(n)= g*10+2*r-9*floor(r/5), where g=floor(n/10) and r=n mod 10.
a(n)= a(n-10)+10.
O.g.f.: x(2+2x+2x^2+2x^3-7x^4+2x^5+2x^6+2x^7+2x^8+x^9)/( (-1+x)^2 (1+x)(x^4+x^3+x^2+x+1)(x^4-x^3+x^2-x+1)). - R. J. Mathar, Jul 22 2008
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 2, 4, 6, 8, 1, 3, 5, 7, 9, 10}, 80] (* Harvey P. Dale, Jan 09 2017 *)
With[{nn=4}, Riffle[Partition[Range[0, 20nn, 2], 5], Partition[Range[1, 20nn+1, 2], 5]]]// Flatten (* Harvey P. Dale, Mar 18 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Oct 18 2007
EXTENSIONS
Edited by R. J. Mathar, Jul 22 2008
STATUS
approved