login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282166 a(n) is the minimal sum of a positive integer sequence of length n with no duplicate substrings of length greater than 1, and every number different from its neighbors. 4
1, 3, 4, 7, 8, 12, 13, 17, 18, 22, 24, 28, 30, 35, 37, 42, 44, 49, 51, 56, 59 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

For example, [1,1] is not a valid sequence because 1 is self-adjacent; [1,2,3,1,2] is not valid because the substring [1,2] appears twice.

LINKS

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

EXAMPLE

a(1)  = 1  via [1];

a(2)  = 3  via [1,2];

a(3)  = 4  via [1,2,1];

a(4)  = 7  via [1,2,1,3];

a(5)  = 8  via [1,2,1,3,1];

a(6)  = 12 via [1,2,1,3,1,4];

a(7)  = 13 via [1,2,1,3,1,4,1];

a(8)  = 17 via [1,2,1,3,1,4,2,3];

a(9)  = 18 via [1,2,1,3,2,3,1,4,1];

a(10) = 22 via [1,2,1,3,1,4,2,3,4,1];

a(11) = 24 via [1,2,1,3,2,3,1,4,1,5,1].

MATHEMATICA

Table[Module[{s = Select[Permutations[Range@ n - 1, n], Length@ # > 1 &]}, Total@ First@ MinimalBy[#, Total] &@ DeleteCases[#, w_ /; Apply[Times, If[Length@ # > 0, Rest@ #, #] &@ Union@ Map[SequenceCount[w, #] &, s]] > 1] &@ Apply[Join, Map[MinimalBy[#, Total] &, Table[Select[Tuples[Range@ k, n], Function[w, Times @@ Boole@ {Length@ Union@ w == k, First@ #, If[n > 2, Xor @@ Rest@ #, True]} == 1 &@ Map[Length@ Split@ # == Length@ # &, {w, w[[1 ;; -1 ;; 2]], Rest[w][[1 ;; -1 ;; 2]]}]]], {k, n}]]]], {n, 7}] (* Michael De Vlieger, Mar 27 2017, Version 10 *)

CROSSREFS

Cf. A259280, A282167, A282168.

Cf. A282169 is the product analog.

Sequence in context: A051201 A026449 A286904 * A165157 A182079 A129819

Adjacent sequences:  A282163 A282164 A282165 * A282167 A282168 A282169

KEYWORD

nonn,more

AUTHOR

Peter Kagey, Feb 07 2017

EXTENSIONS

a(12)-a(21) from Lars Blomberg, Jun 10 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 14:47 EDT 2021. Contains 343860 sequences. (Running on oeis4.)