The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A062039 a(0) = 1; a(n+1) = a(n) - n if a(n) > n, otherwise a(n+1) = a(n) + a(a(n)). 11
 1, 1, 2, 4, 1, 2, 4, 5, 7, 12, 3, 7, 12, 24, 11, 18, 3, 7, 12, 24, 5, 7, 12, 24, 1, 2, 4, 5, 7, 12, 24, 25, 27, 32, 59, 25, 27, 32, 59, 21, 28, 35, 60, 18, 30, 54, 9, 21, 28, 35, 60, 10, 13, 37, 69, 15, 33, 65, 8, 15, 33, 65, 4, 5, 7, 12, 24, 25, 27, 32, 59, 74, 3, 7, 12, 24, 25, 27 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS a(A193854(n)) = 1, n>0; A123643 and A123644 give record values and their positions: A123643(n)=a(A123644(n)). - Reinhard Zumkeller, Oct 04 2006 LINKS R. Zumkeller, Table of n, a(n) for n = 0..10000 MATHEMATICA a[0] = 1; a[n_] := a[n] = If[a[n-1] > n-1, a[n-1] - (n-1), a[n-1] + a[a[n-1]]]; Table[a[n], {n, 0, 77}] (* Jean-François Alcover, Mar 20 2011 *) PROG (Haskell) a062039 n = a062039_list !! n a062039_list = 1 : f 1 0 where    f x n | x > n     = (x-n) : f (x-n) (n+1)          | otherwise =    x' : f x' (n+1) where x' = x + a062039 x -- Reinhard Zumkeller, Aug 10 2011 CROSSREFS A123643 and A123644 give record values and their positions: A123643(n)=a(A123644(n)). Cf. A193926 (first differences), A193927. Sequence in context: A069705 A106645 A115314 * A035492 A101229 A057176 Adjacent sequences:  A062036 A062037 A062038 * A062040 A062041 A062042 KEYWORD easy,nice,nonn AUTHOR Reinhard Zumkeller, Jul 12 2001 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 25 02:25 EDT 2021. Contains 347651 sequences. (Running on oeis4.)