Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A158289
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A158289 Period 18: repeat 0,1,2,3,4,5,6,7,8,9,8,7,6,5,4,3,2,1. +0
2
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, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4 (list; graph; listen)
OFFSET

0,3

COMMENT

A toothed or zigzag sequence.

Sequence contains only numbers 0,...,9; abs(a(n+1)-a(n)) = 1.

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 (ppl(AT)spl.at), Nov 12 2009]

PROGRAM

(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 this_sequence A073796 A017894 A028903

Adjacent sequences: A158286 A158287 A158288 this_sequence A158290 A158291 A158292

KEYWORD

nonn,new

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 1 19:22 EST 2009. Contains 167811 sequences.


AT&T Labs Research