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-10 of 14 results. Next

A169941 Triangle read by rows: A169940 with rows reversed.

Original entry on oeis.org

1, 1, 1, 1, 0, 3, 1, 1, 3, 3, 1, 0, 6, 4, 5, 1, 1, 6, 10, 7, 7, 1, 0, 9, 6, 27, 8, 13, 1, 1, 9, 17, 23, 41, 21, 15, 1, 0, 12, 8, 56, 34, 98, 20, 27, 1, 1, 12, 22, 50, 104, 96, 148, 53, 25, 1, 0, 15, 10, 96, 66, 294, 116, 325, 56, 45, 1, 1, 15, 27, 86, 184, 262, 518, 319
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Examples

			Triangle begins:
[1]
[1, 1]
[1, 0, 3]
[1, 1, 3, 3]
[1, 0, 6, 4, 5]
[1, 1, 6, 10, 7, 7]
[1, 0, 9, 6, 27, 8, 13]
[1, 1, 9, 17, 23, 41, 21, 15]
[1, 0, 12, 8, 56, 34, 98, 20, 27]
[1, 1, 12, 22, 50, 104, 96, 148, 53, 25]
[1, 0, 15, 10, 96, 66, 294, 116, 325, 56, 45]
[1, 1, 15, 27, 86, 184, 262, 518, 319, 487, 89, 59]
[1, 0, 18, 12, 143, 112, 608, 346, 1279, 434, 942, 112, 89]
[1, 1, 18, 32, 131, 291, 528, 1166, 1153, 2181, 1042, 1348, 197, 103]
[1, 0, 21, 14, 199, 168, 1083, 720, 3313, 1568, 4981, 1320, 2613, 220, 163]
...
		

Crossrefs

Related to thickness: A169940-A169954, A061909.

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

A169943 Second entry in row n of triangle in A169940.

Original entry on oeis.org

