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: Michael Gohn

Michael Gohn's wiki page.

Michael Gohn has authored 7 sequences.

A347637 Table read by ascending antidiagonals. T(n, k) is the minimum number of pebbles such that any assignment of those pebbles on a complete graph with n vertices is a next-player winning game in the two-player impartial (k+1, k) pebbling game. T(n, k) for n >= 5 and k >= 1.

Original entry on oeis.org

7, 13, 15, 9, 21, 21, 15, 17, 35, 27, 11, 25, 25, 37, 33, 17, 21, 41, 33, 59, 39, 13, 29, 31, 45, 41, 53
Offset: 5

Keywords

Comments

A (k+1, k) pebbling move involves removing k + 1 pebbles from a vertex in a simple graph and placing k pebbles on an adjacent vertex.
A two-player impartial (k+1, k) pebbling game involves two players alternating (k+1, k) pebbling moves. The first player unable to make a move loses.
T(3, k) = A016921(k) for k >= 0. The proof will appear in a paper that is currently in preparation.
It is conjectured that T(4, k) for odd k>=3 is infinite, so we start with n = 5.
T(5, k) = A346197(k) for k >= 1.
T(n, 1) = A340631(n) for n >= 3.
T(n, 2) = A346401(n) for n >= 3.

Examples

			The data is organized in a table beginning with row n = 5 and column k = 1. The data is read by ascending antidiagonals. The formula binomial(n + k - 5, 2) + k converts the indices from table form to sequence form.
The table T(n, k) begins:
  [n/k]  1   2   3   4   5   6  ...
  ---------------------------------
  [ 5]   7, 15, 21, 27, 33, 39, ...
  [ 6]  13, 21, 35, 37, 59, 53, ...
  [ 7]   9, 17, 25, 33, 41, 51, ...
  [ 8]  15, 25, 41, 45, 61, ...
  [ 9]  11, 21, 31, 41, 51, ...
  [10]  17, 29, 45, 53, 71, ...
  [11]  13, 25, 37, 49, 61, ...
  [12]  19, 33, 51, ...
  [13]  15, 29, 43, ...
  [14]  21, 37, ...
  [15]  17, 33, ...
  [16]  23, 41, ...
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

  • Mathematica
    (* m represents number of vertices in the complete graph. Each pebbling move removes k+1 pebbles from a vertex and adds k pebbles to an adjacent vertex. *)
    Do[(* Given m and a, list all possible assignments with a pebbles. *)
    alltuples[m_, a_] := IntegerPartitions[a + m, {m}] - 1;
    (* Given an assignment, list all resultant assignments after one pebbling move; only works for m>=3. *)
    pebblemoves[config_] :=
      Block[{m, temp}, m = Length[config];
       temp = Table[config, {i, m (m - 1)}] +
         Permutations[Join[{-(k + 1), k}, Table[0, {i, m - 2}]]];
       temp = Select[temp, Min[#] >= 0 &];
       temp = ReverseSort[DeleteDuplicates[ReverseSort /@ temp]]];
    (* Given m and a, list all assignments that are P-games. *)
    Plist = {};
    plist[m_, a_] :=
      Block[{index, tuples},
       While[Length[Plist] < m, index = Length[Plist];
        AppendTo[Plist, {{Join[{1}, Table[0, {i, index}]]}}]];
       Do[AppendTo[Plist[[m]], {}]; tuples = alltuples[m, i];
        Do[If[
          Not[IntersectingQ[pebblemoves[tuples[[j]]],
            If[i > 2, Plist[[m, i - 1]], {}]]],
          AppendTo[Plist[[m, i]], tuples[[j]]]], {j, Length[tuples]}], {i,
          Length[Plist[[m]]] + 1, a}]; Plist[[m, a]]];
    (* Given m, print out the minimum a such that there are no P-games with a pebbles *)
    Do[a = 1; While[plist[m, a] != {}, a++];
      Print["k=", k, " m=", m, " a=", a], {m, 5, 10}], {k, 1, 6}]

A346563 a(n) = n + A007978(n).

Original entry on oeis.org

3, 5, 5, 7, 7, 10, 9, 11, 11, 13, 13, 17, 15, 17, 17, 19, 19, 22, 21, 23, 23, 25, 25, 29, 27, 29, 29, 31, 31, 34, 33, 35, 35, 37, 37, 41, 39, 41, 41, 43, 43, 46, 45, 47, 47, 49, 49, 53, 51, 53, 53, 55, 55, 58, 57, 59, 59, 61, 61, 67, 63, 65, 65, 67, 67
Offset: 1

Keywords

Comments

Beginning at n=3, a(n) represents the maximum length of consecutive numbers that are divisible by the product of their nonzero digits in base n. In particular, if n=10, the sequence of numbers that are divisible by the product of their nonzero digits is given by A055471.

Examples

			For n=6, the least non-divisor of 6 is 4, so a(6) = 6+4 = 10. As seen in the Comments section, 55980, 55981, ..., 55989 form a sequence of length 10, where every number is divisible by the product of its nonzero digits in base n=6. Work has been done to show that 10 is the maximum length for such sequences.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1}, While[Divisible[n, k], k++]; n + k]; Array[a, 100] (* Amiram Eldar, Jul 23 2021 *)
  • PARI
    a(n) = my(k=2); while(!(n % k), k++); n+k; \\ Michel Marcus, Jul 23 2021
  • Python
    goal = 100
    these = []
    n = 1
    while n <= goal:
        k = 1
        while n % k == 0:
            k = k + 1
        these.append(n + k)
        n += 1
    print(these)
    

