|
| |
|
|
A158289
|
|
Period 18: repeat 0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1.
|
|
4
| |
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 0,3
|
|
|
COMMENTS
| A toothed or zigzag sequence.
Sequence contains only numbers 0,...,9; abs(a(n+1)-a(n)) = 1.
|
|
|
LINKS
| Arkadiusz Wesolowski, Table of n, a(n) for n = 0..10000
|
|
|
FORMULA
| a(18*k+j) = a(18*(k+1)-j) = j for k >= 0, j = 0,...,9.
G.f.: x*(1+x+x^2)*(1+x^3+x^6)/((1-x)*(1+x)*(1-x+x^2)*(1-x^3+x^6)). [From Klaus Brockhaus, Sep 07 2009]
a(n)=(1/153)*{13*(n mod 18)+13*[(n+1) mod 18]+13*[(n+2) mod 18]+13*[(n+3) mod 18]+13*[(n+4) mod 18]+13*[(n+5) mod 18]+13*[(n+6) mod 18]+13*[(n+7) mod 18]+13*[(n+8) mod 18]-4*[(n+9) mod 18]-4*[(n+10) mod 18]-4*[(n+11) mod 18]-4*[(n+12) mod 18]-4*[(n+13) mod 18]-4*[(n+14) mod 18]-4*[(n+15) mod 18]-4*[(n+16) mod 18]-4*[(n+17) mod 18]}, with n>=0 [From Paolo P. Lava (paoloplava(AT)gmail.com), Nov 12 2009]
|
|
|
PROG
| (MAGMA) [ s lt 9 select r else 9-r where r is n mod 9 where s is n mod 18: n in [0..104] ]; [From Klaus Brockhaus, Sep 07 2009]
(MAGMA) S:=[]; a:=0; for n in [0..104] do Append(~S, a); if n mod 18 eq 0 then d:=1; else if n mod 9 eq 0 then d:=-1; end if; end if; a+:=d; end for; S; [From Klaus Brockhaus, Sep 07 2009]
|
|
|
CROSSREFS
| Cf. A007877 (repeat 0,1,2,1), A068073 (repeat 1,2,3,2), A028356 (repeat 1,2,3,4,3,2), A130784 (repeat 1,3,2).
Sequence in context: A081597 A028902 A081598 * A179987 A073796 A017894
Adjacent sequences: A158286 A158287 A158288 * A158290 A158291 A158292
|
|
|
KEYWORD
| easy,nonn
|
|
|
AUTHOR
| Jaroslav Krizek (jaroslav.krizek(AT)atlas.cz), Mar 15 2009
|
|
|
EXTENSIONS
| Edited and extended by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Sep 07 2009
|
| |
|
|