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.

User: Robert P. P. McKone

Robert P. P. McKone's wiki page.

Robert P. P. McKone has authored 28 sequences. Here are the ten most recent ones:

A386597 Number of distinct values of the permanent of an n X n (0,1)-matrix with exactly three 1's in each row.

Original entry on oeis.org

1, 4, 8, 16, 29, 50, 82
Offset: 3

Author

Robert P. P. McKone, Jul 27 2025

Keywords

Comments

a(n) > A185178(n) for n >= 4.
The permanents for a(n) contain all permanents from a(n-1).
a(10) >= 121.
a(11) >= 186.
a(12) >= 276.
a(13) >= 422.
a(14) >= 638.
a(15) >= 824.

Crossrefs

Cf. A185178 (number of distinct permanents with exactly three 1's in each row and column).

A386204 Number of distinct values of the determinant of an n X n (0,1)-matrix with exactly three 1's in each row and each column.

Original entry on oeis.org

1, 2, 3, 3, 7, 11, 7
Offset: 3

Author

Robert P. P. McKone, Jul 15 2025

Keywords

Comments

a(10) >= 25.

Crossrefs

Cf. A185178 (distinct permanents).
Cf. A001501 (number of n X n (0,1)-matrix with exactly three 1's in each row and each column).

A375157 The number of pairs of 3x3 matrices with elements from 0 to n such that the matrix product results in each element being the concatenation of the corresponding terms in base n.

Original entry on oeis.org

2, 43, 462, 458, 4980, 1887, 18200, 13405, 37007, 10508, 200957, 19554, 125883, 151020, 420079, 51500, 852186, 77301, 1196863, 494117, 644747, 152723, 4745046, 516750, 1171643, 1378716, 3862900, 352253, 8755257, 448846, 7422697, 2422746, 3053960, 2745778
Offset: 2

Author

Robert P. P. McKone, Aug 01 2024

Keywords

Comments

Known positions of records occur at n = {2, 3, 4, 6, 8, 10, 12, 16, 18, 20, 24, 30, 36, 40, 42, 48}.
Conjecture: For n that is not prime, a(n) > a(PrimePi(n)), where PrimePi() is the prime counting function.

Examples

			a(2) = 2, with one answer being the trivial zeros, and the other:
1 1 1   1 1 1   3 3 3   11_2 11_2 11_2
1 1 1 . 1 1 1 = 3 3 3 = 11_2 11_2 11_2
1 1 1   1 1 1   3 3 3   11_2 11_2 11_2
a(3), one of the true cases is:
0 1 2   2 1 0   2 4 6    2_3 11_3 20_3
2 2 2 . 1 1 1 = 6 8 8 = 20_3 22_3 22_3
1 2 2   1 1 1   4 7 8   11_3 21_3 22_3
a(10):
4 9 4   9 2 1   49 92 41
4 3 2 . 1 8 1 = 41 38 21
5 5 1   1 3 7   51 53 17
		

A374724 Quartet paradiddle Thue-Morse, with axiom {1} and morphism 1->{1,2,3,4,1,1}, 2->{2,1,4,3,2,2}, 3->{3,4,1,2,3,3}, 4->{4,3,2,1,4,4}.

Original entry on oeis.org

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

Author

Robert P. P. McKone, Jul 17 2024

Keywords

Crossrefs

Programs

  • Mathematica
    SubstitutionSystem[{1 -> {1, 2, 3, 4, 1, 1}, 2 -> {2, 1, 4, 3, 2, 2}, 3 -> {3, 4, 1, 2, 3, 3}, 4 -> {4, 3, 2, 1, 4, 4}}, {1}, {3}] // Flatten

A374173 a(n) is the smallest prime whose base-n representation contains a run of at least n identical digits.

Original entry on oeis.org

3, 13, 683, 3907, 55987, 960803, 19173967, 435848051, 11111111113, 1540683021299, 19453310068921, 328114698808283, 45302797058044219, 469172025408063623, 19676527011956855059, 878942778254232811943, 120353718818554114936591, 109912203092239643840221
Offset: 2

Author

Robert P. P. McKone, Jun 30 2024

Keywords

Comments

a(2) to a(18) are all increasing, but a(19) is smaller than a(18).
a(n) = A023037(n) for n in A088790. - Robert Israel, Dec 31 2024

Examples

			a(2) = 3 = 11_2.
a(3) = 13 = 111_3.
a(11) = 1540683021299 = 544444444444_11.
a(18) = 120353718818554114936591 = 3111111111111111111_18.
a(19) = 109912203092239643840221 = 1111111111111111111_19.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,Q,i,j;
      t:= (n^n-1)/(n-1);
      if isprime(t) then return t fi;
      for i from 1 to n-1 do
        Q:= select(isprime, [seq(i*t*n+j,j=1..n-1),
             seq(i*n^n+j*t,j=1..n-1)]);
        if Q <> [] then return min(Q) fi;
      od;
      FAIL
    end proc:
    map(f, [$2..20]); # Robert Israel, Dec 31 2024
  • Mathematica
    d[n_]:=d[n]=Table[Table[m,n],{m,0,n-1}];
    dpre[n_]:=Flatten[Table[{m}~Join~#&/@d[n],{m,0,n-1}],1];
    dpost[n_]:=Flatten[Table[Map[#~Join~{m}&,d[n]],{m,0,n-1}],1];
    dprepost[n_]:=Flatten[Table[Map[{j}~Join~#~Join~{m}&,d[n]],{m,0,n-1},{j,0,n-1}],2];
    c[n_]:=c[n]=DeleteDuplicates[Sort[Select[FromDigits[#,n]&/@Join[d[n],dpre[n],dpost[n],dprepost[n]],#>n&]]];
    a[n_]:=a[n]=Do[If[PrimeQ[q],Return[q];Break[];],{q,c[n]}];
    Table[a[n],{n,2,19}]

A374646 Paradiddle version of Thue-Morse sequence.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1
Offset: 0

Author

Robert P. P. McKone, Jul 15 2024

Keywords

Comments

A paradiddle is a basic drum pattern, either "left left right left" or "right right left right". We can take left, right to be either 0, 1 or 1, 0.
Limiting word of the morphism with maps 0 |--> 0100, 1 |--> 1011 and axiom 1011. - Joerg Arndt, Jul 15 2024

Examples

			k = 0: Sequence starts at its simplest form;
1.
-----------------------------------------------
k = 1: The 1 of the initial sequence expands following the morphism rules, where 1 -> {1, 0, 1, 1} and 0 -> {0, 1, 0, 0}, resulting in;
1, 0, 1, 1.
-----------------------------------------------
k = 2: Each element of the initial sequence expands following the morphism rules, where 1 -> {1, 0, 1, 1} and 0 -> {0, 1, 0, 0};
1, 0, 1, 1,
0, 1, 0, 0,
1, 0, 1, 1,
1, 0, 1, 1.
-----------------------------------------------
k = 3: The expansion is applied recursively, giving:
1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1,
0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0,
1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1,
1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1.
		

Crossrefs

Cf. A160381, A130198 (single paradiddle), A010059, A010060, A374724.

Programs

  • Mathematica
    SubstitutionSystem[{1 -> {1, 0, 1, 1}, 0 -> {0, 1, 0, 0}}, {1}, {4}] // Flatten
  • PARI
    first(n,v=[1])=if(n>4*#v, v=first((n+3)\4)); my(u=List()); for(i=1,#v-1, listput(u,v[i]); listput(u,1-v[i]); listput(u,v[i]); listput(u,v[i])); my(t=vector(n-#u,i,if(i==2,1-v[#v],v[#v]))); for(j=1,#t, listput(u,t[j])); Vec(u) \\ Charles R Greathouse IV, Jul 31 2024

Formula

a(n) = A160381(n)+1 mod 2. - Kevin Ryde, Dec 28 2024

A372905 Number of solutions for A330279 (numbers k such that x^k == k (mod k + 1) has multiple solutions for 0 <= x < k).

Original entry on oeis.org

2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 8, 2, 2, 6, 2, 2, 4, 2, 10, 2, 14, 2, 2, 2, 2, 2, 6, 8, 4, 8, 2, 4, 2, 2, 2, 4, 2, 2, 2, 2, 2, 14, 4, 2, 2, 26, 2, 6, 2, 2, 2, 2, 4, 2, 14, 2, 6, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 4, 8, 38, 2, 2, 2, 10, 2, 4, 2, 2, 10, 4, 2
Offset: 1

Author

Robert P. P. McKone, May 16 2024

Keywords

Crossrefs

Cf. A330279.

Programs

  • Mathematica
    Select[Table[Count[Table[PowerMod[x, k, k + 1], {x, 1, k - 1}], k], {k, 1, 813}], # >= 2 &]

A371692 Table(n,k) of binary strings of length n which have the same number of k long 0...00 and 0...01 substrings, where n>=0 and k>=2, read by downwards antidiagonals.

Original entry on oeis.org

1, 1, 2, 1, 2, 2, 1, 2, 4, 3, 1, 2, 4, 6, 6, 1, 2, 4, 8, 11, 9, 1, 2, 4, 8, 14, 19, 15, 1, 2, 4, 8, 16, 27, 35, 30, 1, 2, 4, 8, 16, 30, 51, 61, 54, 1, 2, 4, 8, 16, 32, 59, 96, 111, 97, 1, 2, 4, 8, 16, 32, 62, 115, 183, 200, 189, 1, 2, 4, 8, 16, 32, 64, 123
Offset: 1

Author

Robert P. P. McKone, Apr 03 2024

Keywords

Comments

To clarify the substrings, k long '0...00' means k consecutive zeros, and k long '0...01' means k-1 consecutive zeros follow by a one.

Examples

			Table begins:
n\k |     2       3       4       5       6       7       8       9      10
----+----------------------------------------------------------------------
 0  |     1,      1,      1,      1,      1,      1,      1,      1,      1
 1  |     2,      2,      2,      2,      2,      2,      2,      2,      2
 2  |     2,      4,      4,      4,      4,      4,      4,      4,      4
 3  |     3,      6,      8,      8,      8,      8,      8,      8,      8
 4  |     6,     11,     14,     16,     16,     16,     16,     16,     16
 5  |     9,     19,     27,     30,     32,     32,     32,     32,     32
 6  |    15,     35,     51,     59,     62,     64,     64,     64,     64
 7  |    30,     61,     96,    115,    123,    126,    128,    128,    128
 8  |    54,    111,    183,    224,    243,    251,    254,    256,    256
 9  |    97,    200,    345,    436,    480,    499,    507,    510,    512
10  |   189,    369,    655,    851,    948,    992,   1011,   1019,   1022
11  |   360,    676,   1244,   1657,   1872,   1972,   2016,   2035,   2043
12  |   675,   1256,   2363,   3231,   3699,   3920,   4020,   4064,   4083
13  |  1304,   2337,   4500,   6300,   7305,   7792,   8016,   8116,   8160
14  |  2522,   4392,   8570,  12287,  14431,  15491,  15984,  16208,  16308
15  |  4835,   8273,  16347,  23966,  28508,  30793,  31872,  32368,  32592
16  |  9358,  15686,  31218,  46762,  56319,  61215,  63555,  64640,  65136
17  | 18193,  29837,  59678,  91250, 111266, 121692, 126729, 129088, 130176
18  | 35269,  57038, 114236, 178107, 219828, 241919, 252703, 257795, 260160
19  | 68568, 109362, 218905, 347709, 434338, 480930, 503900, 514825, 519936
		

Crossrefs

Cf. A163493 (Column 1), A164137 (Column 2), A164147 (Column 3), A164178 (Column 4).

Programs

  • Mathematica
    l0[k_] := l0[k] = ConstantArray[0, k];
    l1[k_] := l1[k] = ConstantArray[0, k - 1]~Join~{1};
    tup[n_] := Tuples[{0, 1}, n];
    cou[lst_List, k_] := Count[lst, l0[k]] == Count[lst, l1[k]];
    par[lst_List, k_] := Partition[lst, k, 1];
    a[n_, k_] := a[n, k] = Map[cou[#, k] &, Map[par[#, k] &, tup[n]]] // Boole // Total;
    (* Data *)Table[a[n, k - n], {k, 2, 13}, {n, 0, k - 2}] // Flatten
    (* Table *)Monitor[Table[a[n, k], {n, 0, 19}, {k, 2, 10}] // TableForm, {n, k}]

A371662 Number of binary strings of length n with more 000 than 001 substrings.

Original entry on oeis.org

0, 0, 0, 1, 2, 5, 11, 26, 56, 121, 255, 539, 1123, 2332, 4808, 9891, 20262, 41413, 84411, 171760, 348857, 707593, 1433315, 2900313, 5863023, 11842460
Offset: 0

Author

Robert P. P. McKone, Apr 03 2024

Keywords

Examples

			a(5) = 5: 00000, 00001, 01000, 10000, 11000.
a(6) = 11: 000000, 000001, 000010, 000011, 010000, 011000, 100000, 100001, 101000, 110000, 111000.
		

Crossrefs

Cf. A164137 (equal 000 and 001), A371682 (more 001 than 000).

Programs

  • Mathematica
    tup[n_] := Tuples[{0, 1}, n];
    cou[lst_List] := Count[lst, {0, 0, 0}] > Count[lst, {0, 0, 1}];
    par[lst_List] := Partition[lst, 3, 1];
    a[n_] := a[n] = Map[cou, Map[par, tup[n]]] // Boole // Total;
    Monitor[Table[a[n], {n, 0, 23}], {n, Table[a[m], {m, 0, n - 1}]}]

Formula

a(n) = 2^n - A164137(n) - A371682(n).

A371682 Number of binary strings of length n with more 001 than 000 substrings.

Original entry on oeis.org

0, 0, 0, 1, 3, 8, 18, 41, 89, 191, 400, 833, 1717, 3523, 7184, 14604, 29588, 59822, 120695, 243166, 489271, 983530, 1975416, 3965078, 7954340, 15950301, 31972219, 64069007, 128355352, 257093509, 514864480, 1030937876, 2064045150, 4132012413, 8271156673
Offset: 0

Author

Robert P. P. McKone, Apr 03 2024

Keywords

Examples

			a(5) = 8: 00100, 00101, 00110, 00111, 01001, 10010, 10011, 11001.
a(6) = 18: 001001, 001010, 001011, 001100, 001101, 001110, 001111, 010010, 010011, 011001, 100100, 100101, 100110, 100111, 101001, 110010, 110011, 111001.
		

Crossrefs

Cf. A164137 (equal 000 and 001), A371662 (more 000 than 001).

Programs

  • Mathematica
    tup[n_] := Tuples[{0, 1}, n];
    cou[lst_List] := Count[lst, {0, 0, 1}] > Count[lst, {0, 0, 0}];
    par[lst_List] := Partition[lst, 3, 1];
    a[n_] := a[n] = Map[cou, Map[par, tup[n]]] // Boole // Total;
    Monitor[Table[a[n], {n, 0, 23}], {n, Table[a[m], {m, 0, n - 1}]}]

Formula

a(n) = 2^n - A164137(n) - A371662(n).

Extensions

a(26)-a(34) from Alois P. Heinz, Apr 03 2024