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.

A202335 T(n,k)=Number of (n+1)X(k+1) binary arrays with consecutive windows of two bits considered as a binary number nondecreasing in every row and column.

Original entry on oeis.org

16, 25, 25, 36, 48, 36, 49, 82, 82, 49, 64, 129, 162, 129, 64, 81, 191, 289, 289, 191, 81, 100, 270, 478, 576, 478, 270, 100, 121, 368, 746, 1052, 1052, 746, 368, 121, 144, 487, 1112, 1796, 2102, 1796, 1112, 487, 144, 169, 629, 1597, 2906, 3896, 3896, 2906, 1597
Offset: 1

Views

Author

R. H. Hardin Dec 17 2011

Keywords

Comments

Table starts
..16..25...36...49....64....81....100....121....144.....169.....196.....225
..25..48...82..129...191...270....368....487....629.....796.....990....1213
..36..82..162..289...478...746...1112...1597...2224....3018....4006....5217
..49.129..289..576..1052..1796...2906...4501...6723....9739...13743...18958
..64.191..478.1052..2102..3896...6800..11299..18020...27757...41498...60454
..81.270..746.1796..3896..7790..14588..25885..43903...71658..113154..173606
.100.368.1112.2906..6800.14588..29174..55057..98958..170614..283766..457370
.121.487.1597.4501.11299.25885..55057.110112.209068..379680..663444.1120812
.144.629.2224.6723.18020.43903..98958.209068.418134..797812.1461254.2582064
.169.796.3018.9739.27757.71658.170614.379680.797812.1595622.3056874.5638936

Examples

			Some solutions for n=5 k=3
..0..0..1..0....0..0..1..0....0..0..1..0....0..0..1..0....0..0..1..1
..0..0..1..0....0..0..1..0....0..1..1..1....0..0..1..0....0..0..1..1
..0..0..1..0....0..0..1..0....0..1..1..1....0..0..1..0....0..0..1..1
..0..0..1..1....0..0..1..0....0..1..1..1....0..0..1..0....0..1..1..1
..0..0..1..1....0..0..1..0....0..1..1..1....0..0..1..0....0..1..1..1
..0..1..1..1....0..0..1..1....0..1..1..1....0..1..1..1....0..1..1..1
		

Crossrefs

Column 1 is A000290(n+3)
Column 2 is A110610(n+3)

A087035 Maximum value taken on by f(P) = Sum_{i=1..n} p(i)*p(n+1-i) as {p(1),p(2),...,p(n)} ranges over all permutations P of {1,2,3,...,n}.

Original entry on oeis.org

0, 1, 4, 13, 28, 53, 88, 137, 200, 281, 380, 501, 644, 813, 1008, 1233, 1488, 1777, 2100, 2461, 2860, 3301, 3784, 4313, 4888, 5513, 6188, 6917, 7700, 8541, 9440, 10401, 11424, 12513, 13668, 14893, 16188, 17557, 19000, 20521, 22120, 23801, 25564, 27413, 29348
Offset: 0

Views

Author

John W. Layman, Jul 31 2003

Keywords

Comments

The corresponding minimum value of f(P) is given by A000292(n)=binomial(n+3,3).
The number of distinct values of f(P) is given by A087034.
Also, number of (w,x,y) with all terms in {0,...,n-1} and 2|w-x| <= max(w,x,y)-min(w,x,y). For a guide to related sequences, see A212959. - Clark Kimberling, Jun 10 2012

Examples

			a(3)=13, since f takes on the values 10 and 13: f({1,2,3})=10, f({1,3,2})=13, f({2,1,3})=13, f({2,3,1})=13, f({3,1,2})=13 and f({3,2,1})=10.
		

Crossrefs

