cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A284432 The number of positive integer sequences of length n with no duplicate substrings (forward or backward) of length greater than 1 and a minimal sum (= A282168(n)).

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 4, 48, 48, 144, 144, 144, 2160, 8496, 21312, 110592, 203904, 407808, 815616, 1631232, 15667200, 31334400, 445114368, 890228736, 7291772928, 14583545856, 36458864640, 72917729280, 145835458560, 1694545920000, 16054441574400, 101226251059200, 421941436416000, 2144473989120000, 13603849760931840
Offset: 1

Views

Author

Peter Kagey, Mar 27 2017

Keywords

Examples

			For n = 7 the a(7) = 4 solutions are:
[1,3,3,2,2,1,1],
[1,2,2,3,3,1,1],
[1,1,3,3,2,2,1], and
[1,1,2,2,3,3,1].
		

Crossrefs

Extensions

Terms a(11) onward from Max Alekseyev, Feb 06 2025

A282193 a(n) is the minimal product of a positive integer sequence of length n with no duplicate substrings (forward or backward) of length greater than 1.

Original entry on oeis.org

1, 1, 2, 4, 6, 12, 36, 96, 240, 480, 1440, 5760, 17280, 40320, 120960, 483840, 1935360, 5806080, 17418240, 69672960, 348364800, 1045094400, 3832012800, 15328051200, 76640256000, 229920768000, 919683072000, 4598415360000, 22072393728000, 71735279616000, 286941118464000, 1434705592320000
Offset: 1

Views

Author

Peter Kagey, Feb 08 2017

Keywords

Examples

			a(1)  = 1    via [1];
a(2)  = 1    via [1,1];
a(3)  = 2    via [1,1,2];
a(4)  = 4    via [1,1,2,2];
a(5)  = 6    via [1,1,2,3,1];
a(6)  = 12   via [1,1,2,2,3,1];
a(7)  = 36   via [1,1,2,2,3,3,1];
a(8)  = 96   via [1,1,2,2,3,1,4,2];
a(9)  = 240  via [1,1,2,2,3,1,4,5,1];
a(10) = 480  via [1,1,2,2,3,1,4,2,5,1];
a(11) = 1440 via [1,1,2,2,3,3,1,4,2,5,1];
a(12) = 5760 via [1,1,2,2,3,1,4,2,5,1,6,2].
...
[1,2,3,1,2] is invalid because the substring [1,2] appears twice.
[1,2,1] is invalid because the substring [1,2] appears twice (once forward and once backward).
		

Crossrefs

Cf. A282168 is the sum analog.

Extensions

Terms a(13) onward from Max Alekseyev, Feb 05 2025

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.

Original entry on oeis.org

1, 3, 4, 7, 8, 12, 13, 17, 18, 22, 24, 28, 30, 35, 37, 42, 44, 49, 51, 56, 59, 64, 67, 72, 75, 81, 84, 90, 93, 99, 102, 108, 111, 117, 121, 127, 131, 137, 141, 147, 151, 158, 162, 169, 173, 180, 184, 191, 195, 202, 206, 213, 218, 225, 230, 237, 242, 249, 254, 261, 266, 274, 279, 287, 292, 300, 305, 313, 318, 326, 331, 339, 344, 352, 358, 366, 372, 380, 386, 394
Offset: 1

Views

Author

Peter Kagey, Feb 07 2017

Keywords

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.

Examples

			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].
		

Crossrefs

Cf. A282169 is the product analog.

Programs

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

Formula

For n>=4, we seem to have a(n) = a(n-1) + a(n-2) - a(n-3) + d(n), where d(n) is either 0 or 1 (with a clear formula). This observation leads to the conjecture: for n>=4, a(n) = -3/2 + 2*n + n*m/2 - m*(2*m^2+15*m+46)/24 + (-1)^n*(m%2+2)/4 + (m%2)*3/8, where m is the largest integer such that (2*m^2 + 8*m + 1 + 3*(-1)^m)/4 <= n. - Max Alekseyev, May 28 2025

Extensions

a(12)-a(21) from Lars Blomberg, Jun 10 2017
Terms a(22) onward from Max Alekseyev, Feb 04 2025

A282167 a(n) is the minimal sum of a positive integer sequence of length n with no duplicate substrings (forward or backward) of length greater than 1, and no self-adjacent terms.

Original entry on oeis.org

1, 3, 6, 7, 11, 13, 17, 19, 25, 27, 31, 35, 39, 45, 47, 53, 57, 63, 67, 73, 77, 83, 87, 95, 99, 105, 111, 117, 123, 129, 135, 141, 149, 153, 161, 167, 175, 181, 189, 195, 203, 209, 217, 223, 231, 237, 247, 253, 261, 269, 277, 285, 293, 301, 309, 317, 325, 333, 341, 351, 357, 367, 375, 385, 393, 403, 411, 421, 429, 439
Offset: 1

Views

Author

Peter Kagey, Feb 07 2017

Keywords

Comments

For n>=7, we seem to have a(n) = a(n-1) + a(n-2) - a(n-3) + d(n), where d(n) is in {-2, 0, 2}. Compare to A282166. - Max Alekseyev, Jun 13 2025

Examples

			Examples:
  [1,1] is invalid because 1 is self-adjacent.
  [1,2,3,1,2] is invalid because the substring [1,2] appears twice.
  [1,2,1] is invalid because the substring [1,2] appears twice (once forward and once backward).
  a(1)  = 1  via [1];
  a(2)  = 3  via [1,2];
  a(3)  = 6  via [1,2,3];
  a(4)  = 7  via [1,2,3,1];
  a(5)  = 11 via [1,2,3,1,4];
  a(6)  = 13 via [1,2,3,1,4,2];
  a(7)  = 17 via [1,2,3,1,4,5,1];
  a(8)  = 19 via [1,2,3,1,4,2,5,1];
  a(9)  = 25 via [1,2,3,1,4,2,5,1,6];
  a(10) = 27 via [1,2,3,1,4,2,5,1,6,2].
		

Crossrefs

Extensions

Terms a(11) onward from Max Alekseyev, Feb 05 2025
Showing 1-4 of 4 results.