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: Christopher J. Smyth

Christopher J. Smyth's wiki page.

Christopher J. Smyth has authored 23 sequences. Here are the ten most recent ones:

A348557 List of indices k such that A327267(k) is less than A328666(k).

Original entry on oeis.org

30, 42, 70, 90, 102, 120, 154, 165, 170, 180, 182, 198, 210, 220, 224, 230, 238, 255, 264, 270, 273, 285, 286, 306, 308, 322, 330, 340, 350, 360, 374, 380, 385, 399, 406, 418, 420, 434, 435, 442, 465, 480, 486, 490, 494, 495, 506, 510, 518, 525, 544, 546, 550, 552, 558
Offset: 1

Author

Christopher J. Smyth, Oct 22 2021

Keywords

Comments

It is known that A327267(n) <= A328666(n) for all n. See link. For n up to 6000, the inequality is strict only for 1193 values of n.
Indeed, the purpose of A328666 is to give a good upper bound sequence for the sequence A327267, while being much easier to compute.

Examples

			a(1) = 30 since 30 is the first value of k for which A327267(k) < A328666(k).
		

Crossrefs

Cf. A327267 and A328666.

A328666 A recursively defined integer-valued function of integer multisets.

Original entry on oeis.org

0, 1, 2, 2, 3, 5, 4, 6, 4, 10, 5, 6, 6, 17, 13, 8, 7, 18, 8, 22, 10, 26, 9, 42, 6, 37, 12, 18, 10, 70, 11, 40, 29, 50, 25, 20, 12, 65, 20, 24, 13, 105, 14, 54, 34, 82, 15, 32, 8, 38, 53, 38, 16, 78, 34, 114, 34, 101, 17, 30, 18, 122, 12, 48, 15
Offset: 1

Author

Christopher J. Smyth, Oct 24 2019

Keywords

Comments

