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.

Previous Showing 11-20 of 23 results. Next

A340316 Square array A(n,k), n>=1, k>=1, read by antidiagonals, where row n is the increasing list of all squarefree numbers with n primes.

Original entry on oeis.org

2, 3, 6, 5, 10, 30, 7, 14, 42, 210, 11, 15, 66, 330, 2310, 13, 21, 70, 390, 2730, 30030, 17, 22, 78, 462, 3570, 39270, 510510, 19, 26, 102, 510, 3990, 43890, 570570, 9699690, 23, 33, 105, 546, 4290, 46410, 690690, 11741730, 223092870
Offset: 1

Views

Author

Peter Dolland, Jan 04 2021

Keywords

Comments

This is a permutation of all squarefree numbers > 1.

Examples

			First six rows and columns:
      2     3     5     7    11    13
      6    10    14    15    21    22
     30    42    66    70    78   102
    210   330   390   462   510   546
   2310  2730  3570  3990  4290  4830
  30030 39270 43890 46410 51870 53130
		

Crossrefs

Cf. A005117 (squarefree numbers), A072047 (number of prime factors), A340313 (indexing), A078840 (all natural numbers, not only squarefree).
Columns k=1..2: A002110, A306237.
Main diagonal gives A340467.
Cf. A358677.

