Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A082561
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A082561 a(1)=1, a(n)=3*a(n-1) if n is not a multiple of 3, or a(n)=a(n/3)+1 if n is a multiple of 3. +0
1
1, 3, 2, 6, 18, 4, 12, 36, 3, 9, 27, 7, 21, 63, 19, 57, 171, 5, 15, 45, 13, 39, 117, 37, 111, 333, 4, 12, 36, 10, 30, 90, 28, 84, 252, 8, 24, 72, 22, 66, 198, 64, 192, 576, 20, 60, 180, 58, 174, 522, 172, 516, 1548, 6, 18, 54, 16, 48, 144, 46, 138, 414, 14, 42, 126, 40, 120 (list; graph; listen)
OFFSET

1,2

COMMENT

b(1)=1, b(n)=3*b(n/3) if n is a multiple of 3, or b(n)=b(n-1)+1 if n is not a multiple of 3 produces the sequence 1, 2, 3, 4, ...

PROGRAM

(PARI) a(n)=if(n<2, 1, if(n%3, 3*a(n-1), 1+a(n/3)))

CROSSREFS

Sequence in context: A073883 A074718 A007812 this_sequence A110768 A140230 A025240

Adjacent sequences: A082558 A082559 A082560 this_sequence A082562 A082563 A082564

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), May 04 2003

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 November 27 22:38 EST 2009. Contains 167602 sequences.


AT&T Labs Research