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: Maxim Karimov

Maxim Karimov's wiki page.

Maxim Karimov has authored 9 sequences.

A370108 Array read by antidiagonals: T(n,k) is the number of length n necklaces using at most k colors in which the convex hull of a set of beads of any color A can be transformed by rotation into the convex hull of a set of beads of any other color B (n >= 1, k >= 1).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 6, 2, 2, 0, 0, 10, 8, 6, 0, 0, 0, 15, 20, 18, 0, 2, 0, 0, 21, 40, 50, 0, 10, 0, 0, 0, 28, 70, 120, 24, 28, 0, 4, 0, 0, 36, 112, 252, 144, 60, 0, 12, 0, 0, 0, 45, 168, 476, 504, 230, 0, 54, 8, 4, 0
Offset: 1

Author

Maxim Karimov and Vladislav Sulima, Feb 10 2024

Keywords

Comments

It is assumed that all beads lie on a circle and distance between any two adjacent is the same.

Examples

			n\k| 1 2  3  4   5   6    7    8     9 ...
---+----------------------------------
 1 | 0 0  0  0   0   0    0    0     0 ... A000007
 2 | 0 1  3  6  10  15   21   28    36 ... A000217
 3 | 0 0  2  8  20  40   70  112   168 ... A007290
 4 | 0 2  6 18  50 120  252  476   828 ... A062026
 5 | 0 0  0  0  24 144  504 1344  3024 ... A059593
 6 | 0 2 10 28  60 230 1022 3640 10488
 7 | 0 0  0  0   0   0  720 5760 25920 ... A153760
 8 | 0 4 12 54 190 510 1134 7252 49284
 9 | 0 0  8 32  80 160  280  448 40992
...
		

Formula

T(n,2) = A000013(ceiling(n/2)) * [n mod 2 == 0], where [] is the Iverson bracket.
For prime p, T(p,k) = (p-1)! * binomial(k,p).

A369878 Array read by antidiagonals: T(n,k) is the number of length n necklaces using at most k colors in which the convex hull of a set of beads of any color A cannot be transformed by rotation into the convex hull of a set of beads of any other color B (n >= 1, k >= 1).

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 4, 3, 4, 1, 5, 4, 9, 4, 1, 6, 5, 16, 9, 8, 1, 7, 6, 25, 16, 27, 12, 1, 8, 7, 36, 25, 64, 93, 20, 1, 9, 8, 49, 36, 125, 304, 243, 32, 1, 10, 9, 64, 49, 216, 705, 928, 699, 60, 1, 11, 10, 81, 64, 343, 1356, 2405, 4384, 2019, 104, 1
Offset: 1

Author

Maxim Karimov and Vladislav Sulima, Feb 03 2024

Keywords

Comments

It is assumed that all beads lie on a circle and that the distance between any two adjacent beads is the same.

Examples

			n\k| 1  2    3     4     5      6      7      8       9 ...
---+---------------------------------------------------
 1 | 1  2    3     4     5      6      7      8       9 ... A000027
 2 | 1  2    3     4     5      6      7      8       9 ... A000027
 3 | 1  4    9    16    25     36     49     64      81 ... A000290
 4 | 1  4    9    16    25     36     49     64      81 ... A000290
 5 | 1  8   27    64   125    216    343    512     729 ... A000578
 6 | 1 12   93   304   705   1356   2317   3648    5409
 7 | 1 20  243   928  2405   5076   9415  15968   25353
 8 | 1 32  699  4384 15245  39216  84007 159104  275769
 9 | 1 60 2019 18256 72765 202236 457135 902784 1620441
...
		

Crossrefs

Formula

T(n,2) = A063776(n).

A369524 Array read by antidiagonals: T(n,k) is the number of length n necklaces using at most k colors with black beads always occurring in runs of even length.

Original entry on oeis.org

