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 13 results. Next

A058953 Numbers k of the form k=p*2^x, with p prime and x>=0, such that tau(k)-m = A058933(k) where tau(k) is the number of divisors of k and m is 0 or 1.

Original entry on oeis.org

2, 3, 10, 28, 176, 832, 4352, 19456, 47104, 1900544, 4063232, 77594624, 687865856, 2885681152
Offset: 1

Views

Author

Naohiro Nomoto, Jan 13 2001

Keywords

Comments

(p=2 => m=1); ( Conjecture: [for p>2]; if p=A040069 then m=0 else m=1. )

Crossrefs

Extensions

Offset corrected, title clarified, and a(12)-a(13) from Sean A. Irvine, Sep 07 2022

A058954 Numbers n such that A058933(n)=A058933(n+1).

Original entry on oeis.org

1, 1811, 2612845, 2612894, 2613570, 2613705, 3468358644, 3468361769, 3468361803, 151165506189, 151165506541, 151165506658, 151165506665, 151165506963, 151165506994, 151165507330, 151165507334, 151165512502
Offset: 1

Views

Author

Naohiro Nomoto, Jan 13 2001

Keywords

Crossrefs

Cf. A058933.

Extensions

a(7)-a(18) from Donovan Johnson, Apr 09 2010

A064839 List the natural numbers starting a new row only with each new least prime signature (A025487). a(n) is the column position associated with n.

Original entry on oeis.org

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

Views

Author

Alford Arnold, Oct 24 2001

Keywords

Comments

Row 2 records the primes (A000040). Rows 3 and 4 record the semiprimes (A001358). Rows 5, 6 and 9 record the 3-almost primes (A014612) etc. A058933 is a similar sequence based on k-almost primes.
The graph of this sequence is interesting for large n because it shows multiple curves, one for each prime signature. For example, the six highest curves on the graph of a(n) for n up to 10^4 are for the (1,1), (1,1,1), (1), (2,1,1), (2,1), and (1,1,1,1) prime signatures. The (1) curve dominates until n=58; the (1,1) curve dominates until n=1279786, when the (1,1,1) curve intersects the (1,1) curve. Each (1,1,...,1) curve dominates for a finite number of n.
Ordinal transform of A101296. - Antti Karttunen, May 15 2017
a(n) is the number of positive integers up to n with the same prime signature as n. For example, the a(20) = 3 numbers are {12, 18, 20}. - Gus Wiseman, Jul 08 2019
Ordinal transform of A046523. - Alois P. Heinz, May 31 2020

Examples

			The list begins as follows:
1
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 ...
4 9 25 49 ...
6 10 14 15 21 22 26 33 34 35 38 39 46 51 ...
8 27 ...
12 18 20 28 44 45 50 52 ...
16 ...
Note: the above array, without the initial 1, is given by A095904 (and its transpose A179216). - _Antti Karttunen_, May 15 2017
		

Crossrefs

Programs

  • Maple
    p:= proc() 0 end:
    a:= proc(n) option remember; local t; a(n-1);
          t:= (l-> mul(ithprime(i)^l[i], i=1..nops(l)))(
               sort(map(i-> i[2], ifactors(n)[2]), `>`));
          p(t):= p(t)+1
        end: a(0):=0:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 31 2020
  • Mathematica
    prisig[n_]:=If[n==1,{},Sort[Last/@FactorInteger[n]]];
    Table[Count[Array[prisig,n],prisig[n]],{n,30}] (* Gus Wiseman, Jul 08 2019 *)

Extensions

More terms from Naohiro Nomoto, Oct 31 2001

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

A067003 Number of numbers <= n with same number of distinct prime factors as n.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Dec 21 2001

Keywords