For singletons {k}, F({k}) = k. For multisets {k_1,...,k_r} with r>1, F is defined recursively by
F({k_1,...,k_r}) = min F({k'1,...,k'{r'}})*F({k"1,...,k"{r-r'}})*K/g, where the minimum is taken over all 2-partitions
{k_1,...,k_r} = {k'1,...,k'{r'}} union {k"1,...,k"{r-r'}}, where 1 <= r' < r.
Here K = Sum_{i=1..r} {k_i}^2 and g = gcd(K"*k'1,...,K"*k'{r'},K'*k"1,...,K'*k"{r-r'}), where K' = Sum_{i=1..r'} {k'i}^2 and K" = Sum{i=1..(r-r')} {k"_i}^2.
The function F is then encoded as an integer sequence by a(n)= F({k_1,..,k_r}), where n=p_{k_1}p_{k_2}..p_{k_r}, p_k being the k-th prime (Heinz encoding).
Also a(1)=0.
The significance of this sequence is that for given multiset {k_1,...,k_r} there is an r X r integer matrix with all rows pairwise orthogonal whose top row is {k_1,...,k_r} and whose determinant is F({k_1,...,k_r}).
See the Pinner/Smyth link for the construction of these matrices.

Examples

			For r=2 only allowable 2-partition of {k_1,k_2} is {k_1} union {k_2}, giving K = {k_1}^2+{k_2}^2, K' = {k_1}^2, K" = {k_2}^2, g = k_1*k_2*gcd(k_1,k_2), n =  p_{k_1}p_{k_2}, F({k_i}) = k_i (i=1,2), and so a(n) = F({k_1,k_2}) = F({k_1})F({k_2})K/g = ({k_1}^2+{k_2}^2)/gcd(k_1,k_2). Thus for example a(10) = a(p_1p_3) = 1^2+3^2 = 10.
		

Crossrefs

Cf. A327267.

A327272 Smallest modulus of any (n+1) X (n+1) integer determinant whose top row is 1,2,2^2,...,2^n and whose rows are pairwise orthogonal.

Original entry on oeis.org

1, 5, 42, 425, 17050, 54600, 11468100
Offset: 1

Author

Christopher J. Smyth, Sep 09 2019

Keywords

Comments

An algorithm for generating a(n) is given in the Pinner and Smyth link, where more details about a(n) can be found.
Also, see file link below for {(n,a(n),matrix(n)),0 <= n <= 6}, where matrix(n) has minimal modulus determinant equal to a(n) among (n+1) X (n+1) matrices with top row 1,2,2^2,...,2^n and all rows orthogonal.

Examples

			a(2) =42 since det([[1,2,4],[2,-3,1],[2,1,-1]]) = 42 and is the smallest positive determinant with top row [1,2,2^2] and all entries integers, and rows orthogonal.
		

Crossrefs

Subsequence of A327267-- see comments; A327269 is similar, but determinant's top row is 1,2,...,n; A327271 is similar, but determinant's top row consists of n 1's.

Formula

a(n) = A327267(Product_{k=0..n} prime(2^k)) = A327267(A325782(n+1)).

A327273 An upper bound sequence for A327272.

Original entry on oeis.org

1, 5, 105, 425, 144925, 580125, 243697125, 46420625, 253459513125
Offset: 0

Author

Christopher J. Smyth, Sep 09 2019

Keywords

Comments

a(n) can be calculated by a faster algorithm than that for A327272(n). It gives a small (but not necessarily smallest) positive determinant with top row [1,2,2^2,...,2^n] and all entries integers, and rows orthogonal. Note that a(n) = A327272(n) for n=0,1 and 3. See Pinner and Smyth link below for both algorithms, and more details of the sequences.

Examples

			a(2) = 105 since the algorithm for a(n) produces the determinant([[1,2,4],[2,-1,0],[4,8,-5]]) = 105, having top row [1,2,2^2] and all rows orthogonal.
		

A327267 Minimal determinant of a finite-dimensional integer lattice having an orthogonal basis containing a given vector with all entries positive.

Original entry on oeis.org

0, 1, 2, 2, 3, 5, 4, 6, 4, 10, 5, 6, 6, 17, 13, 8, 7, 18, 8, 22, 10, 26, 9, 42, 6, 37, 12, 18, 10, 42, 11, 40, 29, 50, 25, 20, 12, 65, 20, 24, 13, 42, 14, 54, 34, 82, 15, 32, 8, 38, 53, 38, 16, 78, 34, 114, 34, 101, 17, 30, 18, 122, 12, 48, 15, 30
Offset: 1

Author

Christopher J. Smyth, Aug 31 2019

Keywords

Comments

The given basis vector (k_1,...,k_r) is encoded as n = p_{k_1}...p_{k_r}, where p_j is the j-th prime (Heinz encoding). Then a(n) is the minimal (positive) determinant of all integer r X r matrices with top row (k_1,...,k_r) and all rows pairwise orthogonal.
The values of n and a(n) are independent of the order of the k_j's; they depend only on the multiset {k_1,...,k_r}.
An algorithm for computing a(n) is described in the Pinner and Smyth link below. It has been implemented in Maple. More properties of this sequence are also discussed in this paper.

Examples

			For n = 6 = p_1*p_2, the given basis vector is (1,2), and a(n)=5 because the matrix ((1,2),(-2,1)) has the smallest determinant of a matrix with orthogonal rows, and the given top row.
For n = 70 = 2*5*7 = p_1*p_3*p_4, the given basis vector is (1,3,4), and a(70)=78 because the matrix ((1,3,4),(1,1,-1),(-7,5,-2)) has orthogonal rows and determinant 78, which is minimal.
		

Crossrefs

Cf. A327269 (basis vector is (1,2,...,r)), A327271 (basis vector is (1,1,...,1)), A327272 (basis vector is (1,2,2^2,...,2^{r-1})).

Formula

For n = p_j prime, the matrix is 1 X 1, namely (j), and a(n) = j.
For n = p_{j}*p_{j'}, the matrix is 2 X 2, namely ((j, j'),(-j'/g, j/g)), where g = gcd(j,j'), and a(n) = (j^2 + {j'}^2)/g.
Also easy to see that a(p_{k j_1}*...*p_{k j_r}) = k*a(p_{j_1}*...*p_{j_r}).

A327271 Smallest modulus of any n X n integer determinant whose top row has all 1's and whose rows are pairwise orthogonal.

Original entry on oeis.org

1, 2, 6, 8, 40, 48, 336, 128, 864, 1280, 8448, 3072, 39936
Offset: 1

Author

Christopher J. Smyth, Sep 02 2019

Keywords

Comments

a(n) = A327267(2^n), since 2^n = (p_1)^n is the Heinz code for the multiset {1,1,...,1}.
See Pinner and Smyth link below for more details, including an algorithm for computing A327267(n). Also, see file link below for {(n, a(n), matrix(n)), n <= 13}, where matrix(n) has minimal modulus determinant equal to a(n) among n X n matrices with top row all 1's and all rows orthogonal.
For the first 13 terms, the number of prime factors counted with multiplicity equals n-1: A001222(a(n))=n-1. How far does this hold? - Jon Maiga, Sep 07 2019

Examples

			a(3) = 6 because the matrix [[1,1,1],[1,-1,0],[1,1,-2]] has top row of 3 1's and all rows orthogonal, and minimal positive determinant equal to 6.
		

Crossrefs

Subsequence of A327267, see comments; A327273 is similar, but determinant's top row is 1,2,2^2,...,2^{n-1}.

A327269 Smallest modulus of any integer n X n determinant with top row 1,2,...,n and rows nonzero and pairwise orthogonal.

Original entry on oeis.org

1, 5, 42, 90, 990, 5733, 6720, 39168
Offset: 1

Author

Christopher J. Smyth, Sep 02 2019

Keywords

Comments

Also a(n) = A327267(p_1...p_n), with p_j = j-th prime, since p_1...p_n is the Heinz code for the multiset {1,2,3,...,n}. For more details see Pinner and Smyth link.

Examples

			a(3)=42 since det([1,2,3],[1,-2,1],[4,1,-2]) = 42 and is the smallest positive determinant with top row [1,2,3] and all rows orthogonal.
		

Crossrefs

Subsequence of A327267-- see comments; A327271 is similar, but determinant's top row is n 1's; A327272 is similar, but determinant's top row is 1,2,2^2,...,2^n.

A289509 Numbers k such that the gcd of the indices j for which the j-th prime prime(j) divides k is 1.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 15, 16, 18, 20, 22, 24, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 42, 44, 45, 46, 48, 50, 51, 52, 54, 55, 56, 58, 60, 62, 64, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 82, 84, 85, 86, 88, 90, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104
Offset: 1

Author

Christopher J. Smyth, Jul 11 2017

Keywords

Comments

Any integer k in the sequence encodes (by 'Heinz encoding' cf. A056239) a multiset of integers whose gcd is 1, namely the multiset containing r_j copies of j if k factors as Product_j prime(j)^{r_j} with gcd_j j = 1.
Clearly the sequence contains all even numbers and no odd primes or odd prime powers. It also clearly contains all numbers that are divisible by consecutive primes.
The sequence is the list of those k such that A289508(k) = 1.
It is also the list of those k such that A289506(k) = A289507(k).
Heinz numbers of integer partitions with relatively prime parts, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). - Gus Wiseman, Apr 13 2018

Examples

			6 is a term because 6 = p_1*p_2 and gcd(1,2) = 1.
From _Gus Wiseman_, Apr 13 2018: (Start)
Sequence of integer partitions with relatively prime parts begins:
02 : (1)
04 : (11)
06 : (21)
08 : (111)
10 : (31)
12 : (211)
14 : (41)
15 : (32)
16 : (1111)
18 : (221)
20 : (311)
22 : (51)
24 : (2111)
26 : (61)
28 : (411)
30 : (321)
32 : (11111)
33 : (52)
34 : (71)
35 : (43)
36 : (2211)
38 : (81)
40 : (3111)
(End)
		

Programs

  • Maple
    p:=1:for ind to 10000 do p:=nextprime(p);primeindex[p]:=ind;od:
    out:=[]:for n from 2 to 100 do m:=[];f:=ifactors(n)[2];g:=0;
    for k to nops(f) do mk:=primeindex[f[k][1]];m:=[op(m),mk];
    g:=gcd(g,mk);od; if g=1 then out:=[op(out),n];fi;od:out;
  • Mathematica
    Select[Range[200],GCD@@PrimePi/@FactorInteger[#][[All,1]]===1&] (* Gus Wiseman, Apr 13 2018 *)
  • PARI
    isok(n) = my(f=factor(n)); gcd(apply(x->primepi(x), f[,1])) == 1; \\ Michel Marcus, Jul 19 2017
    
  • Python
    from sympy import gcd, primepi, primefactors
    def ok(n): return gcd([primepi(p) for p in primefactors(n)]) == 1
    print([n for n in range(1, 151) if ok(n)]) # Indranil Ghosh, Aug 06 2017

A289508 a(n) is the GCD of the indices j for which the j-th prime p_j divides n.

Original entry on oeis.org

0, 1, 2, 1, 3, 1, 4, 1, 2, 1, 5, 1, 6, 1, 1, 1, 7, 1, 8, 1, 2, 1, 9, 1, 3, 1, 2, 1, 10, 1, 11, 1, 1, 1, 1, 1, 12, 1, 2, 1, 13, 1, 14, 1, 1, 1, 15, 1, 4, 1, 1, 1, 16, 1, 1, 1, 2, 1, 17, 1, 18, 1, 2, 1, 3, 1, 19, 1, 1, 1, 20, 1, 21, 1, 1, 1, 1, 1, 22, 1, 2, 1, 23
Offset: 1

Author

Christopher J. Smyth, Jul 11 2017

Keywords

Comments

The number n = Product_j p_j can be regarded as an index for the multiset of all the j's, occurring with multiplicity corresponding to the highest power of p_j dividing n. Then a(n) is the gcd of the elements of this multiset. Compare A056239, where the same encoding for integer multisets('Heinz encoding') is used, but where A056239(n) is the sum, rather than the gcd, of the elements of the corresponding multiset (partition) of the j's. Cf. also A003963, for which A003963(n) is the product of the elements of the corresponding multiset.
a(m*n) = gcd(a(m),a(n)). - Robert Israel, Jul 19 2017

Examples

			a(n) = 1 for all even n as 2 = p_1. Also a(p_j) = j.
Further, a(703) = 4 because 703 = p_8.p_{12} and gcd(8,12) = 4.
		

Crossrefs

Programs

  • Maple
    f:=  n -> igcd(op(map(numtheory:-pi, numtheory:-factorset(n)))):
    map(f, [$1..100]); # Robert Israel, Jul 19 2017
  • Mathematica
    Table[GCD @@ Map[PrimePi, FactorInteger[n][[All, 1]] ], {n, 2, 83}] (* Michael De Vlieger, Jul 19 2017 *)
  • PARI
    a(n) = my(f=factor(n)); gcd(apply(x->primepi(x), f[,1])); \\ Michel Marcus, Jul 19 2017
    
  • Python
    from sympy import primefactors, primepi, gcd
    def a(n):
        return gcd([primepi(d) for d in primefactors(n)])
    print([a(n) for n in range(2, 101)]) # Indranil Ghosh, Jul 20 2017

Formula

a(n) = gcd_j j, where p_j divides n.
a(n) = A289506(n)/A289507(n).

A289507 The sum of squares of the elements of a finite multiset of positive integers divided by their gcd, the multiset {s_j} being indexed by n = Product_j p_{s_j}, where p_{s_j} is the s_j-th prime.

Original entry on oeis.org

0, 1, 2, 2, 3, 5, 4, 3, 4, 10, 5, 6, 6, 17, 13, 4, 7, 9, 8, 11, 10, 26, 9, 7, 6, 37, 6, 18, 10, 14, 11, 5, 29, 50, 25, 10, 12, 65, 20, 12, 13, 21, 14, 27, 17, 82, 15, 8, 8, 19, 53, 38, 16, 13, 34, 19, 34, 101, 17, 15, 18, 122, 12, 6, 15, 30, 19, 51
Offset: 1

Author

Christopher J. Smyth, Jul 07 2017

Keywords

Comments

Given an integer linear equation Sum_{j=1..k} e_j x_j = 0, a(n) is also the modulus of the determinant whose first row is e_1, e_2, ..., e_k and whose other k-1 rows form an integral basis for the integer solution space of the equation. Here n = Product_j p_{e_j}, where p_{e_j} is the e_j-th prime.
For the proof, see Links.
Also a(n) = A289506(n) when gcd_j e_j = 1, which occurs for the numbers n in A289509.

Examples

			For n = 63 = 3^2*7 = p_2*p_2*p_4, the corresponding multiset is {2,2,4}, and a(63) = (2^2 + 2^2 + 4^2)/2 = 12. Also the relevant determinant is Det([[2,2,4],[-1,1,0],[-2,0,1]]) = 12.
		

Crossrefs

Cf. A056239, where the same encoding for integer multisets ('Heinz encoding') is used.

Programs

  • Maple
    p:=1: for ind to 1000 do p:=nextprime(p); primeindex[p]:=ind; od:
    # so primeindex[p]:=k if p is the k-th prime
    out:=[0]: for n from 2 to 100 do f:=ifactors(n)[2];
    m:=[];g:=0; for k to nops(f) do pow:=f[k]; ind:=primeindex[pow[1]];g:=gcd(g,ind); for e to pow[2] do
    m:=[op(m), ind]; od; od; out:=[op(out), sum(m[jj]^2, jj=1..nops(m))/g];
    od:print(out);
    # second Maple program:
    with(numtheory):
    a:= n-> (l-> add(i[1]^2*i[2], i=l)/`if`(n=1, 1, igcd(seq(i[1],
             i=l))))(map(i-> [pi(i[1]), i[2]], ifactors(n)[2])):
    seq(a(n), n=1..80);  # Alois P. Heinz, Aug 05 2017
  • Mathematica
    a[n_] := Module[{m}, m = Table[{p, e} = pe; Table[PrimePi[p], {e}], {pe, FactorInteger[n]}] // Flatten; (m.m)/GCD @@ m]; a[1] = 0; Array[a, 80] (* Jean-François Alcover, May 05 2019 *)
  • PARI
    a(n) = if (n==1, 0, my(f=factor(n)); sum(k=1, #f~, f[k,2]*primepi(f[k,1])^2) /gcd(apply(x->primepi(x), f[,1]))); \\ Michel Marcus, Jul 19 2017

Formula

a(n) = (Sum_j e_j^2)/gcd_j(e_j), where n = Product_j p_{e_j}.