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: Ethan Ji

Ethan Ji's wiki page.

Ethan Ji has authored 4 sequences.

A385820 Number of equivalence classes of finitely-supported integer functions on Z^2 modulo moves that add + or -1 to every cell whose coordinates form an arithmetic progression of length n.

Original entry on oeis.org

1, 2, 27, 1024, 9765625, 272097792, 558545864083284007, 295147905179352825856, 1144561273430837494885949696427, 305175781250000000000000000000000000, 1890591424712781041871514584574319778449301246603238034051, 98746073676238604311280222171685832518740805156864
Offset: 1

Author

Ethan Ji, Jul 09 2025

Keywords

Crossrefs

Cf. A076113.

Programs

  • Mathematica
    a[n_Integer?Positive] := Module[{pairs = FactorInteger[n]}, Times @@ (#1^(n^2*(#2 #1^(2 #2) - (#1^#2 (#1^#2 - 1))/(#1 - 1))/(2 #1^(2 #2))) & @@@ pairs)]
  • PARI
    a(n) = my(f=factor(n)); for (i=1, #f~, my(p=f[i,1], k=f[i,2]); f[i,2] = n^2*(k*p^(2*k) - p^k*(p^k-1)/(p-1))/(2*p^(2*k))); factorback(f); \\ Michel Marcus, Jul 10 2025

Formula

a(n) = Product_{p^k | n : prime p, k = p-adic order of n} p^(n^2*(k*p^(2k) - p^k(p^k - 1)/(p - 1)) / (2*p^(2k))).
a(p) = A076113(p), for prime p.

A378196 Number of 2-colorings of length n without an arithmetic progression of length 4.

Original entry on oeis.org

1, 2, 4, 8, 14, 26, 48, 78, 132, 230, 356, 548, 842, 1078, 1344, 1764, 1744, 1850, 1948, 1708, 1442, 1342, 1032, 702, 524, 316, 168, 136, 136, 144, 152, 160, 168, 176, 28, 0
Offset: 0

Author

Ethan Ji, Nov 19 2024

Keywords

Comments

After 0, the sequence will continue to be 0. A sequence satisfying this property cannot have a subsequence which violates it, thus there must exist a sequence of length n-1 if there exists a sequence of length n.

Crossrefs

First 0 index given by A005346.

Programs

  • Mathematica
    HasEquallySpacedKBits[bits_, k_] :=
     If[k == 1, True,
      Module[{n = Length[bits], found = False},
       Do[If[Count[Table[bits[[start + gap*i]], {i, 0, k - 1}],
           bits[[start]]] == k, found = True; Break[]], {gap, 1,
         Floor[n/(k - 1)]}, {start, 1, n - gap*(k - 1)}];
       found]]
    BitSequence[k_] :=
     Module[{prevSequences = {{}}, currSequences, n = 0, ExtendSequence},
      ExtendSequence[seq_] :=
       Module[{newSeq0, newSeq1, result = {}}, newSeq0 = Join[seq, {0}];
        newSeq1 = Join[seq, {1}];
        If[! HasEquallySpacedKBits[newSeq0, k], AppendTo[result, newSeq0]];
        If[! HasEquallySpacedKBits[newSeq1, k], AppendTo[result, newSeq1]];
        result];
      Function[targetN,
       Print["k=", k, ", n=", n, ": count=", Length[prevSequences]];
       While[n < targetN, n++;
        currSequences = Flatten[ExtendSequence /@ prevSequences, 1];
        prevSequences = currSequences;
        Print["k=", k, ", n=", n, ": count=", Length[prevSequences]];];]]
    BitSequence[4][35]
    (* Ethan Ji, Nov 19 2024 *)

A378195 Number of 2-colorings of length n without an arithmetic progression of length 3.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 20, 16, 6, 0
Offset: 0

Author

Ethan Ji, Nov 19 2024

Keywords

Comments

After 0, the sequence will continue to be 0. A sequence satisfying this property cannot have a subsequence which violates it, thus there must exist a sequence of length n-1 if there exists a sequence of length n.

Examples

			a(3) = 6 since we have [0,0,1],[0,1,0],[0,1,1],[1,0,0],[1,0,1],[1,1,0].
		

Crossrefs

First 0 index given by A005346.

Programs

  • Mathematica
    HasEquallySpacedKBits[bits_, k_] :=
     If[k == 1, True,
      Module[{n = Length[bits], found = False},
       Do[If[Count[Table[bits[[start + gap*i]], {i, 0, k - 1}],
           bits[[start]]] == k, found = True; Break[]], {gap, 1,
         Floor[n/(k - 1)]}, {start, 1, n - gap*(k - 1)}];
       found]]
    BitSequence[k_] :=
     Module[{prevSequences = {{}}, currSequences, n = 0, ExtendSequence},
      ExtendSequence[seq_] :=
       Module[{newSeq0, newSeq1, result = {}}, newSeq0 = Join[seq, {0}];
        newSeq1 = Join[seq, {1}];
        If[! HasEquallySpacedKBits[newSeq0, k], AppendTo[result, newSeq0]];
        If[! HasEquallySpacedKBits[newSeq1, k], AppendTo[result, newSeq1]];
        result];
      Function[targetN,
       Print["k=", k, ", n=", n, ": count=", Length[prevSequences]];
       While[n < targetN, n++;
        currSequences = Flatten[ExtendSequence /@ prevSequences, 1];
        prevSequences = currSequences;
        Print["k=", k, ", n=", n, ": count=", Length[prevSequences]];];]]
    BitSequence[3][9]
    (* Ethan Ji, Nov 19 2024 *)

A378197 Number of 2-colorings of length n without an arithmetic progression of length 5.

Original entry on oeis.org

1, 2, 4, 8, 16, 30, 58, 112, 216, 400, 740, 1398, 2638, 4710, 8444, 15118, 27690, 48406, 84382, 146928, 255844, 402998, 625824, 956370, 1447476, 2066828, 3225856, 5020232, 7823236, 10975318, 15264202, 21500308, 30004914, 39030820, 50728472, 65402746, 88886116
Offset: 0

Author

Ethan Ji, Nov 19 2024

Keywords

Comments

After a(178) = 0, the sequence will continue to be 0. A sequence satisfying this property cannot have a subsequence which violates it, thus there must exist a sequence of length n-1 if there exists a sequence of length n.

Crossrefs

First 0 index given by A005346.

Programs

  • Mathematica
    HasEquallySpacedKBits[bits_, k_] :=
     If[k == 1, True,
      Module[{n = Length[bits], found = False},
       Do[If[Count[Table[bits[[start + gap*i]], {i, 0, k - 1}],
           bits[[start]]] == k, found = True; Break[]], {gap, 1,
         Floor[n/(k - 1)]}, {start, 1, n - gap*(k - 1)}];
       found]]
    BitSequence[k_] :=
     Module[{prevSequences = {{}}, currSequences, n = 0, ExtendSequence},
      ExtendSequence[seq_] :=
       Module[{newSeq0, newSeq1, result = {}}, newSeq0 = Join[seq, {0}];
        newSeq1 = Join[seq, {1}];
        If[! HasEquallySpacedKBits[newSeq0, k], AppendTo[result, newSeq0]];
        If[! HasEquallySpacedKBits[newSeq1, k], AppendTo[result, newSeq1]];
        result];
      Function[targetN,
       Print["k=", k, ", n=", n, ": count=", Length[prevSequences]];
       While[n < targetN, n++;
        currSequences = Flatten[ExtendSequence /@ prevSequences, 1];
        prevSequences = currSequences;
        Print["k=", k, ", n=", n, ": count=", Length[prevSequences]]; ]; ]]
    BitSequence[5][178]
    (* Ethan Ji, Nov 19 2024 *)