Formula

a(2k+1) = 2k+3.
a(2k) >= 2k+3.

A346537 Squares that are divisible by the product of their nonzero digits.

Original entry on oeis.org

1, 4, 9, 36, 100, 144, 400, 900, 1024, 1296, 2304, 2500, 2916, 3600, 10000, 11664, 12100, 14400, 22500, 32400, 40000, 41616, 78400, 82944, 90000, 102400, 110224, 121104, 122500, 129600, 152100, 176400, 186624, 200704, 202500, 219024, 230400, 250000, 260100, 291600
Offset: 1

Keywords

Examples

			For the perfect square 1024 = 32^2 the product of its nonzero digits is 8 which divides 1024.
		

Crossrefs

Intersection of A000290 and A055471.

Programs

  • Mathematica
    Select[Range[500]^2, Divisible[#, Times @@ Select[IntegerDigits[#], #1 > 0 &]] &] (* Amiram Eldar, Jul 23 2021 *)
  • PARI
    isok(m) = issquare(m) && !(m % vecprod(select(x->(x>0), digits(m))));
    lista(nn) = for (m=1, nn, if (isok(m^2), print1(m^2, ", "))); \\ Michel Marcus, Jul 23 2021
  • Python
    from math import prod
    def nzpd(n): return prod([int(d) for d in str(n) if d != '0'])
    def ok(sqr): return sqr > 0 and sqr%nzpd(sqr) == 0
    print(list(filter(ok, (i*i for i in range(541))))) # Michael S. Branicky, Jul 23 2021
    

A339999 Squares that are divisible by both the sum of their digits and the product of their nonzero digits.

Original entry on oeis.org

1, 4, 9, 36, 100, 144, 400, 900, 1296, 2304, 2916, 3600, 10000, 11664, 12100, 14400, 22500, 32400, 40000, 41616, 82944, 90000, 121104, 122500, 129600, 152100, 176400, 186624, 202500, 219024, 230400, 260100, 291600, 360000, 419904, 435600, 504100
Offset: 1

Keywords

Examples

			For the perfect square 144 = 12^2, the sum of its digits is 9, which divides 144, and the product of its nonzero digits is 16, which also divides 144 so 144 is a term of the sequence.
		

Crossrefs

Intersection of A000290, A005349 and A055471.

Programs

  • Mathematica
    Select[Range[720]^2, And @@ Divisible[#, {Plus @@ (d = IntegerDigits[#]), Times @@ Select[d, #1 > 0 &]}] &] (* Amiram Eldar, Jul 23 2021 *)
  • Python
    from math import prod
    def sumd(n): return sum(map(int, str(n)))
    def nzpd(n): return prod([int(d) for d in str(n) if d != '0'])
    def ok(sqr): return sqr > 0 and sqr%sumd(sqr) == 0 and sqr%nzpd(sqr) == 0
    print(list(filter(ok, (i*i for i in range(1001)))))
    # Michael S. Branicky, Jul 23 2021

A346197 a(n) is the minimum number of pebbles such that any assignment of those pebbles on K_5 is a next-player winning game in the two-player impartial (n+1,n) pebbling game.

Original entry on oeis.org

7, 15, 21, 27, 33, 39, 47, 53, 59, 67, 73, 79, 87, 93, 99, 107, 113, 119, 127, 133, 139
Offset: 1

Keywords

Comments

For n>0, an (n+1,n) pebbling move involves removing n+1 pebbles from a vertex in a simple graph and placing n pebbles on an adjacent vertex.
A two-player impartial (n+1,n) pebbling game involves two players alternating (n+1,n) pebbling moves. The first player unable to make a move loses.

Examples

			For n=1, a(1)=7 is the least number of pebbles for which every (2,1) game on K_5 is a next-player winning game regardless of assignment.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

  • Mathematica
    Do[remove = k + 1; add = k;
    (*Given n and m, list all possible assignments.*)
    alltuples[n_, m_] := IntegerPartitions[m + n, {n}] - 1;
    (*Given an assignment, list all resultant assignments after one pebbling move; only work for n>=3.*)
    pebblemoves[config_] :=  Block[{n, temp},
        n = Length[config];
        temp = Table[config, {i, n (n - 1)}] +
            Permutations[Join[{-remove, add}, Table[0, {i, n - 2}]]];
        temp = Select[temp, Min[#] >= 0 &];
        temp = ReverseSort[DeleteDuplicates[ReverseSort /@ temp]]];
    (*Given n and m, list all assignments that are P-games.*)
    Plist = {};
    plist[n_, m_] :=  Block[{index, tuples},
        While[Length[Plist] < n, index = Length[Plist];
            AppendTo[Plist, {{Join[{1}, Table[0,{i,index}]]}}]];
        Do[AppendTo[Plist[[n]], {}]; tuples = alltuples[n, i];
            Do[If[Not[IntersectingQ[pebblemoves[tuples[[j]]],
                    If[i > (remove - add), Plist[[n, i - (remove - add)]], {}]]],
                AppendTo[Plist[[n, i]], tuples[[j]]]], {j, Length[tuples]}],
        {i, Length[Plist[[n]]] + 1, m}]; Plist[[n, m]]];
    Do[m = 1; While[plist[n, m] != {}, m++]; Print[" k=", k, " m=", m], {n, 5, 5}],
    {k, 1, 21}]

A346657 Numbers that are not divisible by the product of their nonzero digits.

Original entry on oeis.org

13, 14, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Keywords

Examples

			The product of the nonzero digits of 42 is 4*2 = 8, which does not divide 42.
		

Crossrefs

Complement of A055471.

Programs

  • Mathematica
    Select[Range[100], !Divisible[#, Times @@ Select[IntegerDigits[#], #1 > 0 &]] &] (* Amiram Eldar, Jul 27 2021 *)
  • PARI
    isok(k) = k % vecprod(select(x->(x>0), digits(k))); \\ Michel Marcus, Jul 28 2021
  • Python
    from math import prod
    def ok(n): return n > 0 and n%prod([int(d) for d in str(n) if d != '0'])
    print(list(filter(ok, range(88)))) # Michael S. Branicky, Jul 27 2021
    

A346401 a(n) is the minimum number of pebbles such that any assignment of those pebbles on a complete graph with n vertices is a next-player winning game in the two-player impartial (3, 2) pebbling game.

Original entry on oeis.org

13, 21, 15, 21, 17, 25, 21, 29, 25, 33, 29, 37, 33, 41, 37, 45, 41, 49, 45, 53, 49, 57
Offset: 3

Keywords

Comments

A (3,2) pebbling move involves removing 3 pebbles from a vertex in a simple graph and placing 2 pebbles on an adjacent vertex.
A two-player impartial (3,2) pebbling game involves two players alternating (3,2) pebbling moves. The first player unable to make a move loses.

Examples

			For n=6, a(6)=21 is the least number of pebbles for which every (3,2) game on K_6 is a next-player winning game regardless of assignment.
For n=7, a(7)=17 is the least number of pebbles for which every (3,2) game on K_7 is a next-player winning game regardless of assignment.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

  • Mathematica
    remove = 3; add = 2;
    (*Given n and m,list all possible assignments.*)
    alltuples[n_, m_] := IntegerPartitions[m + n, {n}] - 1;
    (*Given an assignment,list all resultant assignments after one pebbling move; only work for n>=3.*)
    pebblemoves[config_] := Block[{n, temp},
        n = Length[config];
        temp = Table[config, {i, n (n - 1)}] +
            Permutations[Join[{-remove, add}, Table[0, {i, n - 2}]]];
        temp = Select[temp, Min[#] >= 0 &];
        temp = ReverseSort[DeleteDuplicates[ReverseSort /@ temp]]];
    (*Given n and m,list all assignments that are P-games.*)
    Plist = {};
    plist[n_, m_] :=  Block[{index, tuples},
        While[Length[Plist] < n, index = Length[Plist];
            AppendTo[Plist, {{Join[{1}, Table[0, {i, index}]]}}]];
        Do[AppendTo[Plist[[n]], {}]; tuples = alltuples[n, i];
            Do[If[Not[IntersectingQ[pebblemoves[tuples[[j]]],
                    If[i > (remove - add), Plist[[n, i - (remove - add)]], {}]]],
                AppendTo[Plist[[n, i]], tuples[[j]]]], {j, Length[tuples]}],
        {i, Length[Plist[[n]]] + 1, m}]; Plist[[n, m]]];
    Do[m = 1; While[plist[n, m] != {}, m++]; Print[" n=", n, " m=", m], {n, 3, 24}]

Formula

a(n) = 2n+3 when n >= 7 is odd (conjectured).
a(n) = 2n+9 when n >= 6 is even (conjectured).