0, 1, 1, 2, 2, 0, 3, 4, 2, 1, 4, 7, 6, 3, 0, 5, 11, 14, 11, 3, 1, 6, 16, 28, 34, 18, 5, 0, 7, 22, 50, 87, 81, 38, 5, 1, 8, 29, 82, 191, 276, 227, 70, 8, 0, 9, 37, 126, 373, 759, 983, 615, 151, 10, 1, 10, 46, 184, 666, 1782, 3301, 3500, 1789, 314, 15, 0, 11, 56, 258, 1109, 3717, 9180, 14545, 13007, 5206, 684, 19, 1
Offset: 1

Author

Maxim Karimov and Vladislav Sulima, Jan 25 2024

Keywords

Comments

Equivalently, black beads can be considered to have length 2, while all other beads have length 1.
Column k is the "CIK" (necklace, indistinct, unlabeled) transform of {k-1, 1, 0, 0, 0, ...} (see C. Bower link). - Andrew Howroyd, Jan 25 2024

Examples

			n\k| 1  2   3     4      5       6       7        8         9 ...
---+-----------------------------------------------------------------
 1 | 0  1   2     3      4       5       6        7         8 ...A001477
 2 | 1  2   4     7     11      16      22       29        37 ...A000124
 3 | 0  2   6    14     28      50      82      126       184 ...A033547
 4 | 1  3  11    34     87     191     373      666      1109
 5 | 0  3  18    81    276     759    1782     3717      7080
 6 | 1  5  38   227    983    3301    9180    22163     47997
 7 | 0  5  70   615   3500   14545   48210   135155    333400
 8 | 1  8 151  1789  13007   66166  260113   844691   2370229
 9 | 0 10 314  5206  48820  304970 1423790  5358934  17110376
10 | 1 15 684 15490 186195 1425453 7897006 34438104 125093109
...
		

Crossrefs

Columns 1..2 are A000035(n-1), A000358.
Rows 1..3 are A001477(k-1), A000124(k-1), A033547(k-1).
Cf. A000010 (phi), A075195 (all beads of same length).

Programs

  • MATLAB
    function [res] = num2(n,k)
    res=0;
    for d=divisors(n)
        s=(k-1)^d;
        for i=1:floor(d/2)
            s=s + nchoosek(d-i-1,i-1) * d/i * (k-1)^(d-2*i);
        end
        res= res + eulerPhi(n/d) * s;
    end
    res=res/n;
    end
    
  • PARI
    T(n,k) = sum(d=1, n, eulerphi(d)*polcoef(log(1/(1 - (k-1)*x^d - x^(2*d)) + O(x*x^n)), n)/d)  \\ Andrew Howroyd, Jan 25 2024

Formula

T(n,k) = (1/n) * Sum_{d|n} phi(n/d) * ((k-1)^d + Sum_{i=1..floor(d/2)} binomial(d-i-1,i-1) * d/i * (k-1)^(d-2*i)), where phi(n) = A000010.
G.f. of column k: Sum_{d>=1} (phi(d)/d) * log(1/(1 - (k-1)*x^d - x^(2*d))). - Andrew Howroyd, Jan 25 2024

A347351 Triangle read by rows: T(n,k) is the number of links of length k in a set of all necklaces A000358 of length n, 1 <= k <= n.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 4, 2, 0, 1, 5, 1, 1, 0, 1, 6, 4, 2, 1, 0, 1, 7, 3, 2, 1, 1, 0, 1, 8, 8, 3, 3, 1, 1, 0, 1, 9, 8, 7, 3, 2, 1, 1, 0, 1, 10, 18, 9, 5, 4, 2, 1, 1, 0, 1, 11, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1, 12, 40, 24, 16, 8, 6, 3, 2, 1, 1, 0, 1, 13, 55, 34, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1
Offset: 0

Author

Maxim Karimov and Vladislav Sulima, Aug 28 2021

Keywords

Comments

