login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A070870
a(1) = 6; a(n+1) = (a(n)+1)/2 if a(n) odd, or 5*a(n)/2 if a(n) even.
1
6, 15, 8, 20, 50, 125, 63, 32, 80, 200, 500, 1250, 3125, 1563, 782, 1955, 978, 2445, 1223, 612, 1530, 3825, 1913, 957, 479, 240, 600, 1500, 3750, 9375, 4688, 11720, 29300, 73250, 183125, 91563, 45782, 114455, 57228, 143070, 357675, 178838
OFFSET
1,1
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 123.
LINKS
Eric Weisstein, Wolfram Sequences
EXAMPLE
a(5)=125 is odd, so a(6)=(125+1)/2=63.
On the other hand, a(3)=20 is even, so a(4)=5*20/2=50.
MATHEMATICA
a[1] = 6; a[n_] := a[n] = If[ EvenQ[ a[n - 1]], 5*a[n - 1]/2, (a[n - 1] + 1)/2]; Table[ a[n], {n, 1, 50}]
NestList[If[EvenQ[#], (5#)/2, (#+1)/2]&, 6, 50] (* Harvey P. Dale, Nov 08 2012 *)
PROG
(PARI) s=6; for(n=1, 100, t=s; if(s%2==0, s=5*s/2, s=(s+1)/2); print1(t, ", "))
(Haskell)
a070870 n = a070870_list !! (n-1)
a070870_list = 6 : f 6 where
f x = y : f y where
y = (if even x then 5 * x else x + 1) `div` 2
-- Reinhard Zumkeller, Aug 15 2012
CROSSREFS
Sequence in context: A205149 A289722 A351369 * A202749 A123623 A240990
KEYWORD
nonn,easy,nice
AUTHOR
N. J. A. Sloane, May 19 2002
EXTENSIONS
More terms from Benoit Cloitre and Robert G. Wilson v, May 20 2002
Example and extra link from Ben Branman, Jan 22 2012
STATUS
approved