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.

Showing 1-6 of 6 results.

A358677 Irregular triangle where row n gives the columns of A340316 whose minimum value is in row n of A340316. The lists of column indices are given in abbreviated form, using pairs (x, y) to mean the range [x..y].

Original entry on oeis.org

1, 16, 18, 18, 21, 21, 17, 17, 19, 20, 22, 265549, 265604, 265605, 265608, 265681, 265683, 265829, 265831, 265831, 265835, 265836, 265850, 265850, 265853, 265853, 265862, 265873, 265550, 265603, 265606, 265607, 265682, 265682, 265830, 265830, 265832, 265834, 265837, 265849, 265851, 265852, 265854, 265861
Offset: 1

Views

Author

Michel Marcus, Dec 12 2022

Keywords

Comments

This sequence is a spin-off from old comments of A340316 (see history there).
Pending availability of tighter constraints, we assume that there are no more values in row n here only after we reach a column of A340316 where the value in A340316 row n is greater than the value in A340316 row n+2.
Presumably, using the results from Landau as they apply to A276176, it can similarly be shown that every row here is finite. - Peter Munn, Dec 20 2022

Examples

			First 2 rows are:
 {1..16, 18..18, 21..21} for [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,21];
 {17..17, 19..20, 22..265549, 265604..265605, 265608..265681, 265683..265829, 265831..265831, 265835..265836, 265850..265850, 265853..265853, 265862..265873}.
The A340316 first 2 rows being:
   1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22
  -----------------------------------------------------------------
   2  3  5  7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79
   6 10 14 15 21 22 26 33 34 35 38 39 46 51 55 57 58 62 65 69 74 77
     the first columns that give row 2:           ^^    ^^ ^^    ^^
