The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A003160 a(1) = a(2) = 1, a(n) = n - a(a(n-1)) - a(a(n-2)). (Formerly M0446) 7
 1, 1, 1, 2, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 8, 9, 9, 9, 10, 11, 12, 12, 12, 13, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27, 28, 29, 30, 30, 30, 31, 32, 33, 33, 33, 34, 35, 36, 36, 36, 37, 37, 37, 38 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS Sequence of indices n where a(n-1) < a(n) appears to be given by A003156. - Joerg Arndt, May 11 2010 The number n appears A080426(n+1) times. - John Keith, Dec 31 2020 REFERENCES N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 L. Carlitz, R. Scoville, and V. E. Hoggatt, Jr., Representations for a special sequence, Fibonacci Quarterly 10.5 (1972), 499-518, 550. FORMULA a(n) is asymptotic to n/2. MATHEMATICA Block[{a = {1, 1}}, Do[AppendTo[a, i - a[[ a[[-1]] ]] - a[[ a[[-2]] ]] ], {i, 3, 76}]; a] (* Michael De Vlieger, Dec 31 2020 *) PROG (PARI) a(n)=if(n<3, 1, n-a(a(n-1))-a(a(n-2))) (Haskell) a003160 n = a003160_list !! (n-1) a003160_list = 1 : 1 : zipWith (-) [3..] (zipWith (+) xs \$ tail xs) where xs = map a003160 a003160_list -- Reinhard Zumkeller, Aug 02 2013 (SageMath) @CachedFunction def a(n): return 1 if (n<3) else n - a(a(n-1)) - a(a(n-2)) [a(n) for n in range(1, 81)] # G. C. Greubel, Nov 06 2022 CROSSREFS Cf. A003156, A005206, A080426, A095774, A095775. Sequence in context: A239683 A132913 A278814 * A060740 A307467 A145339 Adjacent sequences: A003157 A003158 A003159 * A003161 A003162 A003163 KEYWORD nonn AUTHOR N. J. A. Sloane EXTENSIONS Edited by Benoit Cloitre, Jan 01 2003 STATUS approved

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

Last modified May 27 12:27 EDT 2024. Contains 372858 sequences. (Running on oeis4.)