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 19 results. Next

A318928 Runs-resistance of binary representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 09 2018

Keywords

Comments

Following Lenormand (2003), we define the "runs-resistance" of a finite list L to be the number of times the RUNS transformation must be applied to L in order to reduce L to a list with a single element.
Here it is immaterial whether we read the binary representation of n from left to right or right to left.
The RUNS transformation must be applied at least once, in order to obtain a list, so a(n) >= 1.

Examples

			11 in binary is [1, 0, 1, 1],
which has runs of lengths [1, 1, 2],
which has runs of lengths [2, 1],
which has runs of lengths [1, 1],
which has a single run of length [2].
This took four steps, so a(11) = 4.
		

Crossrefs

See A319103 for an inverse, and A319417 and A319418 for records.
Ignoring the first digit gives A329870.
Cuts-resistance is A319416.
Compositions counted by runs-resistance are A329744.
Binary words counted by runs-resistance are A319411 and A329767.

Programs

  • Maple
    with(transforms);
    # compute Lenormand's "resistance" of a list
    resist:=proc(a) local ct,i,b;
    if whattype(a) <> list then ERROR("input must be a list"); fi:
    ct:=0; b:=a; for i from 1 to 100 do
    if nops(b)=1 then return(ct); fi;
    b:=RUNS(b); ct:=ct+1; od; end;
    a:=[1];
    for n from 2 to 100 do
    b:=convert(n,base,2);
    r:=resist(b);
    a:=[op(a),r];
    od:
  • Mathematica
    Table[If[n == 1, 1, Length[NestWhileList[Length/@Split[#] &, IntegerDigits[n, 2], Length[#] > 1 &]] - 1], {n, 50}] (* Gus Wiseman, Nov 25 2019 *)

Extensions

a(1) corrected by N. J. A. Sloane, Sep 20 2018

A329746 Triangle read by rows where T(n,k) is the number of integer partitions of n > 0 with runs-resistance k, 0 <= k <= n - 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 0, 1, 3, 4, 3, 0, 0, 1, 1, 4, 8, 1, 0, 0, 1, 3, 6, 10, 2, 0, 0, 0, 1, 2, 8, 13, 6, 0, 0, 0, 0, 1, 3, 11, 20, 7, 0, 0, 0, 0, 0, 1, 1, 11, 29, 14, 0, 0, 0, 0, 0, 0, 1, 5, 19, 31, 20, 1, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.

Examples

			Triangle begins:
  1
  1  1
  1  1  1
  1  2  1  1
  1  1  2  3  0
  1  3  4  3  0  0
  1  1  4  8  1  0  0
  1  3  6 10  2  0  0  0
  1  2  8 13  6  0  0  0  0
  1  3 11 20  7  0  0  0  0  0
  1  1 11 29 14  0  0  0  0  0  0
  1  5 19 31 20  1  0  0  0  0  0  0
  1  1 17 50 30  2  0  0  0  0  0  0  0
  1  3 25 64 37  5  0  0  0  0  0  0  0  0
  1  3 29 74 62  7  0  0  0  0  0  0  0  0  0
Row n = 8 counts the following partitions:
  (8)  (44)        (53)    (332)      (4211)
       (2222)      (62)    (422)      (32111)
       (11111111)  (71)    (611)
                   (431)   (3221)
                   (521)   (5111)
                   (3311)  (22211)
                           (41111)
                           (221111)
                           (311111)
                           (2111111)
		

Crossrefs

Row sums are A000041.
Column k = 1 is A032741.
Column k = 2 is A329745.
A similar invariant is frequency depth; see A323014, A325280.
The version for compositions is A329744.
The version for binary words is A329767.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[Length[Select[IntegerPartitions[n],runsres[#]==k&]],{n,10},{k,0,n-1}]
  • PARI
    \\ rr(p) gives runs resistance of partition.
    rr(p)={my(r=0); while(#p > 1, my(L=List(), k=0); for(i=1, #p, if(i==#p||p[i]<>p[i+1], listput(L, i-k); k=i)); p=Vec(L); r++); r}
    row(n)={my(v=vector(n)); forpart(p=n, v[1+rr(Vec(p))]++); v}
    { for(n=1, 10, print(row(n))) } \\ Andrew Howroyd, Jan 19 2023

A351017 Number of binary words of length n with all distinct run-lengths.

Original entry on oeis.org

1, 2, 2, 6, 6, 10, 22, 26, 38, 54, 114, 130, 202, 266, 386, 702, 870, 1234, 1702, 2354, 3110, 5502, 6594, 9514, 12586, 17522, 22610, 31206, 48630, 60922, 83734, 111482, 149750, 196086, 261618, 336850, 514810, 631946, 862130, 1116654, 1502982, 1916530, 2555734, 3242546
Offset: 0

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Examples

			The a(0) = 1 through a(6) = 22 words:
  {}  0   00   000   0000   00000   000000
      1   11   001   0001   00001   000001
               011   0111   00011   000011
               100   1000   00111   000100
               110   1110   01111   000110
               111   1111   10000   001000
                            11000   001110
                            11100   001111
                            11110   011000
                            11111   011100
                                    011111
                                    100000
                                    100011
                                    100111
                                    110000
                                    110001
                                    110111
                                    111001
                                    111011
                                    111100
                                    111110
                                    111111
		

Crossrefs

Using binary expansions instead of words gives A032020, ranked by A044813.
The version for partitions is A098859.
The complement is counted by twice A261982.
The version for compositions is A329739, for runs A351013.
For runs instead of run-lengths we have A351016, twice A351018.
The version for patterns is A351292, for runs A351200.
A000120 counts binary weight.
A001037 counts binary Lyndon words, necklaces A000031, aperiodic A027375.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329767 counts binary words by runs-resistance.
A351014 counts distinct runs in standard compositions.
A351204 counts partitions where every permutation has all distinct runs.
A351290 ranks compositions with all distinct runs.

Programs

  • Mathematica
    Table[Length[Select[Tuples[{0,1},n],UnsameQ@@Length/@Split[#]&]],{n,0,10}]
  • Python
    from itertools import groupby, product
    def adrl(s):
        runlens = [len(list(g)) for k, g in groupby(s)]
        return len(runlens) == len(set(runlens))
    def a(n):
        if n == 0: return 1
        return 2*sum(adrl("1"+"".join(w)) for w in product("01", repeat=n-1))
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 08 2022

Formula

a(n>0) = 2 * A032020(n).

Extensions

a(25)-a(32) from Michael S. Branicky, Feb 08 2022
More terms from David A. Corneth, Feb 08 2022 using data from A032020

A329747 Runs-resistance of the sequence of prime indices of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 3, 0, 2, 2, 1, 0, 3, 0, 3, 2, 2, 0, 3, 1, 2, 1, 3, 0, 2, 0, 1, 2, 2, 2, 2, 0, 2, 2, 3, 0, 2, 0, 3, 3, 2, 0, 3, 1, 3, 2, 3, 0, 3, 2, 3, 2, 2, 0, 4, 0, 2, 3, 1, 2, 2, 0, 3, 2, 2, 0, 3, 0, 2, 3, 3, 2, 2, 0, 3, 1, 2, 0, 4, 2, 2, 2, 3, 0, 3, 2, 3, 2, 2, 2, 3, 0, 3, 3, 2, 0, 2, 0, 3, 2, 2, 0, 3, 0, 2, 2, 3, 0, 2, 2, 3, 3, 2, 2, 4
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

First differs from A304455 at a(90) = 3, A304455(90) = 4.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.
A prime index of n is a number m such that prime(m) divides n. The sequence of prime indices of n is row n of A112798.

Examples

			We have (1,2,2,3) -> (1,2,1) -> (1,1,1) -> (3), so a(90) = 3.
		

Crossrefs

The version for partitions is A329746.
The version for compositions is A329744.
The version for binary words is A329767.
The version for binary expansion is A318928.
Cf. A008578 (positions of 0's), A056239, A112798, A329745, A329750.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[runsres[primeMS[n]],{n,50}]
  • PARI
    pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
    runlengths(lista) = if(!#lista, lista, if(1==#lista, List([1]), my(runs=List([]), rl=1); for(i=1, #lista, if((i< #lista) && (lista[i]==lista[i+1]), rl++, listput(runs,rl); rl=1)); (runs)));
    A329747(n) = { my(runs=pis_to_runs(n)); for(i=0,oo,if(#runs<=1, return(i), runs = runlengths(runs))); }; \\ Antti Karttunen, Jan 20 2025

Extensions

More terms from Antti Karttunen, Jan 20 2025

A351016 Number of binary words of length n with all distinct runs.

Original entry on oeis.org

1, 2, 4, 6, 12, 18, 36, 54, 92, 154, 244, 382, 652, 994, 1572, 2414, 3884, 5810, 8996, 13406, 21148, 31194, 47508, 70086, 104844, 156738, 231044, 338998, 496300, 721042, 1064932, 1536550, 2232252, 3213338, 4628852, 6603758, 9554156, 13545314, 19354276
Offset: 0

Views

Author

Gus Wiseman, Feb 07 2022

Keywords

Comments

These are binary words where the runs of zeros have all distinct lengths and the runs of ones also have all distinct lengths. For n > 0 this is twice the number of terms of A175413 that have n digits in binary.

Examples

			The a(0) = 1 through a(4) = 12 binary words:
  ()   0    00    000    0000
       1    01    001    0001
            10    011    0010
            11    100    0011
                  110    0100
                  111    0111
                         1000
                         1011
                         1100
                         1101
                         1110
                         1111
For example, the word (1,1,0,1) has three runs (1,1), (0), (1), which are all distinct, so is counted under a(4).
		

Crossrefs

The version for compositions is A351013, lengths A329739, ranked by A351290.
The version for [run-]lengths is A351017.
The version for expansions is A351018, lengths A032020, ranked by A175413.
The version for patterns is A351200, lengths A351292.
The version for permutations of prime factors is A351202.
A000120 counts binary weight.
A001037 counts binary Lyndon words, necklaces A000031, aperiodic A027375.
A005811 counts runs in binary expansion.
A011782 counts integer compositions.
A242882 counts compositions with distinct multiplicities.
A297770 counts distinct runs in binary expansion.
A325545 counts compositions with distinct differences.
A329767 counts binary words by runs-resistance.
A351014 counts distinct runs in standard compositions.
A351204 counts partitions whose permutations all have all distinct runs.

Programs

  • Mathematica
    Table[Length[Select[Tuples[{0,1},n],UnsameQ@@Split[#]&]],{n,0,10}]
  • Python
    from itertools import groupby, product
    def adr(s):
        runs = [(k, len(list(g))) for k, g in groupby(s)]
        return len(runs) == len(set(runs))
    def a(n):
        if n == 0: return 1
        return 2*sum(adr("1"+"".join(w)) for w in product("01", repeat=n-1))
    print([a(n) for n in range(20)]) # Michael S. Branicky, Feb 08 2022

Formula

a(n>0) = 2 * A351018(n).

Extensions

a(25)-a(32) from Michael S. Branicky, Feb 08 2022
a(33)-a(38) from David A. Corneth, Feb 08 2022

A319411 Triangle read by rows: T(n,k) = number of binary vectors of length n with runs-resistance k (1 <= k <= n).

Original entry on oeis.org

2, 2, 2, 2, 2, 4, 2, 4, 6, 4, 2, 2, 12, 12, 4, 2, 6, 30, 18, 8, 0, 2, 2, 44, 44, 32, 4, 0, 2, 6, 82, 76, 74, 16, 0, 0, 2, 4, 144, 138, 172, 52, 0, 0, 0, 2, 6, 258, 248, 350, 156, 4, 0, 0, 0, 2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0, 2, 10, 790, 752, 1500, 938, 104, 0, 0, 0, 0, 0
Offset: 1

Views

Author

N. J. A. Sloane, Sep 20 2018

Keywords

Comments

"Runs-resistance" is defined in A318928.
Row sums are 2,4,8,16,... (the binary vectors may begin with 0 or 1).
This is similar to A329767 but without the k = 0 column and with a different row n = 1. - Gus Wiseman, Nov 25 2019

Examples

			Triangle begins:
2,
2, 2,
2, 2, 4,
2, 4, 6, 4,
2, 2, 12, 12, 4,
2, 6, 30, 18, 8, 0,
2, 2, 44, 44, 32, 4, 0,
2, 6, 82, 76, 74, 16, 0, 0,
2, 4, 144, 138, 172, 52, 0, 0, 0,
2, 6, 258, 248, 350, 156, 4, 0, 0, 0,
2, 2, 426, 452, 734, 404, 28, 0, 0, 0, 0,
2, 10, 790, 752, 1500, 938, 104, 0, 0, 0, 0, 0,
...
Lenormand gives the first 20 rows.
The calculation of row 4 is as follows.
We may assume the first bit is a 0, and then double the answers.
vector / runs / steps to reach a single number:
0000 / 4 / 1
0001 / 31 -> 11 -> 2 / 3
0010 / 211 -> 12 -> 11 -> 2 / 4
0011 / 22 -> 2 / 2
0100 / 112 -> 21 -> 11 -> 2 / 4
0101 / 1111 -> 4 / 2
0110 / 121 -> 111 -> 3 / 3
0111 / 13 -> 11 -> 2 / 3
and we get 1 (once), 2 (twice), 3 (three times) and 4 (twice).
So row 4 is: 2,4,6,4.
		

Crossrefs

Row sums are A000079.
Column k = 2 is 2 * A032741 = A319410.
Column k = 3 is 2 * A329745 (because runs-resistance 2 for compositions corresponds to runs-resistance 3 for binary words).
The version for compositions is A329744.
The version for partitions is A329746.
The number of nonzero entries in row n > 0 is A319412(n).
The runs-resistance of the binary expansion of n is A318928.

Programs

  • Mathematica
    runsresist[q_]:=If[Length[q]==1,1,Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1];
    Table[Length[Select[Tuples[{0,1},n],runsresist[#]==k&]],{n,10},{k,n}] (* Gus Wiseman, Nov 25 2019 *)

A319416 Cuts-resistance of n: number of applications of Lernormand's "raboter" map needed to transform the binary expansion of n to the empty string.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 2, 3, 3, 2, 1, 2, 2, 2, 3, 4, 4, 3, 2, 2, 2, 1, 2, 3, 3, 2, 2, 3, 3, 3, 4, 5, 5, 4, 3, 3, 3, 2, 2, 3, 3, 2, 1, 2, 2, 2, 3, 4, 4, 3, 2, 2, 2, 2, 3, 4, 3, 3, 3, 4, 4, 4, 5, 6, 6, 5, 4, 4, 4, 3, 3, 3, 4, 3, 2, 2, 2, 2, 3, 4, 4, 3, 2, 2, 2, 1, 2
Offset: 0

Views

Author

N. J. A. Sloane, Sep 21 2018

Keywords

Comments

Here we are using Lenormand's "raboter" map in a stricter sense than in A318921 and A319419. If S is a binary string with successive runs of lengths b,c,d,e,..., the "raboter" map sends S to the binary string with successive runs of lengths b-1,c-1,d-1,e-1,... Runs of length 0 are omitted (they are indicated by dots in the examples below).
To get a(n), start with S equal to the binary expansion of n beginning with the most significant bit, and keep applying the map until we reach the empty string.
After the first step, the string may start with a string of 0's: this is acceptable because we are working with strings, not binary expansions of numbers.
For example, 34 = 100010 -> .00.. = 00 -> 0. = 0 -> . (the empty string), taking 3 steps, so a(34) = 3.
Note: this is not the same as the number of applications of the map k -> A318921(k) needed to reduce the binary expansion of n to zero (because A318921 does not distinguish between 0 and the empty string).
This is also not the same as the number of applications of the map k -> A319419(k) needed to reduce the binary expansion of n to -1 (because A319419 does not distinguish between a string of 0's and a single 0).
The value k appears for the first time when n = 2^k - 1.

Examples

			n: repeatedly applying the map / number of steps = a(n)
0: 0 -> . / 1
1: 1 -> . / 1
2: 10 -> . / 1
3: 11 -> 1 -> . / 2
4: 100 -> 0 -> . / 2
5: 101 -> . / 1
6: 110 -> 1 -> . / 2
7: 111 -> 11 -> 1 -> . / 3
8: 1000 -> 00 -> 0 -> . / 3
9: 1001 -> 0 -> . / 2
10: 1010 -> . / 1
11: 1011 -> 1 -> . / 2
12: 1100 -> 10 -> . / 2
...
		

Crossrefs

Positions of 1's are A000975.
Positions of 2's are A329862.
The version for runs-resistance is A318928.
The version for compositions is A329861.
Binary words counted by cuts-resistance are A319421 or A329860.

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[degdep[IntegerDigits[n,2]],{n,0,50}] (* Gus Wiseman, Nov 25 2019 *)
  • PARI
    a(n) = my (b=binary(n), w=#b); for (k=1, oo, my (ww=0); for (i=2, w, if (b[i-1]==b[i], b[ww++]=b[i])); if (ww==0, return (k), w=ww)) \\ Rémy Sigrist, Sep 23 2018

Extensions

More terms from Rémy Sigrist, Sep 23 2018

A329745 Number of compositions of n with runs-resistance 2.

Original entry on oeis.org

0, 0, 2, 3, 6, 15, 22, 41, 72, 129, 213, 395, 660, 1173, 2031, 3582, 6188, 10927, 18977, 33333, 58153, 101954, 178044, 312080, 545475, 955317, 1670990, 2925711, 5118558, 8960938, 15680072, 27447344, 48033498, 84076139, 147142492, 257546234, 450748482, 788937188
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.
These are non-constant compositions with equal run-lengths (A329738).

Examples

			The a(3) = 2 through a(6) = 15 compositions:
  (1,2)  (1,3)    (1,4)    (1,5)
  (2,1)  (3,1)    (2,3)    (2,4)
         (1,2,1)  (3,2)    (4,2)
                  (4,1)    (5,1)
                  (1,3,1)  (1,2,3)
                  (2,1,2)  (1,3,2)
                           (1,4,1)
                           (2,1,3)
                           (2,3,1)
                           (3,1,2)
                           (3,2,1)
                           (1,1,2,2)
                           (1,2,1,2)
                           (2,1,2,1)
                           (2,2,1,1)
		

Crossrefs

Column k = 2 of A329744.
Column k = n - 2 of A329750.

Programs

  • Mathematica
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],runsres[#]==2&]],{n,10}]
  • PARI
    seq(n)={my(b=Vec(1/(1 - sum(k=1, n, x^k/(1+x^k) + O(x*x^n)))-1)); vector(n, k, sumdiv(k, d, b[d]-1))} \\ Andrew Howroyd, Dec 30 2020

Formula

a(n) = A329738(n) - A000005(n).
a(n) = Sum_{d|n} (A003242(d) - 1). - Andrew Howroyd, Dec 30 2020

Extensions

Terms a(21) and beyond from Andrew Howroyd, Dec 30 2020

A329860 Triangle read by rows where T(n,k) is the number of binary words of length n with cuts-resistance k.

Original entry on oeis.org

1, 0, 2, 0, 2, 2, 0, 2, 4, 2, 0, 2, 8, 4, 2, 0, 2, 12, 12, 4, 2, 0, 2, 20, 22, 14, 4, 2, 0, 2, 28, 48, 28, 16, 4, 2, 0, 2, 44, 84, 70, 32, 18, 4, 2, 0, 2, 60, 162, 136, 90, 36, 20, 4, 2, 0, 2, 92, 276, 298, 178, 110, 40, 22, 4, 2, 0, 2, 124, 500, 564, 432, 220, 132, 44, 24, 4, 2
Offset: 0

Views

Author

Gus Wiseman, Nov 23 2019

Keywords

Comments

For the operation of shortening all runs by 1, cuts-resistance is defined to be the number of applications required to reach an empty word.

Examples

			Triangle begins:
   1
   0   2
   0   2   2
   0   2   4   2
   0   2   8   4   2
   0   2  12  12   4   2
   0   2  20  22  14   4   2
   0   2  28  48  28  16   4   2
   0   2  44  84  70  32  18   4   2
   0   2  60 162 136  90  36  20   4   2
   0   2  92 276 298 178 110  40  22   4   2
   0   2 124 500 564 432 220 132  44  24   4   2
Row n = 4 counts the following words:
  0101  0010  0001  0000
  1010  0011  0111  1111
        0100  1000
        0110  1110
        1001
        1011
        1100
        1101
		

Crossrefs

Column k = 2 appears to be 2 * A027383.
The version for runs-resistance is A319411 or A329767.
The cuts-resistance of the binary expansion of n is A319416(n).
The version for compositions is A329861.

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[Length[Select[Tuples[{0,1},n],degdep[#]==k&]],{n,0,10},{k,0,n}]

Formula

For positive indices, T(n,k) = 2 * A319421(n,k).

A319421 Triangle read by rows: T(n,k) (1 <= k <= n) = one-half of the number of binary vectors of length n and cuts-resistance k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 6, 6, 2, 1, 1, 10, 11, 7, 2, 1, 1, 14, 24, 14, 8, 2, 1, 1, 22, 42, 35, 16, 9, 2, 1, 1, 30, 81, 68, 45, 18, 10, 2, 1, 1, 46, 138, 149, 89, 55, 20, 11, 2, 1, 1, 62, 250, 282, 216, 110, 66, 22, 12, 2, 1, 1, 94, 419, 577, 422, 285, 132, 78, 24, 13, 2, 1
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2018

Keywords

Comments

Cuts-resistance is defined in A319416.
This triangle summarizes the data shown in A319420.
Conjecture (Sloane): Sum_{i = 1..n} i * T(n,i) = A189391(n).

Examples

			Triangle begins:
   1
   1   1
   1   2   1
   1   4   2   1
   1   6   6   2   1
   1  10  11   7   2   1
   1  14  24  14   8   2   1
   1  22  42  35  16   9   2   1
   1  30  81  68  45  18  10   2   1
   1  46 138 149  89  55  20  11   2   1
   1  62 250 282 216 110  66  22  12   2   1
   1  94 419 577 422 285 132  78  24  13   2   1
Lenormand gives first 15 rows.
For example, the "1,2,1" row here refers to the 8 vectors of length 3. There are 2 vectors of cuts-resistance 1, namely 010 and 101 (see A319416), 4 vectors of cuts-resistance 2 (100,011,001,110), and 2 of cuts-resistance 3 (000 and 111). Halving these counts we get 1,2,1
		

Crossrefs

Row sums are A000079.
Column k = 2 appears to be A027383.
The version for runs-resistance is A319411 or A329767.
The version for compositions is A329861.
The cuts-resistance of the binary expansion of n is A319416(n).

Programs

  • Mathematica
    degdep[q_]:=Length[NestWhileList[Join@@Rest/@Split[#]&,q,Length[#]>0&]]-1;
    Table[Length[Select[Tuples[{0,1},n],First[#]==1&°dep[#]==k&]],{n,8},{k,n}] (* Gus Wiseman, Nov 25 2019 *)

Formula

T(n,k) = A329860(n,k)/2. - Gus Wiseman, Nov 25 2019
Showing 1-10 of 19 results. Next