Row 3 begins: {265550..265603, 265606..265607, 265682..265682, 265830..265830, 265832..265834, ...
		

Crossrefs

Programs

  • PARI
    showlist(list) = {my(slist = List()); listput(slist, list[1]); for (i=2, #list, if (list[i] != list[i-1]+1, listput(slist, list[i-1]); listput(slist, list[i]););); listput(slist, list[#list]); Vec(slist);}
    primo(i) = factorback(primes(i));
    ubound(nL, n) = {if (nL == 1, return(n*log(n) + n*log(log(n)))); if (nL == 2, return(n*log(n)/log(log(n)))); if (nL == 3, return(2*n*log(n)/log(log(n))^2)); if (nL == 4, return(3*n*log(n)/log(log(n))^3)); if (nL == 5, return(4*n*log(n)/log(log(n))^4));}
    out(list1, list2, list3) = print(showlist(list1)); print(showlist(list2)); print(showlist(list3));
    rows() = {my(nL = 3, nC = 1000000, nB=5); my(m=vector(nL, i, vector(nC))); my(vfirst = vector(nL, i, primo(i))); my(list1 = List(), list2 = List(), list3 = List()); for (nn=1, nB, my(ok=1); print("nn=", nn); for (i=1, nL, my(list = List()); my(na = vfirst[i]); my(ns = 1); if (nn==1, m[i][ns] = na; ns++); forsquarefree (k=na+1, 100*round(ubound(i,nn*nC)), if (omega(k[2]) == i, m[i][ns] = k[1]; ns++); if (ns > nC, break)); if (ns < nC, print("not enough"); out(list1, list2, list3); return;);); N = 1; for (j=1, nC, if (m[N][j] == vecmin (vector(nL, r, m[r][j])), listput(list1, j+(nn-1)*nC));); N = 2; for (j=1, nC, if (m[N][j] == vecmin (vector(nL, r, m[r][j])), listput(list2, j+(nn-1)*nC));); N = 3; for (j=1, nC, if (m[N][j] == vecmin (vector(nL, r, m[r][j])), listput(list3, j+(nn-1)*nC));); vfirst = vector(nL, i, m[i][nC]); for (i=1, nL, m[i] = vector(nC));); out(list1, list2, list3);}

Extensions

Provisional rule for calculating that row n is full added by Peter Munn, Jan 03 2023

A340313 The n-th squarefree number is the a(n)-th squarefree number having its number of primes.

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 2, 5, 6, 3, 4, 7, 8, 5, 6, 9, 7, 10, 1, 11, 8, 9, 10, 12, 11, 12, 13, 2, 14, 13, 15, 14, 16, 15, 16, 17, 17, 18, 18, 19, 3, 19, 20, 4, 20, 21, 21, 22, 5, 22, 23, 23, 24, 25, 26, 24, 27, 28, 29, 30, 25, 26, 6, 27, 7, 31, 28, 29, 8, 32, 30, 9
Offset: 1

Views

Author

Peter Dolland, Jan 04 2021

Keywords

Comments

The sequence gives the column index of A005117(n) in the array A340316 and may be understood as a complementary addition to A072047 giving the row index.

Examples

			{x|x <= 6, A072047(x) = A072047(6) = 1} = {2,3,4,6}, therefore a(6) = 4.
{x|x <= 28, A072047(x) = A072047(28) = 3} = {19,28}, therefore a(28) = 2.
		

Crossrefs

Cf. A001221, A001222, A005117 (squarefree numbers), A058933, A067003, A072047 (number of prime factors), A340316 (squarefree numbers array).

Programs

  • Haskell
    a340313 n = a340313_list !! (n-1)
    a340313_list = repetitions a072047_list
        where
        repetitions [] = []
        repetitions (a:as) = 1 : h a as (repetitions as)
        h  []  = []
        h b (c:cs) (r:rs) = (if c == b then succ else id) r : h b cs rs
    
  • Maple
    with(numtheory):
    b:= proc(n) option remember; local k; if n=1 then 1 else
          for k from 1+b(n-1) while not issqrfree(k) do od; k fi
        end:
    p:= proc() 0 end:
    a:= proc(n) option remember; local h; a(n-1);
          h:= bigomega(b(n)); p(h):= p(h)+1;
        end: a(0):=0:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 06 2021
  • Mathematica
    b[n_] := b[n] = Module[{k}, If[n == 1, 1,
         For[k = 1 + b[n - 1], !SquareFreeQ[k], k++]; k]];
    p[_] = 0;
    a[n_] := a[n] = Module[{h}, a[n - 1];
         h = PrimeOmega[b[n]]; p[h] = p[h]+1];
    a[0] = 0;
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Mar 28 2022, after Alois P. Heinz *)
  • PARI
    first(n) = {v = vector(5); n--; res = vector(n); t = 0; for(i = 2, oo, f = factor(i)[,2]; if(vecmax(f) == 1, if(#f > #v, v = concat(v, vector(#f - #v)) ); t++; v[#f]++; res[t] = v[#f]; if(t >= n, return(concat(1, res)) ) ) ) } \\ David A. Corneth, Jan 07 2021
    
  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, mobius, primenu, primepi
    def A340313(n):
        if n == 1: return 1
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        kmax = bisection(f)
        return int(sum(primepi(kmax//prod(c[1] for c in a))-a[-1][0] for a in g(kmax,0,1,1,m)) if (m:=primenu(kmax)) > 1 else primepi(kmax)) # Chai Wah Wu, Aug 31 2024

Formula

a(n) = #{x|x <= n, A072047(x) = A072047(n)}.

A340467 a(n) is the n-th squarefree number having n prime factors.

Original entry on oeis.org

2, 10, 66, 462, 4290, 53130, 903210, 17687670, 406816410, 11125544430, 338431883790, 11833068917670, 457077357006270, 20384767656323070, 955041577211912190, 49230430891074322890, 2740956243836856315270, 168909608387276001835590, 11054926927790884163355330
Offset: 1

Views

Author

Alois P. Heinz, Jan 08 2021

Keywords

Comments

a(n) is the n-th product of n distinct primes.
All terms are even.
This sequence differs from A073329 which has also nonsquarefree terms.

Examples

			a(1) = A000040(1) = 2.
a(2) = A006881(2) = 10.
a(3) = A007304(3) = 66.
a(4) = A046386(4) = 462.
a(5) = A046387(5) = 4290.
a(6) = A067885(6) = 53130.
a(7) = A123321(7) = 903210.
a(8) = A123322(8) = 17687670.
a(9) = A115343(9) = 406816410.
a(10) = A281222(10) = 11125544430.
		

Crossrefs

Programs

  • Python
    from math import isqrt, prod
    from sympy import primerange, integer_nthroot, primepi
    def A340467(n):
        if n == 1: return 2
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f) # Chai Wah Wu, Aug 31 2024

Formula

a(n) = A340316(n,n).
a(n) = A005117(m) <=> A072047(m) = n = A340313(m).
A001221(a(n)) = A001222(a(n)) = n.
a(n) < A070826(n+1), the least odd number with exactly n distinct prime divisors.

A356683 a(n) is the smallest positive k such that the count of squarefree numbers <= k that have n prime factors is equal to the count of squarefree numbers <= k that have n-1 prime factors (and the count is positive).

Original entry on oeis.org

2, 39, 1279786, 8377774397163159586
Offset: 1

Views

Author

Jon E. Schoenfield, Nov 22 2022

Keywords

Examples

			The first two squarefree numbers are 1 and 2; 1 has 0 prime factors and 2 has 1 prime factor, so a(1)=2.
At k=39, in the interval [1..k], there are 12 squarefree numbers with 1 prime factor (i.e., 12 primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37), and 12 squarefree numbers with 2 prime factors (i.e., 6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39). k=39 is the smallest such positive number for which these two counts are the same (and are positive), so a(2)=39.
At k=1279786, the interval [1..k] includes 265549 squarefree numbers with 2 prime factors and the same number of squarefree numbers with 3 prime factors, and there is no smaller positive number k that has this property (where the counts are positive), so a(3)=1279786. There are 75 numbers with this property, the last one being 1281378.
At k=8377774397163159586, the interval [1..k] includes 1356557942402075858 squarefree numbers with 3 prime factors and the same number of squarefree numbers with 4 prime factors, and there is no smaller positive number k that has this property (where the counts are positive), so a(4)=8377774397163159586. There are 14 numbers with this property, the last one being 8377774397163162544. - _Henri Lifchitz_, Jan 31 2025
		

Crossrefs

Cf. 1 to 5 distinct primes: A000040, A006881, A007304, A046386, A046387.
Cf. 6 to 10 distinct primes: A067885, A123321, A123322, A115343, A281222.
Cf. A340316.

Programs

  • PARI
    a(n) = my(nbm = 0, nbn = 0); for (k=1, oo, if (issquarefree(k), my(o=omega(k)); if (o==n, nbn++); if (o==n-1, nbm++); if (nbm && (nbn==nbm), return(k)))); \\ Michel Marcus, Nov 25 2022
    
  • Python
    from itertools import count
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A356683(n):
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
        def f(k,n): return sum(primepi(k//prod(c[1] for c in a))-a[-1][0] for a in g(k,0,1,1,n)) if n>1 else primepi(k)
        return 2 if n==1 else next(k for k in count(1) if (x:=f(k,n-1))>0 and x==f(k,n)) # Chai Wah Wu, Aug 31 2024

Extensions

a(4) from Henri Lifchitz, Jan 31 2025

A359242 Consider the race between primes, squarefree semiprimes, ..., products of k distinct primes; sequence indicates when one overtakes another to give a new race leader.

Original entry on oeis.org

2, 58, 61, 65, 73, 77, 1279789, 1280057, 1280066, 1280073, 1280437, 1280441, 1281155, 1281161, 1281165, 1281179, 1281190, 1281243, 1281247, 1281262, 1281271, 1281313, 1281365
Offset: 1

Views

Author

Michel Marcus, Dec 22 2022

Keywords

Comments

This is A276176 for squarefree integers as listed in A340316 table.

Crossrefs

Essentially the same as A335293.

Programs

  • PARI
    lista() = {my(nb = 10^7); my(ip = 1); while (factorback(primes(ip)) < nb, ip++); my(vp = vector(ip), list = List([2]), listi = List([1]), lastnb=1, lasti=1, nba = 3, nbb = nb); vp[lasti]++; for (i=1, 2, forsquarefree(isqf=nba, nbb, my(newi = omega(isqf[2])); vp[newi]++; if (newi != lasti,  if (vp[newi] > vp[lasti], lasti = newi; listput(list, isqf[1]); listput(listi, vp[newi]);););); nba = nbb + 1; nbb = nbb + nb;); Vec(list);} \\ Michel Marcus, Dec 22 2022

Extensions

Name clarified by Peter Munn, Dec 31 2022

A371799 Rectangular array, read by downward antidiagonals: row n shows the numbers m>1 in whose prime factorization p(1)^e(1)*p(2)^e(2)* ...*p(k)^e(k), all e(i) are <= 1 and the number of 0' s in {e(i)} is n-1.

Original entry on oeis.org

2, 6, 3, 30, 10, 5, 210, 15, 14, 7, 2310, 42, 21, 22, 11, 30030, 70, 35, 33, 26, 13, 510510, 105, 66, 55, 39, 34, 17, 9699690, 330, 110, 77, 65, 51, 38, 19, 223092870, 462, 154, 78, 91, 85, 57, 46, 23, 6469693230, 770, 165, 130, 102, 114, 95, 69, 58, 29
Offset: 1

Views

Author

Clark Kimberling, Apr 10 2024

Keywords

Examples

			15 = 2^0*3^1*51, so (e(1),e(2),e(3)) = (0,1,1), so 15 is in row 2
Corner:
 2   6   30  210  2310  30030  510510  9699690
 3   10  15   42    70    105     330      462
 5   14  21   35    66    110     154      165
 7   22  33   55    77     78     130      182
11   26  39   65    91    102     143      170
13   34  51   85   114    119     187      190
17   38  57   95   133    138     209      230
19   46  69  115   161    174     253      290
23   58  87  145   186    203     310      319
		

Crossrefs

Cf. A000040 (the primes, column 1), A002110 (row 1), A005117 (increasing sequence of all terms of the array), A340316, A371801, A371802, A371803, A371804.

Programs

  • Mathematica
    exps := Map[#[[2]] &, Sort[Join[#, Complement[Map[{Prime[#], 0} &, Range[PrimePi[Last[#][[1]]]]], Map[{#[[1]], 0} &, #]]]] &[FactorInteger[#]]] &;
    m = Map[Transpose[#][[1]] &, GatherBy[Map[{#[[1]], Count[#[[2]], 0]} &,     Select[Map[{#, exps[#]} &, Range[2, 5000]], Max[#[[2]]] <= 1 &]], #[[2]] &]];
    z = 12; row1 = Table[Apply[Times, Prime[Range[n]]], {n, 1, z}];
    r = Join[{row1}, Table[Take[m[[n]], z], {n, 2, z}]];
    Grid[r]  (* array *)
    w[n_, k_] := r[[n]][[k]]
    Table[w[n - k + 1, k], {n, z}, {k, n, 1, -1}] // Flatten
    (* sequence *)(* Peter J. C. Moses, Mar 21 2024 *)
Showing 1-6 of 6 results.