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!)
A270755 a(1) = 1; a(n) = min{(n-1-a(n-1));(n-1-i)}, where i (0<=i<=n-2) is the largest number such that a(n-1)=a(i) or i=0 if no such a(i) exists. 0

%I #15 Mar 27 2016 10:30:27

%S 1,0,2,1,3,2,3,2,2,1,6,5,7,6,3,8,8,1,8,2,11,10,12,11,3,10,4,23,5,17,

%T 13,18,14,19,15,20,16,21,17,9,31,10,16,6,30,15,11,23,20,13,19,17,13,3,

%U 29,26,30,12,35,24,36,25,37,26,8,46,20,18,36,8,5,42,30,16,31,34,42,5,7,66,14,48,34,49,35,26,30,14,7,10,48,9,52,41,53,42,19,63,35,14

%N a(1) = 1; a(n) = min{(n-1-a(n-1));(n-1-i)}, where i (0<=i<=n-2) is the largest number such that a(n-1)=a(i) or i=0 if no such a(i) exists.

%C Sum_{i=1..n} a(n) ~ n*(n+1)/5.

%e a(1) = 1;

%e a(2) = min{(1-1);(1-0)} = 0;

%e a(3) = min{(2-0);(2-0)} = 2;

%e a(4) = min{(3-2);(3-0)} = 1;

%e a(5) = min{(4-1);(4-1)} = 3;

%e a(6) = min{(5-3);(5-0)} = 2;

%e a(7) = min{(6-2);(6-3)} = 3;

%e a(8) = min{(7-3);(7-5)} = 2;

%e a(9) = min{(8-2);(8-6)} = 2;

%e a(10) = min{(9-2);(9-8)} = 1;

%e and so on.

%t a = {1}; Do[AppendTo[a, Min[n - 1 - a[[n - 1]], n - 1 - (If[MissingQ@#, 0, #] &@ SelectFirst[Range[n - 2, 1, -1], a[[n - 1]] == a[[#]] &])]], {n, 2, 120}]; a (* _Michael De Vlieger_, Mar 27 2016, Version 10.2 *)

%Y Cf. A181391, A267794, A268584.

%K nonn

%O 1,3

%A _Ctibor O. Zizka_, Mar 22 2016

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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)