Definitions:
1. A link is any 0 in any necklace from A000358 and all 1s following this 0 in this necklace to right until another 0 is encountered.
2. Length of the link is the number of elements in the link.
Sum of all elements n-row is Fibonacci(n-1)+n iff n=1 or n=p (follows from the identity for the sum of the Fibonacci numbers and the formula for the triangle T(n,k)).

Examples

			For k > 0:
   n\k |  1   2   3   4   5   6   7   8   9  10  ...
  -----+---------------------------------------
   1   |  1
   2   |  2   1
   3   |  3   0   1
   4   |  4   2   0   1
   5   |  5   1   1   0   1
   6   |  6   4   2   1   0   1
   7   |  7   3   2   1   1   0   1
   8   |  8   8   3   3   1   1   0   1
   9   |  9   8   7   3   2   1   1   0   1
  10   | 10  18   9   5   4   2   1   1   0   1
  ...
If we continue the calculation for nonpositive k, we get a table in which each row is a Fibonacci sequence, in which term(0) = A113166, term(1) = A034748.
For k <= 0:
   n\k |  0   -1   -2   -3   -4   -5   -6   -7   -8   -9 ...
  -----+------------------------------------------------
   1   |  0    1    1    2    3    5    8   13   21   34 ... A000045
   2   |  1    2    3    5    8   13   21   34   55   89 ... A000045
   3   |  1    4    5    9   14   23   37   60   97  157 ... A000285
   4   |  3    6    9   15   24   39   63  102  165  267 ... A022086
   5   |  3    9   12   21   33   54   87  141  228  369 ... A022379
   6   |  8   14   22   36   58   94  152  246  398  644 ... A022112
   7   |  8   19   27   46   73  119  192  311  503  814 ... A206420
   8   | 17   30   47   77  124  201  325  526  851 1377 ... A022132
   9   | 23   44   67  111  178  289  467  756 1223 1979 ... A294116
  10   | 41   68  109  177  286  463  749 1212 1961 3173 ... A022103
  ...
		

Programs

  • MATLAB
    function [res] = calcLinks(n,k)
    if k==1
        res=n;
    else
        d=divisors(n);
        res=0;
        for i=1:length(d)
            if d (i) >= k
                res=res+eulerPhi(n/d(i))*fiboExt(d(i)-k-1);
            end
        end
    end
    function [s] = fiboExt(m) % extended fibonacci function (including negative arguments)
    m=sym(m); % for large fibonacci numbers
    if m>=0 || mod(m,2)==1
        s=fibonacci(abs(m));
    else
        s=fibonacci(abs(m))*(-1);
    end
    
  • PARI
    T(n, k) = if (k==1, n, sumdiv(n, d, if (d>=k, eulerphi(n/d)*fibonacci(d-k-1)))); \\ Michel Marcus, Aug 29 2021

Formula

If k=1, T(n,k)=n, otherwise T(n,k) = Sum_{d>=k, d|n} Phi(n/d)*Fibonacci(d-k-1), where Phi=A000010.

A340273 a(n) is the number of divisors d of n such that phi(n)/phi(lpf(n)) mod phi(n)/phi(d) = 0, where phi is Euler's totient function (A000010), and lpf(n) is the least prime factor of n (A020639).

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 1, 4, 2, 4, 1, 6, 1, 4, 3, 5, 1, 6, 1, 6, 3, 4, 1, 8, 2, 4, 3, 6, 1, 8, 1, 6, 3, 4, 2, 9, 1, 4, 3, 8, 1, 8, 1, 6, 5, 4, 1, 10, 2, 6, 3, 6, 1, 8, 2, 8, 3, 4, 1, 12, 1, 4, 5, 7, 3, 8, 1, 6, 3, 8, 1, 12, 1, 4, 5, 6, 2, 8, 1, 10, 4, 4, 1, 12, 3, 4
Offset: 1

Author

Maxim Karimov, Jan 02 2021

Keywords

Comments

This equivalence criterion splits the divisor set of n into two types of divisors and can be used to compute the number of links of length k on the set of Fibonacci necklaces (A000358) of length n. This counting is a combinatorial problem over the positive integers.

