OFFSET
1,1
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 123.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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
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