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-10 of 10 results.

A081376 a(n) is the least number such that A067003[a(n)] = n.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 46, 48, 50, 51, 52, 54, 55, 56, 57, 58, 62, 63, 65, 68, 69, 72, 74, 75, 76, 77, 80, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 98, 99, 100, 104, 106, 108, 111, 112, 115, 116, 117, 118, 119, 122, 123
Offset: 1

Views

Author

Labos Elemer, Mar 24 2003

Keywords

Crossrefs

Programs

  • Mathematica
    g[x_] := Length[FactorInteger[x]] f[x_] := Count[Table[g[j] - g[x], {j, 1, x}], 0] Table[f[w], {w, 1, 100}]

A083399 Number of divisors of n that are not divisors of other divisors of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jun 12 2003

Keywords

Comments

a(n) <= tau(n); a(n) = tau(n) iff n is prime or n=1 (A008578, A000040); a(n)=tau(n)-1 iff n is semiprime (A001358).
Number of noncomposite divisors of n, (cf. A008578). - Jaroslav Krizek, Nov 25 2009
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) is the number of maximal subsemigroups of the annular Jones monoid of degree n.
a(n) is the number of maximal subsemigroups of the monoid of orientation-preserving mappings on a set with n elements.
a(n) + 1 is the number of maximal subsemigroups of the monoid of orientation-preserving partial mappings on a set with n elements.
(End)
This is the restricted growth sequence transform of A001221 (and thus also of A007875, A034444, A082476, A292586 and many other sequences). This follows from the formula a(n) = 1+A001221(n), and from the fact that for any n, A001221(n) <= 1+A001221(k) for all k = 1..(n-1). A067003 gives the ordinal transform of A001221. See also A292582, A292583, A292585. - Antti Karttunen, Sep 25 2017

Examples

			{1,2,3,4,6,8,12,24} are the divisors of n=24: 1, 2, 3, 4 and 6 divide not only 24, but also 8 or 12, therefore a(24) = 3.
{1,2,3,4,6,8,12,24} are the divisors of n=24: 1, 2 and 3 are noncomposites, therefore a(24) = 3. - _Jaroslav Krizek_, Nov 25 2009
		

Crossrefs

Programs

Formula

a(n) = omega(n) + 1, where omega = A001221.
a(n) = tau(n) - A055212(n) = A000005(n)-A055212(n).
a(n) = A000005(n) - A033273(n) + 1. - Jaroslav Krizek, Nov 25 2009
a(n) = A010553(A007947(n)) = A000005(A000005(A007947(n))) = tau_2(tau_2(rad(n))). - Enrique Pérez Herrero, Jun 25 2010
G.f.: x/(1 - x) + Sum_{k>=1} x^prime(k)/(1 - x^prime(k)). - Ilya Gutkovskiy, Mar 21 2017
Sum_{k=1..n} a(k) = n * (log(log(n)) + B + 1) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 29 2024

A058933 Let k be bigomega(n) (i.e., n is a k-almost-prime). a(n) = number of k-almost-primes <= n.

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, Jan 11 2001

Keywords

Comments

Equivalently, the number of positive integers less than or equal to n with the same number of prime factors as n, counted with multiplicity. - Gus Wiseman, Dec 28 2018
There is a close relationship between a(n) and a(n^2). See A209934 for an exploratory quantification. - Peter Munn, Aug 04 2019

Examples

			3 is prime, so a(3)=2. 10 is 2-almost prime (semiprime), so a(10)=4.
From _Gus Wiseman_, Dec 28 2018: (Start)
Column n lists the a(n) positive integers less than or equal to n with the same number of prime factors as n, counted with multiplicity:
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
  ---------------------------------------------------------------------
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
        2     3  4  5     6  9   7   8   11  10  14      13  12  17  18
              2     3     4  6   5       7   9   10      11  8   13  12
                    2        4   3       5   6   9       7       11  8
                                 2       3   4   6       5       7
                                         2       4       3       5
                                                         2       3
                                                                 2
(End)
		

Crossrefs

Positions of 1's are A000079.
Equivalent sequence restricted to squarefree numbers: A340313.

