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-6 of 6 results.

A283558 The number of positive integer sequences of length n with no duplicate substrings of length greater than 1 and a minimal sum (= A259280(n)).

Original entry on oeis.org

1, 1, 3, 2, 2, 6, 6, 48, 60, 168, 144, 288, 1872, 3744, 5760, 11520, 161280, 322560, 1866240, 2903040, 10782720, 8294400, 24883200, 282009600, 846028800, 3060633600, 9181900800, 10450944000, 31352832000, 668860416000, 1881169920000, 17850212352000, 41009504256000, 248816074752000, 381752082432000
Offset: 1

Views

Author

Peter Kagey, Mar 10 2017

Keywords

Examples

			For n = 7 the a(7) = 6 sequences are
1,3,1,2,2,1,1;
1,2,2,1,3,1,1;
1,3,1,1,2,2,1;
1,1,3,1,2,2,1;
1,2,2,1,1,3,1; and
1,1,2,2,1,3,1.
		

Crossrefs

A283557 is the product analog.

Programs

  • Mathematica
    s[1] = 1; s[n_] := Ceiling[(n+1+ Sum[Floor[Sqrt[2 k] + 1/2], {k, n-1}])/2]; subQ[w_] := Block[{n = Length@w}, Length@ Union@ Flatten[ Table[ Take[w, {i, j}], {j, 2, n}, {i, j - 1}], 1] == n (n-1)/2]; a[n_] := Sum[ Length@ Select[ Permutations@ e, subQ], {e, IntegerPartitions[ s[n], {n}]}]; Array[a, 10] (* Giovanni Resta, Mar 10 2017 *)

Extensions

a(11)-a(13) from Giovanni Resta, Mar 10 2017
Terms a(14) onward from Max Alekseyev, Feb 06 2025

A274701 First differences of A259280.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8
Offset: 1

Views

Author

Braxton Carrigan, Peter Kagey, Joseph O'Brien, Jul 06 2016

Keywords

Crossrefs

Formula

If n is in A185869 then a(n) = ceiling(k) else a(n) = floor(k) where k is (A002024(n) + 1)/2.

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

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 12, 24, 48, 120, 240, 720, 1440, 4320, 8640, 25920, 60480, 181440, 483840, 1451520, 3870720, 11612160, 34836480, 104509440, 348364800, 1045094400, 3483648000, 10450944000, 38320128000, 114960384000, 459841536000, 1379524608000, 5518098432000, 16554295296000
Offset: 1

Views

Author

Keywords

Comments

a(n) = sqrt(A282165(n-1)) if A282165(n-1) is square.

Examples

			  a(1)  = 1   via [1];
  a(2)  = 1   via [1,1];
  a(3)  = 2   via [1,1,2];
  a(4)  = 2   via [1,1,2,1];
  a(5)  = 4   via [1,1,2,2,1];
  a(6)  = 6   via [1,1,2,1,3,1];
  a(7)  = 12  via [1,1,2,2,1,3,1];
  a(8)  = 24  via [1,1,2,1,3,1,4,1];
  a(9)  = 48  via [1,1,2,2,1,3,1,4,1];
  a(10) = 120 via [1,1,2,1,3,1,4,1,5,1].
		

Crossrefs

Product analog of A259280.

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

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

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 13, 16, 19, 22, 25, 29, 33, 37, 41, 45, 49, 53, 57, 62, 67, 72, 77, 82, 87, 92, 97, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 181, 188, 195, 202, 209, 216, 223, 230, 237, 244, 251, 258, 265, 273, 281, 289, 297, 305, 313, 321, 329, 337, 345, 353
Offset: 1

Views

Author

Peter Kagey, Feb 07 2017

Keywords

Comments

This sequence shares first 12 terms with A025224, but then they diverge: a(13) = 33 > 32 = A025224(13).
We seem to have a(n) = a(n-1) + a(n-2) - a(n-3) + d(n), where d(n) is 0 or 1. Compare to A282166. - Max Alekseyev, Jun 13 2025

Examples

			[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)  = 2   via [1,1];
a(3)  = 4   via [1,1,2];
a(4)  = 6   via [1,1,2,2];
a(5)  = 8   via [1,1,2,3,1];
a(6)  = 10  via [1,1,2,2,3,1];
a(7)  = 13  via [1,1,2,2,3,3,1];
a(8)  = 16  via [1,1,2,2,3,1,4,2];
a(9)  = 19  via [1,1,2,2,3,3,1,4,2];
a(10) = 22  via [1,1,2,2,3,1,4,2,5,1];
a(11) = 25  via [1,1,2,2,3,3,1,4,2,5,1];
a(12) = 29  via [1,1,2,2,3,3,1,4,4,2,5,1].
		

Crossrefs

Extensions

Edited and terms a(13) onward added by Max Alekseyev, Feb 05 2025
Showing 1-6 of 6 results.