%I
%S 1,2,4,5,7,9,11,14,16,19,21,24,27,30,33,36,40,43,47,50,54,57,61,65,69,
%T 73,77,81,85,90,94,99,103,108,112,117,121,126,131,136,141,146,151,156,
%U 161,166,172,177,183,188,194,199,205,210,216,221,227,233,239,245
%N a(n) is the minimal sum of a positive integer sequence of length n with no duplicate substrings of length greater than 1.
%C The lexicographically earliest positive integer sequence with no duplicate substrings is [1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, ...].
%C Note: Trivial substring of length 1 are allowed to recur, i.e., duplicate terms are permitted.
%C Nonexamples of positive integer sequences with no duplicate substrings are
%C [1, 1, 1] (the substring [1, 1] occurs twice) and [1, 2, 3, 1, 2] (the substring [1, 2] occurs twice).
%H Peter Kagey, <a href="/A259280/b259280.txt">Table of n, a(n) for n = 1..10000</a>
%F a(1) = 1, a(n) = ceiling((n + 1 + A060432(n  1))/2) for n > 1.
%e Lexicographically earliest examples:
%e a(1) = 1 via [1]
%e a(2) = 2 via [1, 1]
%e a(3) = 4 via [1, 1, 2]
%e a(4) = 5 via [1, 1, 2, 1]
%e a(5) = 7 via [1, 1, 2, 2, 1]
%e a(6) = 9 via [1, 1, 2, 1, 3, 1]
%e a(7) = 11 via [1, 1, 2, 2, 1, 3, 1]
%e a(8) = 14 via [1, 1, 2, 1, 3, 1, 4, 1]
%e a(9) = 16 via [1, 1, 2, 1, 3, 2, 2, 3, 1]
%e a(10) = 19 via [1, 1, 2, 1, 3, 2, 2, 3, 3, 1]
%e a(11) = 21 via [1, 1, 2, 1, 3, 2, 2, 3, 1, 4, 1]
%e a(12) = 24 via [1, 1, 2, 1, 3, 2, 2, 3, 3, 1, 4, 1]
%e a(13) = 27 via [1, 1, 2, 1, 3, 1, 4, 2, 2, 3, 2, 4, 1]
%o (Ruby)
%o def a259280(n)
%o lower_bound = 0.5 * (a060432(n  1) + n + 1)
%o lower_bound.ceil
%o end
%K nonn
%O 1,2
%A _Peter Kagey_, Nov 30 2015
