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!)
 A305557 a(1) = a(2) = 1; a(n) = n - a(a(n-2)) - a(n-a(n-2)) for n > 2. 1
 1, 1, 1, 2, 2, 3, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 8, 9, 9, 10, 11, 11, 12, 13, 14, 15, 16, 16, 17, 17, 18, 19, 19, 19, 20, 20, 21, 21, 21, 22, 22, 22, 22, 23, 23, 24, 24, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 27, 28, 28, 28, 28, 29, 29, 30, 31, 31, 32, 33, 33, 33, 33, 34, 35, 36, 37, 37 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS Let a_i(n) = n - a_i(a_i(n-i)) - a_i(n-a_i(n-i)). This sequence is generated by a_2(n) with initial conditions 1, 1. LINKS Altug Alkan, Proof of basic property FORMULA a(n+1) - a(n) = 0 or 1 for all n >= 1 and a(n) hits every positive integer. MAPLE a:=proc(n) option remember: if n<3 then 1 else n-procname(procname(n-2))-procname(n-procname(n-2)) fi; end: seq(a(n), n=1..100); # Muniru A Asiru, Jun 26 2018 PROG (PARI) a=vector(99); a[1]=a[2]=1; for(n=3, #a, a[n] = n-a[a[n-2]]-a[n-a[n-2]]); a (GAP) a:=[1, 1];; for n in [3..100] do a[n]:=n-a[a[n-2]]-a[n-a[n-2]]; od; a; # Muniru A Asiru, Jun 26 2018 CROSSREFS Cf. A005229, A287422, A305845. Sequence in context: A085972 A136378 A344374 * A099249 A050296 A057062 Adjacent sequences:  A305554 A305555 A305556 * A305558 A305559 A305560 KEYWORD nonn,easy AUTHOR Altug Alkan, Jun 21 2018 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 21 21:31 EDT 2021. Contains 347600 sequences. (Running on oeis4.)