Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A131570
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A131570 a(1) = 1; for n >= 1, if a(n) is odd then a(n+1) = a(n) followed by a(n)+1, but if a(n) is even then a(n+1) = a(n)/2. +0
1
1, 12, 6, 3, 34, 17, 1718, 859, 859860, 429930, 214965, 214965214966, 107482607483, 107482607483107482607484, 53741303741553741303742, 26870651870776870651871, 2687065187077687065187126870651870776870651872 (list; graph; listen)
OFFSET

1,2

EXAMPLE

17 is odd so the next term is 1718; 1718 is even so the next term is 1718/2 = 859.

MAPLE

catL := proc(a, b) a*10^( max(ilog10(b)+1, 1)) +b ; end: A131570 := proc(n) option remember ; local prev; if n = 1 then 1 ; else prev := A131570(n-1) ; if prev mod 2 = 1 then catL(prev, prev+1) ; else prev/2 ; fi ; fi ; end: seq(A131570(n), n=1..20) ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 26 2007

MATHEMATICA

a = {1}; Do[If[OddQ[a[[ -1]]], AppendTo[a, FromDigits[Join[IntegerDigits[a[[ -1]]], IntegerDigits[a[[ -1]] + 1]]]], AppendTo[a, a[[ -1]]/2]], {25}]; a - Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Oct 26 2007

CROSSREFS

Sequence in context: A028578 A013680 A033963 this_sequence A033332 A051725 A070292

Adjacent sequences: A131567 A131568 A131569 this_sequence A131571 A131572 A131573

KEYWORD

nonn,base

AUTHOR

Rodolfo Kurchan (rodolfokurchan(AT)yahoo.com.ar), Aug 27 2007

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl) and Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Oct 26 2007

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 17 23:40 EST 2009. Contains 171025 sequences.


AT&T Labs Research