Programs

  • Maple
    p:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= numtheory[bigomega](n);
          p(t):= p(t)+1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Oct 09 2015
  • Mathematica
    p[] = 0; a[n] := a[n] = Module[{t}, t = PrimeOmega[n]; p[t] = p[t]+1]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 24 2017, after Alois P. Heinz *)
  • PARI
    a(n) = my(k=bigomega(n)); sum(i=1, n, bigomega(i)==k); \\ Michel Marcus, Jun 27 2024
    
  • Python
    from math import prod, isqrt
    from sympy import isprime, primepi, primerange, integer_nthroot, primeomega
    def A058933(n):
        if n==1: return 1
        if isprime(n): return primepi(n)
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        return int(sum(primepi(n//prod(c[1] for c in a))-a[-1][0] for a in g(n,0,1,1,primeomega(n)))) # Chai Wah Wu, Aug 28 2024

Formula

Ordinal transform of A001222 (bigomega). - Franklin T. Adams-Watters, Aug 28 2006
If a(n) < a(3^A001222(2n)) = A078843(A001222(2n)) then a(2n) = a(n), otherwise a(2n) > a(n). - Peter Munn, Aug 05 2019

Extensions

Name edited by Peter Munn, Dec 30 2022

A067004 Number of numbers <= n with same number of divisors as n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 21 2001

Keywords

Examples

			a(10)=3 since 6,8,10 each have four divisors. a(11)=5 since 2,3,5,7,11 each have two divisors.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    R:= Vector(N):
    for n from 1 to N do
      v:= numtheory:-tau(n);
      R[v]:= R[v]+1;
      A[n]:= R[v];
    od:
    seq(A[n],n=1..N); # Robert Israel, May 04 2015
  • Mathematica
    b[_] = 0;
    a[n_] := a[n] = With[{t = DivisorSigma[0, n]}, b[t] = b[t]+1];
    Array[a, 105] (* Jean-François Alcover, Dec 20 2021 *)
  • PARI
    a(n)=my(d=numdiv(n)); sum(k=1,n,numdiv(k)==d) \\ Charles R Greathouse IV, Sep 02 2015

Formula

Ordinal transform of A000005. - Franklin T. Adams-Watters, Aug 28 2006
a(A000040(n)^(p-1)) = n if p is prime. - Robert Israel, May 04 2015

A322838 Number of positive integers less than n with more prime factors than n, counted with multiplicity.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 0, 1, 1, 5, 0, 6, 2, 2, 0, 9, 1, 10, 1, 5, 5, 13, 0, 6, 6, 2, 2, 18, 2, 19, 0, 10, 10, 10, 1, 24, 11, 11, 1, 27, 5, 28, 5, 5, 15, 31, 0, 16, 6, 17, 6, 36, 2, 19, 2, 20, 20, 41, 2, 42, 21, 9, 0, 23, 10, 47, 10, 25, 10, 50, 1, 51, 27, 11, 11
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2018

Keywords

Examples

			Column n lists the a(n) positive integers less than n with more prime factors than n:
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
  ---------------------------------------------------------------------
              4     6     8  8   10      12  12  12      16  16  18  16
                    4            9       10  8   8       15      16
                                 8       9               14      15
                                 6       8               12      14
                                 4       6               10      12
                                         4               9       10
                                                         8       9
                                                         6       8
                                                         4       6
                                                                 4
		

Crossrefs

Positions of zeros appear to be A029744.

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeOmega[#]>PrimeOmega[n]&]],{n,100}]

A334655 Number of integers less than n with the same number of distinct prime factors as n.

Original entry on oeis.org

0, 0, 1, 2, 3, 0, 4, 5, 6, 1, 7, 2, 8, 3, 4, 9, 10, 5, 11, 6, 7, 8, 12, 9, 13, 10, 14, 11, 15, 0, 16, 17, 12, 13, 14, 15, 18, 16, 17, 18, 19, 1, 20, 19, 20, 21, 21, 22, 22, 23, 24, 25, 23, 26, 27, 28, 29, 30, 24, 2, 25, 31, 32, 26, 33, 3, 27, 34, 35, 4, 28, 36, 29, 37, 38, 39, 40, 5, 30, 41
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 31 2020

Keywords

Examples

			a(12) = 2 because omega(12) = 2 and also omega(6) = omega(10) = 2.
		

Crossrefs

Cf. A001221, A002110 (positions of 0's), A047983, A067003, A067004, A322837, A322841, A335097.

Programs

  • Maple
    R:= NULL:
    for n from 1 to 100 do
      w:= nops(numtheory:-factorset(n));
      if assigned(V[w]) then V[w]:= V[w]+1 else V[w]:= 1 fi;
      R:= R, V[w]-1
    od:
    R; # Robert Israel, Feb 25 2024
  • Mathematica
    Table[Length[Select[Range[n - 1], PrimeNu[#] == PrimeNu[n] &]], {n, 80}]
  • PARI
    a(n)={my(t=omega(n)); sum(k=1, n-1, omega(k)==t)} \\ Andrew Howroyd, Oct 31 2020

Formula

a(n) = |{j < n : omega(j) = omega(n)}|.
a(n) = A067003(n) - 1.

A322837 Number of positive integers less than n with fewer distinct prime factors than n.

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 1, 1, 1, 8, 1, 9, 1, 10, 10, 1, 1, 12, 1, 13, 13, 13, 1, 14, 1, 15, 1, 16, 1, 29, 1, 1, 19, 19, 19, 19, 1, 20, 20, 20, 1, 40, 1, 22, 22, 22, 1, 23, 1, 24, 24, 24, 1, 25, 25, 25, 25, 25, 1, 57, 1, 27, 27, 1, 28, 62, 1, 29, 29, 65, 1, 30, 1, 31
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2018

Keywords

Examples

			Column n lists the a(n) positive integers less than n with fewer distinct prime factors than n:
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
  ---------------------------------------------------------------------
     1  1  1  1  5  1  1  1  9   1   11  1   13  13  1   1   17  1   19
                 4           8       9       11  11          16      17
                 3           7       8       9   9           13      16
                 2           5       7       8   8           11      13
                 1           4       5       7   7           9       11
                             3       4       5   5           8       9
                             2       3       4   4           7       8
                             1       2       3   3           5       7
                                     1       2   2           4       5
                                             1   1           3       4
                                                             2       3
                                                             1       2
                                                                     1
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeNu[#]
    				
  • PARI
    \\ See Corneth link

A322841 Number of positive integers less than n with more distinct prime factors than n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 0, 3, 0, 0, 5, 5, 0, 6, 0, 0, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 13, 1, 1, 1, 1, 17, 1, 1, 1, 20, 0, 21, 2, 2, 2, 24, 2, 25, 2, 2, 2, 28, 2, 2, 2, 2, 2, 33, 0, 34, 3, 3, 36, 3, 0, 38, 4, 4, 0, 41, 5, 42, 5, 5, 5, 5, 0, 47, 6, 48
Offset: 1

Views

Author

Gus Wiseman, Dec 28 2018

Keywords

Examples

			Column n lists the a(n) positive integers less than n with more distinct prime factors than n:
  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
  ---------------------------------------------------------------------
                    6  6  6      10      12          15  15      18
                                  6      10          14  14      15
                                          6          12  12      14
                                                     10  10      12
                                                      6   6      10
                                                                  6
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; nops(numtheory[factorset](n)) end:
    a:= proc(n) option remember;
          (t-> add(`if`(b(i)>t, 1, 0), i=1..n-1))(b(n))
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 28 2018
  • Mathematica
    Table[Length[Select[Range[n],PrimeNu[#]>PrimeNu[n]&]],{n,100}]
  • PARI
    a(n) = my(omegan=omega(n)); sum(k=1, n-1, omega(k) > omegan); \\ Michel Marcus, Dec 29 2018
    
  • PARI
    first(n) = {my(t = 1, pp = 1, res = vector(n)); forprime(p = 2, oo, pp*=p; if(pp > n, v = vector(t); break); t++); for(i = 1, n, o = omega(i); res[i] = v[o+1]; for(j = 1, o, v[j]++)); res} \\ David A. Corneth, Dec 29 2018

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

A380654 Number of positive integers less than or equal to n that have the same sum of distinct prime factors as n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Jan 29 2025

Keywords

Comments

Ordinal transform of A008472.

Crossrefs

Programs

  • Maple
    b:= n-> add(i[1], i=ifactors(n)[2]):
    p:= proc() 0 end:
    a:= proc(n) option remember; local t;
          t:= b(n); p(t):= p(t)+1
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jan 30 2025
  • Mathematica
    sopf[n_] := DivisorSum[n, # &, PrimeQ[#] &]; Table[Length[Select[Range[n], sopf[#] == sopf[n] &]], {n, 1, 100}]
  • Python
    from sympy import factorint
    from collections import Counter
    from itertools import count, islice
    def agen(): # generator of terms
        sopfcount = Counter()
        for n in count(1):
            key = sum(p for p in factorint(n))
            sopfcount[key] += 1
            yield sopfcount[key]
    print(list(islice(agen(), 100))) # Michael S. Branicky, Jan 30 2025

Formula

a(n) = |{j <= n : sopf(j) = sopf(n)}|.
Showing 1-10 of 10 results.