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

A334940 Partial sums of A230595.

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 3, 3, 4, 6, 6, 6, 6, 8, 10, 10, 10, 10, 10, 10, 12, 14, 14, 14, 15, 17, 17, 17, 17, 17, 17, 17, 19, 21, 23, 23, 23, 25, 27, 27, 27, 27, 27, 27, 27, 29, 29, 29, 30, 30, 32, 32, 32, 32, 34, 34, 36, 38, 38, 38, 38, 40, 40, 40, 42, 42, 42, 42, 44, 44, 44, 44, 44, 46
Offset: 1

Views

Author

Daniel Suteu, May 17 2020

Keywords

Comments

Sum of the Dirichlet convolution of the characteristic function of primes (A010051) with itself from 1 to n.
(a(n) + A000720(floor(sqrt(n))))/2 equals the number of semiprimes <= n.

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, 0, a(n-1) +
         `if`(numtheory[bigomega](n)=2, `if`(issqr(n), 1, 2), 0))
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, May 20 2020
  • Mathematica
    f[n_] := DivisorSum[n, 1 &, PrimeQ[#] && PrimeQ[n/#] &]; Accumulate @ Array[f, 100] (* Amiram Eldar, May 20 2020 *)
  • PARI
    a(n) = my(s=sqrtint(n)); 2*sum(k=1, s, if(isprime(k), primepi(n\k), 0)) - primepi(s)^2;
    
  • Python
    from math import isqrt
    from sympy import primepi, prime
    def A334940(n): return (int(sum(primepi(n//prime(k))-k+1 for k in range(1,primepi(isqrt(n))+1)))<<1) - primepi(isqrt(n)) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = Sum_{k=1..n} Sum_{d|k} A010051(d) * A010051(k/d).
a(n) = 2*Sum_{p prime <= sqrt(n)} A000720(floor(n/p)) - A000720(floor(sqrt(n)))^2.
a(n) = 2*A072000(n) - A000720(floor(sqrt(n))).
a(n) = 2*A072613(n) + A000720(floor(sqrt(n))). - Vaclav Kotesovec, May 21 2020
a(n) ~ 2*n*log(log(n))/log(n). - Vaclav Kotesovec, May 21 2020

A351982 Number of integer partitions of n into prime parts with prime multiplicities.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 2, 0, 0, 1, 3, 0, 1, 1, 3, 3, 3, 0, 1, 4, 5, 5, 3, 3, 5, 8, 5, 5, 6, 8, 8, 11, 7, 8, 10, 17, 14, 14, 12, 17, 17, 21, 18, 23, 20, 28, 27, 31, 27, 36, 32, 35, 37, 46, 41, 52, 45, 60, 58, 63, 59, 78, 71, 76, 81, 87, 80, 103, 107, 113, 114, 127
Offset: 0

Views

Author

Gus Wiseman, Mar 18 2022

Keywords

Examples

			The partitions for n = 4, 6, 10, 19, 20, 25:
  (22)  (33)   (55)     (55333)     (7733)       (55555)
        (222)  (3322)   (55522)     (77222)      (77722)
               (22222)  (3333322)   (553322)     (5533333)
                        (33322222)  (5522222)    (5553322)
                                    (332222222)  (55333222)
                                                 (55522222)
                                                 (333333322)
                                                 (3333322222)
		

Crossrefs

The version for just prime parts is A000607, ranked by A076610.
The version for just prime multiplicities is A055923, ranked by A056166.
For odd instead of prime we have A117958, ranked by A352142.
The constant case is A230595, ranked by A352519.
Allowing any multiplicity > 1 gives A339218, ranked by A352492.
These partitions are ranked by A346068.
The non-constant case is A352493, ranked by A352518.
A000040 lists the primes.
A001221 counts constant partitions of prime length, ranked by A053810.
A001694 lists powerful numbers, counted A007690, weak A052485.
A038499 counts partitions of prime length.
A101436 counts parts of prime signature that are themselves prime.
A112798 lists prime indices, reverse A296150, sum A056239.
A124010 gives prime signature, sorted A118914, sum A001222.
A257994 counts prime indices that are prime, nonprime A330944.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], And@@PrimeQ/@#&&And@@PrimeQ/@Length/@Split[#]&]],{n,0,30}]

A352492 Powerful numbers whose prime indices are all prime numbers.

Original entry on oeis.org

1, 9, 25, 27, 81, 121, 125, 225, 243, 289, 625, 675, 729, 961, 1089, 1125, 1331, 1681, 2025, 2187, 2601, 3025, 3125, 3267, 3375, 3481, 4489, 4913, 5625, 6075, 6561, 6889, 7225, 7803, 8649, 9801, 10125, 11881, 11979, 14641, 15125, 15129, 15625, 16129, 16875
Offset: 1

Views

Author

Gus Wiseman, Mar 24 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices (not prime factors) begin:
    1: {}
    9: {2,2}
   25: {3,3}
   27: {2,2,2}
   81: {2,2,2,2}
  121: {5,5}
  125: {3,3,3}
  225: {2,2,3,3}
  243: {2,2,2,2,2}
  289: {7,7}
  625: {3,3,3,3}
  675: {2,2,2,3,3}
  729: {2,2,2,2,2,2}
  961: {11,11}
For example, 675 = prime(2)^3 prime(3)^2 = 3^3 * 5^2.
		

Crossrefs

Powerful numbers are A001694, counted by A007690.
The version for prime exponents instead of indices is A056166, counted by A055923.
This is the powerful case of A076610 (products of A006450), counted by A000607.
The partitions with these Heinz numbers are counted by A339218.
A000040 lists primes.
A031368 lists primes of odd index, products A066208.
A101436 counts exponents in prime factorization that are themselves prime.
A112798 lists prime indices, reverse A296150, sum A056239.
A124010 gives prime signature, sorted A118914, length A001221, sum A001222.
A053810 lists all numbers p^q with p and q prime, counted by A230595.
A257994 counts prime indices that are themselves prime, complement A330944.

Programs

  • Mathematica
    Select[Range[1000],#==1||And@@PrimeQ/@PrimePi/@First/@FactorInteger[#]&&Min@@Last/@FactorInteger[#]>1&]

Formula

Intersection of A001694 and A076610.
Sum_{n>=1} 1/a(n) = Product_{p in A006450} (1 + 1/(p*(p-1))) = 1.24410463... - Amiram Eldar, May 04 2022

A230594 Number of ways to write n as n = x*y, where x, y = noncomposite numbers (A008578), 1 <= x <= n, 1 <= y <= n.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Oct 27 2013

Keywords

Comments

Dirichlet convolution of A080339(n) with itself, where A080339 = characteristic function of noncomposite numbers (A008578).
Dirichlet convolution of functions b(n) and c(n) is function a(n) = Sum_{d|n} b(d) * c(n/d).
a(n) = 0, 1 or 2. a(n) = 0 for numbers n from A033942 (numbers with least 3 prime factors (counted with multiplicity)); a(n) = 1 for n = p^2, p = prime; a(n) = 2 for numbers n from A167171 (A006881 union A000040).

Examples

			For n = 6: a(6) = Sum_(d|6) A080339(d) * A080339(6/d) = 1*0 + 1*1 + 1*1 + 0*1 = 2.
		

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} A080339(d) * A080339(n/d).

A352518 Numbers > 1 that are not a prime power and whose prime indices and exponents are all themselves prime numbers.

Original entry on oeis.org

225, 675, 1089, 1125, 2601, 3025, 3267, 3375, 6075, 7225, 7803, 8649, 11979, 15125, 15129, 24025, 25947, 27225, 28125, 29403, 30375, 31329, 33275, 34969, 35937, 36125, 40401, 42025, 44217, 45387, 54675, 62001, 65025, 70227, 81675, 84375, 87025, 93987
Offset: 1

Views

Author

Gus Wiseman, Mar 24 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices (not factors) begin:
     225: {2,2,3,3}
     675: {2,2,2,3,3}
    1089: {2,2,5,5}
    1125: {2,2,3,3,3}
    2601: {2,2,7,7}
    3025: {3,3,5,5}
    3267: {2,2,2,5,5}
    3375: {2,2,2,3,3,3}
    6075: {2,2,2,2,2,3,3}
    7225: {3,3,7,7}
    7803: {2,2,2,7,7}
    8649: {2,2,11,11}
   11979: {2,2,5,5,5}
   15125: {3,3,3,5,5}
   15129: {2,2,13,13}
   24025: {3,3,11,11}
   25947: {2,2,2,11,11}
   27225: {2,2,3,3,5,5}
   28125: {2,2,3,3,3,3,3}
For example, 7803 = prime(1)^3 prime(4)^2.
		

Crossrefs

These partitions are counted by A352493.
This is the restriction of A346068 to numbers that are not a prime power.
The prime-power version is A352519, counted by A230595.
A000040 lists the primes.
A000961 lists prime powers.
A001694 lists powerful numbers, counted by A007690.
A038499 counts partitions of prime length.
A053810 lists all numbers p^q for p and q prime, counted by A001221.
A056166 = prime exponents are all prime, counted by A055923.
A076610 = prime indices are all prime, counted by A000607, powerful A339218.
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, sum A056239.
A124010 gives prime signature, sorted A118914, sum A001222.
A257994 counts prime indices that are themselves prime, nonprime A330944.
A325131 = disjoint indices from exponents, counted by A114639.

Programs

  • Mathematica
    Select[Range[10000],!PrimePowerQ[#]&& And@@PrimeQ/@PrimePi/@First/@FactorInteger[#]&& And@@PrimeQ/@Last/@FactorInteger[#]&]

Formula

Sum_{n>=1} 1/a(n) = (Product_{p prime-indexed prime} (1 + Sum_{q prime} 1/p^q)) - (Sum_{p prime-indexed prime} Sum_{q prime} 1/p^q) - 1 = 0.0106862606... . - Amiram Eldar, Aug 04 2024

A352519 Numbers of the form prime(p)^q where p and q are primes. Prime powers whose prime index and exponent are both prime.

Original entry on oeis.org

9, 25, 27, 121, 125, 243, 289, 961, 1331, 1681, 2187, 3125, 3481, 4489, 4913, 6889, 11881, 16129, 24649, 29791, 32041, 36481, 44521, 58081, 68921, 76729, 78125, 80089, 109561, 124609, 134689, 160801, 161051, 177147, 185761, 205379, 212521, 259081, 299209
Offset: 1

Views

Author

Gus Wiseman, Mar 26 2022

Keywords

Comments

Alternatively, numbers of the form prime(prime(i))^prime(j) for some positive integers i, j.

Examples

			The terms together with their prime indices begin:
      9: {2,2}
     25: {3,3}
     27: {2,2,2}
    121: {5,5}
    125: {3,3,3}
    243: {2,2,2,2,2}
    289: {7,7}
    961: {11,11}
   1331: {5,5,5}
   1681: {13,13}
   2187: {2,2,2,2,2,2,2}
   3125: {3,3,3,3,3}
   3481: {17,17}
   4489: {19,19}
   4913: {7,7,7}
   6889: {23,23}
  11881: {29,29}
  16129: {31,31}
  24649: {37,37}
  29791: {11,11,11}
		

Crossrefs

Numbers of the form p^q for p and q prime are A053810, counted by A001221.
These partitions are counted by A230595.
This is the prime power case of A346068.
For numbers that are not a prime power we have A352518, counted by A352493.
A000040 lists the primes.
A000961 lists prime powers.
A001597 lists perfect powers.
A001694 lists powerful numbers, counted by A007690.
A056166 = prime exponents are all prime, counted by A055923.
A076610 = prime indices are all prime, counted by A000607, powerful A339218.
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, sum A056239.
A124010 gives prime signature, sorted A118914, sum A001222.
A164336 lists all possible power-towers of prime numbers.
A257994 counts prime indices that are themselves prime, nonprime A330944.
A325131 = disjoint indices from exponents, counted by A114639.

Programs

  • Maple
    N:= 10^7: # for terms <= N
    M:=numtheory:-pi(numtheory:-pi(isqrt(N))):
    PP:= {seq(ithprime(ithprime(i)),i=1..M)}:
    R:= NULL:
    for p in PP do
      q:= 1:
      do
        q:= nextprime(q);
        t:= p^q;
        if t > N then break fi;
        R:= R, t;
      od;
    od:
    sort([R]); # Robert Israel, Dec 08 2022
  • Mathematica
    Select[Range[10000],PrimePowerQ[#]&&MatchQ[FactorInteger[#],{{?(PrimeQ[PrimePi[#]]&),k?PrimeQ}}]&]
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A352519(n):
        def f(x): return int(n+x-sum(primepi(primepi(integer_nthroot(x,p)[0])) for p in primerange(x.bit_length())))
        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,n,n) # Chai Wah Wu, Sep 12 2024

A352493 Number of non-constant integer partitions of n into prime parts with prime multiplicities.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 3, 0, 1, 4, 5, 3, 1, 3, 5, 7, 3, 5, 6, 8, 8, 11, 7, 6, 8, 15, 14, 14, 10, 15, 17, 21, 18, 23, 20, 28, 25, 31, 27, 35, 32, 33, 37, 46, 41, 50, 45, 58, 56, 63, 59, 78, 69, 76, 81, 85, 80, 103, 107, 111, 114, 127
Offset: 0

Views

Author

Gus Wiseman, Mar 24 2022

Keywords

Examples

			The a(n) partitions for selected n (B = 11):
n = 10    16       19        20         25          28
   ---------------------------------------------------------------
    3322  5533     55333     7733       77722       BB33
          55222    55522     77222      5533333     BB222
          3322222  3333322   553322     5553322     775522
                   33322222  5522222    55333222    55533322
                             332222222  55522222    772222222
                                        333333322   3322222222222
                                        3333322222
		

Crossrefs

Constant partitions are counted by A001221, ranked by A000961.
Non-constant partitions are counted by A144300, ranked A024619.
The constant version is A230595, ranked by A352519.
This is the non-constant case of A351982, ranked by A346068.
These partitions are ranked by A352518.
A000040 lists the primes.
A000607 counts partitions into primes, ranked by A076610.
A001597 lists perfect powers, complement A007916.
A038499 counts partitions of prime length.
A053810 lists primes to primes.
A055923 counts partitions with prime multiplicities, ranked by A056166.
A257994 counts prime indices that are themselves prime.
A339218 counts powerful partitions into prime parts, ranked by A352492.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n], !SameQ@@#&&And@@PrimeQ/@#&& And@@PrimeQ/@Length/@Split[#]&]],{n,0,30}]
Showing 1-7 of 7 results.