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.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287422 a(1) = a(2) = 1; a(n) = n - a(a(n-1)) - a(n-a(n-1)) for n > 2. 5
1, 1, 1, 2, 3, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 8, 9, 10, 11, 11, 12, 13, 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 19, 19, 19, 19, 20, 21, 21, 22, 22, 22, 23, 24, 25, 25, 26, 26, 27, 28, 29, 29, 30, 31, 32, 33, 34, 35, 36, 36, 37, 38, 39, 40, 40, 41, 42, 42, 42, 43, 44, 45, 46, 46 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
Rémy Sigrist, Colored scatterplot of (a(n-a(n-1))/n, a(a(n-1))/n) for n <= 100000000 (where the hue is function of n)
MATHEMATICA
Nest[Function[{a, n}, Append[a, n - a[[a[[-1]] ]] - a[[-a[[-1]] ]] ] ] @@ {#, Length@ # + 1} &, {1, 1}, 80] (* Michael De Vlieger, Aug 07 2018 *)
PROG
(PARI) q=vector(10000); q[1]=q[2]=1; for(n=3, #q, q[n]=n-q[q[n-1]]-q[n-q[n-1]]); q
(Magma) I:=[1, 1, 1, 2]; [n le 4 select I[n] else n - Self(Self(n-1)) - Self(n-Self(n-1)): n in [1..100]]; // Vincenzo Librandi, Aug 08 2018
CROSSREFS
Sequence in context: A195851 A369149 A131754 * A120510 A029117 A308547
KEYWORD
nonn
AUTHOR
Altug Alkan, Jun 24 2017
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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 10 10:32 EDT 2024. Contains 373264 sequences. (Running on oeis4.)