Examples

			a(11)=8 since 2,3,4,5,7,8,9,11 each have one distinct prime factor. a(12)=3 since 6,10,12 each have two distinct prime factors.
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 distinct prime factors as n:
  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  7  8  6   9   10  11  12  14  13  16  15  17  18
           2  3     4  5  7      8   6   9   10  12  11  13  14  16  15
              2     3  4  5      7       8   6   10  9   11  12  13  14
                    2  3  4      5       7       6   8   9   10  11  12
                       2  3      4       5           7   8   6   9   10
                          2      3       4           5   7       8   6
                                 2       3           4   5       7
                                         2           3   4       5
                                                     2   3       4
                                                         2       3
                                                                 2
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeNu[#]==PrimeNu[n]&]],{n,100}] (* Gus Wiseman, Dec 28 2018 *)
  • PARI
    a(n) = my(nb = #factor(n)~); sum(k=1, n, #factor(k)~ == nb); \\ Michel Marcus, Jul 13 2019

Formula

a(A002110(n)) = 1.

A335097 Number of integers less than n with the same number of prime factors (counted with multiplicity) as n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Oct 31 2020

Keywords

Examples

			a(10) = 3 because bigomega(10) = 2 and also bigomega(4) = bigomega(6) = bigomega(9) = 2.
		

Crossrefs

Cf. A000079 (positions of 0's), A001222, A047983, A058933, A067004, A322838, A334655.

Programs

  • Maple
    A:= NULL:
    for n from 1 to 100 do
      t:= numtheory:-bigomega(n);
      if not assigned(R[t]) then
        A:= A,0;
        R[t]:= 1;
       else
        A:= A, R[t];
        R[t]:= R[t]+1;
       fi
    od:
    A; # Robert Israel, Oct 24 2021
  • Mathematica
    Table[Length[Select[Range[n - 1], PrimeOmega[#] == PrimeOmega[n] &]], {n, 80}]
  • PARI
    a(n)={my(t=bigomega(n)); sum(k=1, n-1, bigomega(k)==t)} \\ Andrew Howroyd, Oct 31 2020
    
  • Python
    from math import prod, isqrt
    from sympy import isprime, primepi, primerange, integer_nthroot, primeomega
    def A335097(n):
        if n==1: return 0
        if isprime(n): return primepi(n)-1
        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)))-1) # Chai Wah Wu, Aug 28 2024

Formula

a(n) = |{j < n : bigomega(j) = bigomega(n)}|.
a(n) = A058933(n) - 1.

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}]

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

A209934 a(n) is the first value to occur consecutively in the sequence b_n defined by p_2k(b_n(k)) = p_k(n)^2, k=1,2,3,..., where p_k(n) is the n-th k-almost prime.

Original entry on oeis.org

1, 3, 8, 12, 23, 26, 32, 66, 68, 78, 83, 106, 116, 169, 181, 201, 210, 216, 234, 273, 282, 296, 427, 436, 501, 504, 513, 538, 547, 583, 655, 688, 711, 738, 751, 851, 866, 947, 1065, 1088, 1155, 1274, 1277, 1285, 1350, 1369, 1389, 1456, 1594, 1615, 1702, 1734
Offset: 1

Views

Author

Daniel Tisdale, Mar 15 2012

Keywords

Comments

A k-almost prime has exactly k prime factors, repetitions included.
Conjecture: Each sequence b_n repeats indefinitely. (Example: for n=3, b_n = 9, 8, 8, 8, 8, 8, .... It looks like b_3(k) is 8 for all k > 1.)
The conjecture follows from the formula that uses A078843 below (and the strict monotonicity of A078843). However the first repeated value is not for every n the value that repeats indefinitely. For example a(8) = b_8(2) = b_8(3) = 66, but b_8(k) = 64 for k >= 4. - Peter Munn, Aug 05 2019

Examples

			for k = 1, 2, 3, 4, 5, 6, ...:
p_k(3) = 5, 9, 18, 36, 72, 144, ... (the 3rd k-almost prime);
p_k(3)^2 = 25, 81, 324, 1296, 5184, 20736, ...;
b_3(k) = 9, 8, 8, 8, 8, 8, ... (index in the 2k-almost primes);
so since b_3(3) = b_3(2) = 8, a(3) = 8.
		

Crossrefs

Programs

  • PARI
    get_p(m,k) = {local(i,n);i=0;n=1;while(iA209934(n) = {local(m,k,k_old);m=3;k_old=get_k(2,get_p(1,n)^2);k=get_k(4,get_p(2,n)^2);while(kMichael B. Porter, Mar 20 2012

Formula

From Peter Munn, Aug 05 2019: (Start)
b_n(k) = A058933(A078840(k,n)^2).
a(n) = b_n(min {k : b_n(k) = b_n(k+1)}).
If n < A078843(k+1) and b_n(k) < A078843(2k+1) then b_n(i) = b_n(k) for i >= k.
(End)

Extensions

Edited, correcting the subscripting, by Peter Munn, Aug 04 2019
Showing 1-10 of 13 results. Next