

A270755


a(1) = 1; a(n) = min{(n1a(n1));(n1i)}, where i (0<=i<=n2) is the largest number such that a(n1)=a(i) or i=0 if no such a(i) exists.


0



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, 13, 18, 14, 19, 15, 20, 16, 21, 17, 9, 31, 10, 16, 6, 30, 15, 11, 23, 20, 13, 19, 17, 13, 3, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,3


COMMENTS

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


LINKS

Table of n, a(n) for n=1..100.


EXAMPLE

a(1) = 1;
a(2) = min{(11);(10)} = 0;
a(3) = min{(20);(20)} = 2;
a(4) = min{(32);(30)} = 1;
a(5) = min{(41);(41)} = 3;
a(6) = min{(53);(50)} = 2;
a(7) = min{(62);(63)} = 3;
a(8) = min{(73);(75)} = 2;
a(9) = min{(82);(86)} = 2;
a(10) = min{(92);(98)} = 1;
and so on.


MATHEMATICA

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 *)


CROSSREFS

Cf. A181391, A267794, A268584.
Sequence in context: A334523 A001480 A308117 * A305030 A110917 A329340
Adjacent sequences: A270752 A270753 A270754 * A270756 A270757 A270758


KEYWORD

nonn


AUTHOR

Ctibor O. Zizka, Mar 22 2016


STATUS

approved