Crossrefs

Programs

  • MATLAB
    n=100;
    A=[];
    for i=1:n
        d=divisors(i);
        t=0;
        for j=1:size(d,2)
            if checkCD(i,d(j))==1
                t=t+1;
            end
        end
        A=[A t];
    end
    function [res] = checkCD(n,d)
        if mod(n,d)==0 && mod(totient(n)/totient(min(factor(n))),totient(n)/totient(d))==0
            res=1;
        else
            res=0;
        end
    end
    function [res] = totient(n)
    res=0;
        for i=1:n
            if gcd(i,n)==1
                res=res+1;
            end
        end
    end
    
  • Maple
    with(numtheory):
    a:= n-> `if`(n=1, 1, (f-> nops(select(d-> irem(phi(n)/phi(f),
             phi(n)/phi(d))=0, divisors(n))))(min(factorset(n)))):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    Table[Function[{e, f}, DivisorSum[n, 1 &, Mod[e, f/EulerPhi[#]] == 0 &]] @@ {#2/#1, #2} & @@ {EulerPhi[FactorInteger[n][[1, 1]]], EulerPhi[n]}, {n, 86}] (* Michael De Vlieger, Feb 12 2021 *)
  • PARI
    lpf(n) = if (n==1, 1, factor(n)[1,1]);
    a(n) = my(lp = lpf(n), t = eulerphi(n)); sumdiv(n, d, Mod(t/eulerphi(lp), t/eulerphi(d)) == 0); \\ Michel Marcus, Jan 03 2021

A340268 Composite numbers k>1 such that (s-1) | (d-1) for each d | k, where s = lpf(k) = A020639(k).

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 96
Offset: 1

Author

Maxim Karimov, Jan 02 2021

Keywords

Comments

Not a duplicate of A340058 because the complements A335902 and A340269 differ. - R. J. Mathar, Feb 16 2021

Crossrefs

Cf. A000010, A000961, A020639, A340058, A335902, A340269 (complement).
Contains all composite terms of at least A003586, A003591, A003592, A003593, A003596.

Programs

  • MATLAB
    n=300; % gives all terms of the sequence not exceeding n
    A=[];
    for i=2:n
        lpf=2;
        while mod(i,lpf)~=0
            lpf=lpf+1;
        end
        for d=1:floor(i/2)
            if mod(i,d)==0 && mod(d-1,lpf-1)~=0
                break
            elseif d==floor(i/2)
                A=[A i];
            end
        end
    end
    
  • Maple
    with(numtheory):
    q:= n-> (f-> andmap(d-> irem(d-1, f)=0, divisors(n)))(min(factorset(n))-1):
    select(not isprime and q, [$2..96])[];  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    Select[Range[2, 96], Function[{n, s}, And[! PrimeQ@ n, AllTrue[Divisors[n] - 1, Mod[#, s] == 0 &]]] @@ {#, FactorInteger[#][[1, 1]] - 1} &] (* Michael De Vlieger, Feb 12 2021 *)
  • PARI
    isok(c) = if ((c>1) && !isprime(c), my(f=factor(c)[,1]); for (k=1, #f~, if ((f[k]-1) % (f[1]-1), return(0))); return(1)); \\ Michel Marcus, Jan 03 2021

A340269 Numbers k > 1 such that lpf(k)-1 does not divide d-1 for at least one divisor d of k, where lpf(k) is the least prime factor of k (A020639).

Original entry on oeis.org

35, 55, 77, 95, 115, 119, 143, 155, 161, 175, 187, 203, 209, 215, 221, 235, 245, 247, 253, 275, 287, 295, 299, 319, 323, 329, 335, 355, 371, 377, 385, 391, 395, 403, 407, 413, 415, 437, 455, 473, 475, 493, 497, 515, 517, 527, 533, 535, 539, 551, 559, 575, 581
Offset: 1

Author

Maxim Karimov, Jan 02 2021

Keywords

Comments

No terms are divisible by 2 or 3; no terms are in A000961. - Robert Israel, Oct 10 2023

Programs

  • MATLAB
    n=300; % gives all terms of the sequence not exceeding n
    A=[];
    for i=2:n
        lpf=2;
        while mod(i,lpf)~=0
            lpf=lpf+1;
        end
        for d=1:i
            if mod(i,d)==0 && mod(d-1,lpf-1)~=0
                A=[A i];
                break
            end
        end
    end
  • Maple
    with(numtheory):
    q:= n-> (f-> ormap(d-> irem(d-1, f)>0, divisors(n)))(min(factorset(n))-1):
    select(q, [$2..600])[];  # Alois P. Heinz, Feb 12 2021
  • Mathematica
    Select[Range[2, 600], Function[{d, k}, AnyTrue[d, Mod[#, k] != 0 &]] @@ {Divisors[#] - 1, FactorInteger[#][[1, 1]] - 1} &] (* Michael De Vlieger, Feb 12 2021 *)

A340058 Composite numbers c such that phi(c)/phi(mind(c)) mod phi(c)/phi(maxd(c)) = 0, where phi is the Euler function, mind(c) is the smallest nontrivial divisor of c, maxd(c) is the largest nontrivial divisor of c.

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 96, 98, 99
Offset: 1

Author

Maxim Karimov, Dec 27 2020

Keywords

Comments

This equivalence criterion splits a set of composite numbers into two classes and can be used to count certain combinatorial objects.

Crossrefs

Programs

  • MATLAB
    n=100; % gives all terms of the sequence not exceeding n
    A=[];
    for i=1:n
       dn=divisors(i);
       if size(dn,2)>2 && mod(totient(i)/totient(dn(2)),totient(i)/totient(dn(end-1)))==0
          A=[A i];
       end
    end
    function [res] = totient(n)
    res=0;
        for i=1:n
            if gcd(i,n)==1
                res=res+1;
            end
        end
    end
    
  • PARI
    isok(c) = if ((c>1) && !isprime(c), my(t=eulerphi(c), d=divisors(c)); ((t/eulerphi(d[2])) % (t/eulerphi(d[#d-1]))) == 0); \\ Michel Marcus, Dec 28 2020

A335902 Composite numbers c such that phi(c)/phi(mind(c)) mod phi(c)/phi(maxd(c)) <> 0, where phi is the Euler function, mind(c) is the smallest nontrivial divisor of c, maxd(c) is the largest nontrivial divisor of c.

Original entry on oeis.org

35, 55, 77, 95, 115, 119, 143, 155, 161, 187, 203, 209, 215, 221, 235, 245, 247, 253, 287, 295, 299, 319, 323, 329, 335, 355, 371, 377, 391, 395, 403, 407, 413, 415, 437, 473, 493, 497, 515, 517, 527, 533, 535, 551, 559, 581, 583, 589, 605, 611, 623, 629, 635, 649
Offset: 1

Author

Maxim Karimov, Dec 28 2020

Keywords

Comments

This equivalence criterion splits a set of composite numbers into two classes and can be used to count certain combinatorial objects.

Crossrefs

Programs

  • MATLAB
    n=500; % gives all terms of the sequence not exceeding n
    A=[];
    for i=1:n
        dn=divisors(i);
        if size(dn,2)>2 && mod (totient(i)/totient(dn(2)),totient(i)/totient(dn(end-1)))~=0
            A=[A i];
        end
    end
    function [res] = totient(n)
    res=0;
        for i=1:n
            if gcd(i,n)==1
                res=res+1;
            end
        end
    end
    
  • PARI
    isok(c) = if ((c>1) && !isprime(c), my(t=eulerphi(c), d=divisors(c)); ((t/eulerphi(d[2])) % (t/eulerphi(d[#d-1]))) != 0); \\ Michel Marcus, Dec 28 2020