Programs

  • Mathematica
    t = Compile[{{n, _Integer}}, Module[{s = 0},
    (Do[If[Max[w, x, y] - Min[w, x, y] >= 2 Abs[w - x],
      s = s + 1],
    {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
    m = Map[t[#] &, Range[0, 45]]

Formula

From Clark Kimberling, Jun 10 2012: (Start)
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
G.f.: (x + x^2 + 3*x^3 - x^4)/(((1 - x)^4)*(1 + x)).
a(n+1) + A213045(n) = (n+1)^3. (End)
a(n) = (2*(n-1)*(n+1)*(2*n+3)-3*(-1)^n+9)/12. - Bruno Berselli, Jun 11 2012

Extensions

a(11) and a(12) from R. J. Mathar, Jun 26 2012
Merged with a sequence of Clark Kimberling by Max Alekseyev, Jun 27 2012
a(0)=0 prepended by Alois P. Heinz, Aug 24 2024

A110611 Minimal value of sum(p(i)p(i+1),i=1..n), where p(n+1)=p(1), as p ranges over all permutations of {1,2,...,n}.

Original entry on oeis.org

1, 4, 11, 21, 37, 58, 87, 123, 169, 224, 291, 369, 461, 566, 687, 823, 977, 1148, 1339, 1549, 1781, 2034, 2311, 2611, 2937, 3288, 3667, 4073, 4509, 4974, 5471, 5999, 6561, 7156, 7787, 8453, 9157, 9898, 10679, 11499, 12361, 13264, 14211, 15201, 16237
Offset: 1

Views

Author

Emeric Deutsch, Jul 30 2005

Keywords

Examples

			a(4)=21 because the values of the sum for the permutations of {1,2,3,4} are 21 (8 times), 24 (8 times) and 25 (8 times).
		

Crossrefs

Programs

  • Magma
    I:=[1, 4, 11, 21, 37]; [n le 5 select I[n] else 3*Self(n-1)-2*Self(n-2)-2*Self(n-3)+3*Self(n-4)-Self(n-5): n in [1..50]]; // Vincenzo Librandi, May 11 2012
  • Maple
    a:=proc(n) if n mod 2 = 0 then (n^3+3*n^2+5*n-6)/6 else (n^3+3*n^2+5*n-3)/6 fi end: seq(a(n),n=1..52);
  • Mathematica
    CoefficientList[Series[(1+x+x^2-2*x^3+x^4)/((1-x)^4*(1+x)),{x,0,50}],x] (* Vincenzo Librandi, May 11 2012 *)

Formula

a(n) = (n^3+3*n^2+5*n-6)/6 if n is even; a(n)=(n^3+3*n^2+5*n-3)/6 if n is odd.
G.f.: x*(1+x+x^2-2*x^3+x^4)/((1-x)^4*(1+x)). [Colin Barker, May 10 2012]
a(n) = (2*n^3+6*n^2+10*n-9-3*(-1)^n)/12. - Luce ETIENNE, Jul 26 2014

A306262 Difference between maximum and minimum sum of products of successive pairs in permutations of [n].

Original entry on oeis.org

0, 0, 0, 4, 11, 24, 42, 68, 101, 144, 196, 260, 335, 424, 526, 644, 777, 928, 1096, 1284, 1491, 1720, 1970, 2244, 2541, 2864, 3212, 3588, 3991, 4424, 4886, 5380, 5905, 6464, 7056, 7684, 8347, 9048, 9786, 10564, 11381, 12240, 13140, 14084, 15071, 16104, 17182
Offset: 0

Views

Author

Louis Rogliano, Feb 01 2019

Keywords

Examples

			a(4) = 11 = 23 - 12. 1342 and 2431 have sums 23, 3214 and 4123 have sums 12.
		

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 0, (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>,
        <0|0|0|0|1>, <-1|3|-2|-2|3>>^n. <<1, 0, 0, 4, 11>>)[1, 1]):
    seq(a(n), n=0..50);  # Alois P. Heinz, Feb 02 2019
  • Mathematica
    a[n_] := Module[
      {min, max, perm, g, mperm},
      perm = Permutations[Range[n]];
      g[x_] := Sum[x[[i]] x[[i + 1]], {i, 1, Length[x] - 1}];
      mperm = Map[g, perm];
      min = Min[mperm];
      max = Max[mperm];
      Return[max - min]]
    LinearRecurrence[{3,-2,-2,3,-1},{0,0,0,4,11,24},60] (* Harvey P. Dale, Aug 05 2020 *)
  • PARI
    concat([0,0,0], Vec(x^3*(4 - x - x^2) / ((1 - x)^4*(1 + x)) + O(x^40))) \\ Colin Barker, Feb 05 2019

Formula

a(n+1) = a(n) + 1/4*((-1+(-1)^(n-1))^2+2*(n-1)*(n+4)) with a(n) = 0 for n <= 2.
From Alois P. Heinz, Feb 01 2019: (Start)
G.f.: -(x^2+x-4)*x^3/((x+1)*(x-1)^4).
a(n) = (2*n^3+6*n^2-26*n+15-3*(-1)^n)/12 for n > 0.
a(n) = A101986(n-1) - A026035(n) for n > 0. (End)
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5). - Wesley Ivan Hurt, May 28 2021
a(n) = A110610(n+1) - A110611(n+1). - Talmon Silver, Sep 24 2025

Extensions

More terms from Alois P. Heinz, Feb 01 2019
Showing 1-4 of 4 results.