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: Yaroslav Deryavko

Yaroslav Deryavko's wiki page.

Yaroslav Deryavko has authored 3 sequences.

A387364 Least number which is not a prime power and whose prime factors are equal modulo n.

Original entry on oeis.org

6, 15, 10, 21, 14, 55, 46, 33, 22, 39, 26, 85, 82, 51, 34, 57, 38, 115, 118, 69, 46, 141, 142, 145, 159, 87, 58, 93, 62, 259, 314, 185, 202, 111, 74, 205, 226, 123, 82, 129, 86, 235, 262, 141, 94, 371, 291, 265, 298, 159, 106, 321, 327, 295, 334, 177, 118, 183
Offset: 1

Author

Yaroslav Deryavko, Aug 27 2025

Keywords

Examples

			For n = 2, factors of a(2) = 15 are 3 and 5, they both have a residue of 1 mod 2.
		

Crossrefs

First term of A380758 when n = 10.

Programs

  • Mathematica
    a[n_]:=Module[{k=1},Until[!PrimePowerQ[k]&&Min[Mod[First/@FactorInteger[k],n]]==Max[Mod[First/@FactorInteger[k],n]],k++];k];Array[a,58] (* James C. McMahon, Sep 03 2025 *)
  • PARI
    f(k, n) = if (!isprimepower(k), my(f=factor(k)[,1]); #Set(apply(x->Mod(x, n), f)) == 1);
    a(n) = my(k=1); while (!f(k,n), k++); k; \\ Michel Marcus, Aug 27 2025

A380758 Numbers which are not prime powers and their prime factors share a last digit in base 10.

Original entry on oeis.org

39, 69, 117, 119, 129, 159, 207, 219, 249, 259, 299, 309, 329, 339, 341, 351, 387, 451, 469, 477, 489, 507, 519, 551, 559, 579, 621, 629, 657, 669, 671, 679, 689, 699, 747, 749, 781, 789, 799, 833, 849, 879, 889, 897, 927, 939, 949, 959, 989, 1017, 1053, 1059
Offset: 1

Author

Yaroslav Deryavko, Feb 01 2025

Keywords

Comments

Also called the one-sided numbers.
They can end only in either 1, 3, 7 or 9.

Examples

			39 = 3*13.
		

Crossrefs

Cf. A004615.

Programs

  • Maple
    q:= n-> (l-> nops(l)>1 and nops({map(i-> irem(i[1], 10), l)[]})=1)(ifactors(n)[2]):
    select(q, [$1..2000])[];  # Alois P. Heinz, Feb 18 2025
  • Mathematica
    Sort[Times@@@Cases[Subsets[Prime[Range[100]],{2}],?(Mod[#[[1]]-#[[2]],10]==0&)]][[;;100]] (* _Shenghui Yang, Feb 18 2025 *)
  • PARI
    isok(k) = my(f=factor(k)); (#f~ != 1) && (#Set(vector(#f~, i, f[i,1] % 10)) == 1); \\ Michel Marcus, Feb 18 2025
    
  • Python
    from sympy import factorint
    def ok(n): return len(f:=factorint(n)) > 1 and len(set(p%10 for p in f)) == 1
    print([k for k in range(1, 1060) if ok(k)]) # Michael S. Branicky, Feb 18 2025

A380108 Number of distinct partitions of length n binary strings into maximal constant substrings up to permutation.

Original entry on oeis.org

1, 2, 3, 6, 10, 18, 29, 48, 75, 118, 179, 272, 403, 596, 865, 1252, 1786, 2538, 3566, 4990, 6918, 9552, 13086, 17856, 24205, 32684, 43881, 58698, 78125, 103618, 136820, 180064, 236031, 308432, 401585, 521340, 674579, 870446, 1119786, 1436798, 1838405, 2346480, 2987204
Offset: 0

Author

Yaroslav Deryavko, Jan 12 2025

Keywords

Comments

Equivalently, a(n) is the number of partitions of n into parts of two kinds where the number of parts of each kind differ by at most one.

Examples

			For n = 3, the partitions are (000), (111), (00, 1), (0, 11), (0, 0, 1), (0, 1, 1).
		

Crossrefs

Programs

  • Maple
    g:= (n, i, t)-> `if`(t>1+n, 0, `if`(n=0, 1, b(n, i, t))):
    b:= proc(n, i, t) option remember; add(add(g(n-i*j,
          min(n-i*j, i-1), abs(t+2*h-j)), h=0..j), j=`if`(i=1, n, 0..n/i))
        end:
    a:= n-> g(n$2, 0):
    seq(a(n), n=0..42);  # Alois P. Heinz, Jan 15 2025
  • Mathematica
    g[n_, i_, t_] := If[t > 1+n, 0, If[n == 0, 1, b[n, i, t]]];
    b[n_, i_, t_] := b[n, i, t] = Sum[Sum[g[n-i*j,
       Min[n-i*j, i-1], Abs[t+2*h-j]], {h, 0, j}], {j, If[i == 1, n, 0], n/i}];
    a[n_] := g[n, n, 0];
    Table[a[n], {n, 0, 42}] (* Jean-François Alcover, Feb 02 2025, after Alois P. Heinz *)
  • PARI
    seq(n)={my(p=1/prod(k=1, n, 1-y*x^k + O(x*x^n))); Vec(sum(k=0, n\2, polcoef(p, k, y)*(2*polcoef(p, k+1, y) + polcoef(p, k, y))))} \\ Andrew Howroyd, Jan 12 2025
  • Python
    n = 0
    while True:
        m = set()
        for i in range(2**n):
            t = bin(i)[2:]
            t = '0' * (n - len(t)) + t + '2'
            l = []
            s = 0
            for j in range(1, n + 1):
                if t[j] != t[j - 1]:
                    l.append(t[s:j])
                    s = j
            l.sort()
            l = tuple(l)
            m.add(l)
        print(len(m), end=' ')
        n += 1
    

Formula

G.f.: Sum_{k>=0} ([y^k] P(x,y))*([y^k] (1 + 2*y)*P(x,y)), where P(x,y) = Product_{k>=1} 1/(1 - y*x^k). - Andrew Howroyd, Jan 12 2025