1, 0, 3, 4, 7, 8, 21, 20, 53, 56, 89, 112, 197, 220, 397, 456, 711, 850, 1347, 1428, 2303, 2642, 3777, 4636, 6693, 7550, 11109, 12876, 17965, 21000, 29207, 32952, 46263, 53372, 71069, 82660, 111877, 126042, 172461, 195898, 256577
Offset: 2

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    (* Very slow *) a[n_] := Module[{dd, xx, mm}, dd = Join[{1}, PadLeft[ IntegerDigits[#, 2], n - 1], {1}] & /@ Range[0, 2^(n - 1) - 1]; xx = (((x^Range[n, 0, -1]).#) & /@ dd)^2 // Expand; mm = Max[ CoefficientList[ #, x]] & /@ xx; Count[mm, 3]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 2, 20}] (* Jean-François Alcover, Oct 10 2017 *)

Formula

a(n) = A169953(n) - A169953(n-1) for n>2.

Extensions

a(15)-a(30) from Nathaniel Johnston, Nov 12 2010
a(31)-a(42) from Andrew Howroyd, Jul 09 2017

A169944 Maximal entry in row n of triangle in A169940.

Original entry on oeis.org

1, 1, 3, 3, 6, 10, 27, 41, 98, 148, 325, 518, 1279, 2181, 4981, 8393, 17730, 28938, 67290, 120550, 267894, 469928, 998433, 1725367, 3719207, 6830683, 15021379, 27155069, 57664535, 102865259
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Crossrefs

Related to thickness: A169940-A169954, A061909.

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Extensions

a(16)-a(30) from Nathaniel Johnston, Nov 12 2010

A169942 Number of Golomb rulers of length n.

Original entry on oeis.org

1, 1, 3, 3, 5, 7, 13, 15, 27, 25, 45, 59, 89, 103, 163, 187, 281, 313, 469, 533, 835, 873, 1319, 1551, 2093, 2347, 3477, 3881, 5363, 5871, 8267, 9443, 12887, 14069, 19229, 22113, 29359, 32229, 44127, 48659, 64789, 71167, 94625, 105699, 139119, 151145, 199657
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?
Leading entry in row n of triangle in A169940. Also the number of Sidon sets A with min(A) = 0 and max(A) = n. Odd for all n since {0,n} is the only symmetric Golomb ruler, and reversal preserves the Golomb property. Bounded from above by A032020 since the ruler {0 < r_1 < ... < r_t < n} gives rise to a composition of n: (r_1 - 0, r_2 - r_1, ... , n - r_t) with distinct parts. - Tomas Boothby, May 15 2012
Also the number of compositions of n such that every restriction to a subinterval has a different sum. This is a stronger condition than all distinct consecutive subsequences having a different sum (cf. A325676). - Gus Wiseman, May 16 2019

Examples

			For n=2, there is one Golomb Ruler: {0,2}.  For n=3, there are three: {0,3}, {0,1,3}, {0,2,3}. - _Tomas Boothby_, May 15 2012
From _Gus Wiseman_, May 16 2019: (Start)
The a(1) = 1 through a(8) = 15 compositions such that every restriction to a subinterval has a different sum:
  (1)  (2)  (3)   (4)   (5)   (6)    (7)    (8)
            (12)  (13)  (14)  (15)   (16)   (17)
            (21)  (31)  (23)  (24)   (25)   (26)
                        (32)  (42)   (34)   (35)
                        (41)  (51)   (43)   (53)
                              (132)  (52)   (62)
                              (231)  (61)   (71)
                                     (124)  (125)
                                     (142)  (143)
                                     (214)  (152)
                                     (241)  (215)
                                     (412)  (251)
                                     (421)  (341)
                                            (512)
                                            (521)
(End)
		

Crossrefs

Related to thickness: A169940-A169954, A061909.
Related to Golomb rulers: A036501, A054578, A143823.
Row sums of A325677.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@ReplaceList[#,{_,s__,_}:>Plus[s]]&]],{n,15}] (* Gus Wiseman, May 16 2019 *)
  • Sage
    def A169942(n):
        R = QQ['x']
        return sum(1 for c in cartesian_product([[0, 1]]*n) if max(R([1] + list(c) + [1])^2) == 2)
    [A169942(n) for n in range(1,8)]
    # Tomas Boothby, May 15 2012

Formula

a(n) = A169952(n) - A169952(n-1) for n>1. - Andrew Howroyd, Jul 09 2017

Extensions

a(15)-a(30) from Nathaniel Johnston, Nov 12 2011
a(31)-a(50) from Tomas Boothby, May 15 2012

A169954 Maximal entry in row n of triangle in A169950.

Original entry on oeis.org

1, 1, 2, 5, 8, 13, 20, 45, 86, 184, 332, 657, 1144, 2279, 4460, 9441, 17834, 35564, 64502, 123022, 243534, 511428, 981356, 1979789, 3705156, 7232134, 13723662, 28745041, 55900110, 113564645
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Crossrefs

Related to thickness: A169940-A169954, A061909.

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Extensions

A-number typo in definition corrected - R. J. Mathar, Sep 28 2010
a(16)-a(29) from Nathaniel Johnston, Nov 15 2010

A169950 Consider the 2^n monic polynomials f(x) with coefficients 0 or 1 and degree n. Sequence gives triangle read by rows, in which T(n,k) (n>=0) is the number of such polynomials of thickness k (1 <= k <= n+1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 1, 1, 1, 8, 4, 2, 1, 1, 13, 8, 8, 1, 1, 1, 20, 15, 18, 7, 2, 1, 1, 33, 23, 45, 13, 11, 1, 1, 1, 48, 44, 86, 36, 28, 10, 2, 1, 1, 75, 64, 184, 70, 84, 18, 14, 1, 1, 1, 100, 117, 332, 166, 188, 68, 36, 13, 2, 1, 1, 145, 173, 657, 282, 482, 134, 132, 23, 17, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

The thickness of a polynomial f(x) is the magnitude of the largest coefficient in the expansion of f(x)^2.

Examples

			Triangle begins:
n\k  [1]   [2]   [3]   [4]   [5]   [6]   [7]   [8]   [9]   [10]  [11]  [12]
[0]  1;
[1]  1,    1;
[2]  1,    2,    1;
[3]  1,    5,    1,    1;
[4]  1,    8,    4,    2,    1;
[5]  1,    13,   8,    8,    1,    1;
[6]  1,    20,   15,   18,   7,    2,    1;
[7]  1,    33,   23,   45,   13,   11,   1,    1;
[8]  1,    48,   44,   86,   36,   28,   10,   2,    1;
[9]  1,    75,   64,   184,  70,   84,   18,   14,   1,    1;
[10] 1,    100,  117,  332,  166,  188,  68,   36,   13,   2,    1;
[11] 1,    145,  173,  657,  282,  482,  134,  132,  23,   17,   1,    1;
[12] ...
For n = 3, the eight polynomials, their squares and thicknesses are as follows:
x^3, x^6, 1
x^3+1, x^6+2*x^3+1, 2
x^3+x, x^6+2*x^4+x^2, 2
x^3+x+1, x^6+2*x^4+2*x^3+x^2+2*x+1, 2
x^3+x^2, x^6+2*x^5+x^4, 2
x^3+x^2+1, x^6+2*x^5+2*x^3+x^4+2*x^2+1, 2
x^3+x^2+x, x^6+2*x^5+3*x^4+2*x^3+x^2, 3
x^3+x^2+x+1, x^6+2*x^5+3*x^4+4*x^3+3*x^2+2*x+1, 4
Hence T(3,1) = 1, T(3,2) = 5, T(3,3) = 1, T(3,4) = 1.
		

Crossrefs

Related to thickness: A169940-A169954, A061909, A274036.

Programs

  • Mathematica
    Last /@ Tally@ # & /@ Table[Max@ CoefficientList[SeriesData[x, 0, #, 0, 2^n, 1]^2, x] &@ IntegerDigits[#, 2] & /@ Range[2^n, 2^(n + 1) - 1], {n, 12}] // Flatten (* Michael De Vlieger, Jun 08 2016 *)
  • PARI
    seq(n) = {
      my(a = vector(n+1, k, vector(k)), x='x);
      for(k = 1, 2^(n+1)-1, my(pol = Pol(binary(k), x));
           a[poldegree(pol)+1][vecmax(Vec(sqr(pol)))]++);
      return(a);
    };
    concat(seq(11))  \\ Gheorghe Coserea, Jun 06 2016

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Extensions

Rows 17-30 of the triangle from Nathaniel Johnston, Nov 15 2010

A169945 Consider the 2^(n+1) polynomials f(x) with coefficients 0 or 1 and degree <= n. Sequence gives triangle read by rows, in which T(n,k) (n>=0) is the number of such polynomials of thickness k (0 <= k <= n+1).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 8, 2, 1, 1, 5, 16, 6, 3, 1, 1, 6, 29, 14, 11, 2, 1, 1, 7, 49, 29, 29, 9, 3, 1, 1, 8, 82, 52, 74, 22, 14, 2, 1, 1, 9, 130, 96, 160, 58, 42, 12, 3, 1, 1, 10, 205, 160, 344, 128, 126, 30, 17, 2, 1, 1, 11, 305, 277, 676, 294, 314, 98, 53, 15, 3, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

The thickness of a polynomial f(x) is the magnitude of the largest coefficient in the expansion of f(x)^2.

Examples

			Triangle begins:
  [1, 1]
  [1, 2, 1]
  [1, 3, 3, 1]
  [1, 4, 8, 2, 1]
  [1, 5, 16, 6, 3, 1]
  [1, 6, 29, 14, 11, 2, 1]
  [1, 7, 49, 29, 29, 9, 3, 1]
  [1, 8, 82, 52, 74, 22, 14, 2, 1]
  [1, 9, 130, 96, 160, 58, 42, 12, 3, 1]
  [1, 10, 205, 160, 344, 128, 126, 30, 17, 2, 1]
  [1, 11, 305, 277, 676, 294, 314, 98, 53, 15, 3, 1]
  [1, 12, 450, 450, 1333, 576, 796, 232, 185, 38, 20, 2, 1]
  [1, 13, 654, 712, 2477, 1177, 1796, 628, 501, 147, 64, 18, 3, 1]
  [1, 14, 947, 1086, 4563, 2212, 4075, 1370, 1425, 368, 251, 46, 23, 2, 1]
  [1, 15, 1343, 1657, 7997, 4289, 8535, 3265, 3515, 1117, 729, 205, 75, 21, 3, 1]
  ...
For n=2 the eight polynomials and their squares are:
  0, 0
  1, 1
  x, x^2
  x+1, x^2+2*x+1
  x^2, x^4
  x^2+1, x^4+2*x^2+1
  x^2+x, x^4+2*x^3+x^2
  x^2+x+1, x^4+2*x^3+3*x^2+2*x+1
Their thicknesses are respectively 0,1,1,2,1,2,2,3, so T(2,0)=1, T(2,1)=T(2,2)=3, T(2,3)=1.
Contribution from _R. J. Mathar_, Aug 02 2010: (Start)
  1 16 1902 2448 14044 7686 17976 6728 8918 2586 2290 532 326 54 26 2 1
  1 17 2648 3636 23784 13932 35810 14690 20444 6928 6008 1798 990 272 86 24 3 1
  1 18 3675 5280 40196 24032 71374 29056 47604 15326 16590 4380 3384 724 410 62 29 2 1
  1 19 5015 7635 66066 42072 135876 59854 103298 37122 40660 12868 9346 2690 1290 348 97 27 3 1
  1 20 6824 10840 108419 70782 258898 114262 226282 78760 102664 29858 27848 6814 4752 944 503 70 32 2 1
  1 21 9166 15392 173675 120003 476494 224180 469816 178278 237956 78854 71902 21692 13698 3824 1625 433 108 30 3 1
  1 22 12343 21372 278183 196784 877315 414774 981244 364690 562404 176422 194486 52356 43592 9996 6407 1192 605 78 35 2 1 (End)
		

Crossrefs

Related to thickness: A169940-A169954, A061909.
3rd column gives A143823(n+1)-n-2. - Alois P. Heinz, Sep 16 2011

Programs

  • Mathematica
    pols[n_] := x^Range[0, n].#& /@ Tuples[{0, 1}, n+1];
    row[n_] := Tally[Max /@ CoefficientList[pols[n]^2, x]][[All, 2]];
    Table[row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Aug 27 2019 *)

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

A169947 Third entry in row n of triangle in A169945.

Original entry on oeis.org

1, 3, 8, 16, 29, 49, 82, 130, 205, 305, 450, 654, 947, 1343, 1902, 2648, 3675, 5015, 6824, 9166, 12343, 16393, 21762, 28682, 37695, 49055, 63892, 82610, 106691, 136643, 174862, 222524, 283073, 357691, 451538, 567498, 712817, 890365, 1112040, 1382374, 1717497
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    b[n_, s_] := Module[{sn, m}, If[n<1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m - 1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m - 1}, {j, i+1, m}] // Flatten // Union], b[n - 1, sn], 0] + b[n - 1, s]]];
    c[n_] := c[n] = b[n - 1, {n}] + If[n == 0, 0, c[n - 1]];
    a[n_] := c[n + 1] - n - 2;
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 64}] (* Jean-François Alcover, Sep 02 2019, after Alois P. Heinz in A143823 *)

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?
a(n) = A143823(n+1) - n - 2. - Nathaniel Johnston, Nov 12 2010

Extensions

More terms from R. J. Mathar, Aug 02 2010
a(22)-a(28) from Nathaniel Johnston, Nov 12 2010
More terms from Alois P. Heinz, Sep 16 2011

A169952 Second entry in row n of triangle in A169950.

Original entry on oeis.org

1, 2, 5, 8, 13, 20, 33, 48, 75, 100, 145, 204, 293, 396, 559, 746, 1027, 1340, 1809, 2342, 3177, 4050, 5369, 6920, 9013, 11360, 14837, 18718, 24081, 29952, 38219, 47662, 60549, 74618, 93847, 115960, 145319, 177548, 221675, 270334, 335123, 406290, 500915
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

Formula

a(n) = A169947(n) - A169947(n-1) for n>1. - Andrew Howroyd, Jul 09 2017

Extensions

a(16)-a(29) from Nathaniel Johnston, Nov 15 2010
Terms a(30) and beyond from Andrew Howroyd, Jul 09 2017

A169948 Fourth entry in row n of triangle in A169945.

Original entry on oeis.org

1, 2, 6, 14, 29, 52, 96, 160, 277, 450, 712, 1086, 1657, 2448, 3636, 5280, 7635, 10840, 15392, 21372, 29655, 40580, 55282, 74620, 100651, 134232, 178922, 236488, 312019, 408550, 534288, 692978, 897931, 1156256, 1485650, 1897704, 2421635, 3071608, 3894042
Offset: 2

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n < 1, 1, b[n - 1, s] + If[m*(m + 1)/2 == Length[Union[Flatten[Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i + 1, m + 1}]]]], b[n - 1, sn], 0]]];
    A196723[n_] := A196723[n] = b[n - 1, {n}] + If[n == 0, 0, A196723[n - 1]];
    c[n_, s_] := c[n, s] = Module[{sn, m}, If[n < 1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m - 1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m - 1}, {j, i + 1, m}] // Flatten // Union], c[n - 1, sn], 0] + c[n-1, s]]];
    A143823[n_] := A143823[n] = c[n - 1, {n}] + If[n == 0, 0, A143823[n - 1]];
    a[n_] := a[n] = A196723[n + 1] - A143823[n + 1];
    Table[Print[n, " ", a[n]]; a[n], {n, 2, 40}] (* Jean-François Alcover, Aug 27 2019, after Alois P. Heinz in A196723 and A143823 *)

Formula

a(n) = A196723(n+1) - A143823(n+1). - Andrew Howroyd, Jul 09 2017

Extensions

a(15)-a(28) from Nathaniel Johnston, Nov 12 2010
a(29)-a(40) from Andrew Howroyd, Jul 09 2017
Showing 1-10 of 14 results. Next