Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A008344
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A008344 a(n+1) = a(n) - n if a(n) >= n else a(n) + n. +0
7
0, 1, 3, 0, 4, 9, 3, 10, 2, 11, 1, 12, 0, 13, 27, 12, 28, 11, 29, 10, 30, 9, 31, 8, 32, 7, 33, 6, 34, 5, 35, 4, 36, 3, 37, 2, 38, 1, 39, 0, 40, 81, 39, 82, 38, 83, 37, 84, 36, 85, 35, 86, 34, 87, 33, 88, 32, 89, 31, 90, 30, 91, 29, 92, 28, 93, 27, 94, 26, 95, 25, 96, 24, 97, 23, 98 (list; graph; listen)
OFFSET

1,3

COMMENT

p^a(n) = A084110(p^(n-1)) for n>1 and p prime. - Reinhard Zumkeller (reinhard.zumkeller(AT)lhsystems.com), May 12 2003

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

Index entries for sequences related to Recaman's sequence

FORMULA

This is a concatenation S_0, S_1, S_2, ... where S_i = [b_0, b_1, ..., b_{3^(i+1)-1}] with b_0 = 0, b_{2j-1} = k+1-j, b_{2j} = 2k+j (j=1..k), k=(3^(i+1)-1)/2. E.g. S_0 = [0, 1, 3], S_1 = [0, 4, 9, 3, 10, 2, 11, 1, 12].

With offset 1 (i.e. a(1) = 1) : a((3^n-1)/2) = 0; a((3^n-1)/2 + 2k-1) = (3^n-1)/2-k for 1< = k< = (3^n-1)/2; a((3^n-1)/2 + 2k) = 3^n+k for 1< = k<(3^n-1)/2. - Benoit Cloitre (benoit7848c(AT)orange.fr), Jan 09 2003

MAPLE

A008344 := proc(n) option remember; if n = 0 then 0 elif A008344(n-1) >= (n-1) then A008344(n-1)-(n-1) else A008344(n-1)+(n-1); fi; end;

MATHEMATICA

a[1]=0; a[n_] := a[n]=If[a[n-1]>=n-1, a[n-1]-n+1, a[n-1]+n-1]

CROSSREFS

Cf. A046901, A008343.

Equals A085059(n)-1.

Sequence in context: A112238 A111493 A021332 this_sequence A088230 A072329 A068630

Adjacent sequences: A008341 A008342 A008343 this_sequence A008345 A008346 A008347

KEYWORD

nonn,easy,nice

AUTHOR

njas

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 July 19 08:04 EDT 2008. Contains 142098 sequences.


AT&T Labs Research