Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A116533
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A116533 a(1)=1, a(2)=2, for n>2 if a(n-1) is prime, then a(n)=2a(n-1), otherwise a(n)=a(n-1)-1. +0
1
1, 2, 4, 3, 6, 5, 10, 9, 8, 7, 14, 13, 26, 25, 24, 23, 46, 45, 44, 43, 86, 85, 84, 83, 166, 165, 164, 163, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 634, 633, 632, 631, 1262, 1261, 1260, 1259, 2518, 2517, 2516, 2515, 2514, 2513, 2512, 2511, 2510, 2509, 2508 (list; graph; listen)
OFFSET

1,2

MAPLE

a[1]:=1: a[2]:=2: for n from 3 to 60 do if isprime(a[n-1])=true then a[n]:=2*a[n-1] else a[n]:=a[n-1]-1 fi od: seq(a[n], n=1..60); - Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 02 2006

CROSSREFS

Sequence in context: A091857 A132340 A132666 this_sequence A087559 A091850 A143273

Adjacent sequences: A116530 A116531 A116532 this_sequence A116534 A116535 A116536

KEYWORD

nonn

AUTHOR

Rodolfo Marcelo Kurchan (rkurchan(AT)yahoo.com), Mar 26 2006

EXTENSIONS

More terms from Emeric Deutsch (deutsch(AT)duke.poly.edu), Apr 02 2006

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 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research