Programs

  • Haskell
    a340316 n k = a340316_row n !! (k-1)
    a340316_row n = [a005117_list !! k | k <- [0..], a072047_list !! k == n]
    
  • Python
    from math import prod, isqrt
    from sympy import prime, primerange, integer_nthroot, primepi
    def A340316_T(n,k):
        if n == 1: return prime(k)
        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(k+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(A072047(n), A340313(n)) = A005117(n) for n > 1.

A376365 The number of distinct prime factors of the cubefree numbers.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 3, 1, 2, 2, 2, 2, 1, 2, 2, 1, 3, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 3, 1, 2, 2, 3, 1, 1, 2, 2, 2, 2, 3, 1, 2, 1, 3, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 1, 1, 3, 2, 1, 3, 2, 2, 2, 2, 2, 1, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Sep 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Module[{e = If[k == 1, {}, FactorInteger[k][[;; , 2]]]}, If[AllTrue[e, # < 3 &], Length[e], Nothing]]; Array[f, 150]
  • PARI
    lista(kmax) = {my(e, is); for(k = 1, kmax, e = factor(k)[, 2]; is = 1; for(i = 1, #e, if(e[i] > 2, is = 0; break)); if(is, print1(#e, ", ")));}

Formula

a(n) = A001221(A004709(n)).
Sum_{A004709(k) <= x} a(k) = (6/Pi^2) * x * (log(log(x)) + B - C) + O(x/log(x)), where B is Mertens's constant (A077761) and C = Sum_{p prime} (p-1)/(p*(p^3-1)) = 0.10770743252352371604... (Das et al., 2024).

A319246 Sum of prime indices of the n-th squarefree number.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 15 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n.

Examples

			The 19th squarefree number is 30 with prime indices (3,2,1), so a(19) = 6.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Cases[FactorInteger[n],{p_,k_}:>k*PrimePi[p]]],{n,Select[Range[100],SquareFreeQ]}]

A376361 The number of distinct prime factors of the powerful numbers.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 1, 2, 3, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 2, 3, 3, 1, 2, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Sep 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Module[{e = If[k == 1, {}, FactorInteger[k][[;; , 2]]]}, If[AllTrue[e, # > 1 &], Length[e], Nothing]]; Array[f, 3500]
  • PARI
    lista(kmax) = {my(e, is); for(k = 1, kmax, e = factor(k)[, 2]; is = 1; for(i = 1, #e, if(e[i] == 1, is = 0; break)); if(is, print1(#e, ", ")));}

Formula

a(n) = A001221(A001694(n)).
Sum_{A001694(k) <= x} a(k) = c * sqrt(x) * (log(log(x)) + B - log(2) + L(2, 3) - L(2, 4)) + O(sqrt(x)/log(x)), where c = zeta(3/2)/zeta(3) (A090699), B is Mertens's constant (A077761), L(h, r) = Sum_{p prime} 1/(p^(r/h - 1) * (p - p^(1 - 1/h) + 1)), L(2, 3) = 1.07848461669337535407..., and L(2, 4) = 0.57937575954505652569... (Das et al., 2024).

A376363 The number of distinct prime factors of the cubefull numbers.

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 3, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 2, 2, 1, 2
Offset: 1

Views

Author

Amiram Eldar, Sep 21 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[k_] := Module[{e = If[k == 1, {}, FactorInteger[k][[;; , 2]]]}, If[AllTrue[e, # > 2 &], Length[e], Nothing]]; Array[f, 60000]
  • PARI
    lista(kmax) = {my(e, is); for(k = 1, kmax, e = factor(k)[, 2]; is = 1; for(i = 1, #e, if(e[i] < 3, is = 0; break)); if(is, print1(#e, ", ")));}

Formula

a(n) = A001221(A036966(n)).
Sum_{A036966(k) <= x} a(k) = c * x^(1/3) * (log(log(x)) + B - log(3) + L(3, 4) - L(3, 6)) + O(x^(1/3)/log(x)), where c = A362974, B is Mertens's constant (A077761), L(h, r) = Sum_{p prime} 1/(p^(r/h - 1) * (p - p^(1 - 1/h) + 1)), L(3, 4) = 1.65235055631578303808..., and L(3, 6) = 0.67060646664392140547... (Das et al., 2024).

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)}.

A368779 The number of prime factors of the cubefree numbers, counted with multiplicity.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 2, 2, 1, 3, 1, 2, 2, 1, 3, 1, 3, 2, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 4, 1, 2, 2, 1, 3, 1, 3, 3, 2, 1, 2, 3, 2, 3, 1, 2, 2, 2, 1, 4, 1, 2, 3, 2, 3, 1, 3, 2, 3, 1, 1, 2, 3, 3, 2, 3, 1, 2, 1, 4, 2, 2, 2, 1, 4, 2, 3, 2, 2, 2, 1, 3, 3, 4, 1, 3
Offset: 1

Views

Author

Amiram Eldar, Jan 05 2024

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, If[AllTrue[e, # < 3 &], Total[e], Nothing]]; f[1] = 0; Array[f, 100]
  • PARI
    lista(max) = {my(e); for(k = 1, max, e = factor(k)[,2]; if(k == 1 || vecmax(e) < 3, print1(vecsum(e), ", ")));}
    
  • Python
    from sympy import mobius, integer_nthroot, primeomega
    def A368779(n):
        def f(x): return n+x-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return primeomega(m) # Chai Wah Wu, Aug 06 2024

Formula

a(n) = A001222(A004709(n)).
Sum_{A004709(k) <= x} a(k) = (1/zeta(3)) * x * log(log(x)) + O(x) (Jakimczuk and Lalín, 2022). [corrected Sep 21 2024]

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.

A360729 a(n) is the number of prime factors of the n-th powerful number (counted with repetition).

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Feb 18 2023

Keywords

Crossrefs

Similar sequences: A072047, A076399.

Programs

  • Mathematica
    PrimeOmega[Select[Range[3000], # == 1 || Min[FactorInteger[#][[;; , 2]]] > 1 &]]
  • PARI
    apply(bigomega, select(ispowerful, [1..3000]))

Formula

a(n) = A001222(A001694(n)).
Sum_{A001694(k) < x} a(k) = (2*zeta(3/2)/zeta(3))*sqrt(x)*log(log(x)) + (2*(B_2 - log(2)) + Sum_{p prime} (3/((p^(3/2)+1))))*(zeta(3/2)/zeta(3))*sqrt(x) + O(sqrt(x)/sqrt(log(x))), where B_2 = A083342 (Jakimczuk and Lalín, 2022). [corrected Sep 21 2024]

A384008 Irregular triangle read by rows where row n lists the first differences of the 0-prepended prime indices of the n-th squarefree number.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 23 2025

Keywords

Comments

All rows are different.

Examples

			The 28-th squarefree number is 42, with 0-prepended prime indices (0,1,2,4), with differences (1,1,2), so row 28 is (1,1,2).
The squarefree numbers and corresponding rows begin:
    1: ()        23: (9)        47: (15)
    2: (1)       26: (1,5)      51: (2,5)
    3: (2)       29: (10)       53: (16)
    5: (3)       30: (1,1,1)    55: (3,2)
    6: (1,1)     31: (11)       57: (2,6)
    7: (4)       33: (2,3)      58: (1,9)
   10: (1,2)     34: (1,6)      59: (17)
   11: (5)       35: (3,1)      61: (18)
   13: (6)       37: (12)       62: (1,10)
   14: (1,3)     38: (1,7)      65: (3,3)
   15: (2,1)     39: (2,4)      66: (1,1,3)
   17: (7)       41: (13)       67: (19)
   19: (8)       42: (1,1,2)    69: (2,7)
   21: (2,2)     43: (14)       70: (1,2,1)
   22: (1,4)     46: (1,8)      71: (20)
		

Crossrefs

Row-lengths are A072047, sums A243290.
This is the restriction of A383534 (ranked by A383535) to rows of squarefree index.
A000040 lists the primes, differences A001223.
A048767 is the Look-and-Say transform, union A351294, complement A351295.
A056239 adds up prime indices, row sums of A112798, counted by A001222.
A320348 counts strict partitions with distinct 0-appended differences, ranks A325388.
A325324 counts partitions with distinct 0-appended differences, ranks A325367.

Programs

  • Mathematica
    sql=Select[Range[100],SquareFreeQ];
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Differences[Prepend[prix[sql[[n]]],0]],{n,Length[sql]}]
Previous Showing 11-20 of 23 results. Next