[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A230595 Number of ways to write n as n = x*y, where x and y are primes, 1 <= x <= n, 1 <= y <= n. 8
0, 0, 0, 1, 0, 2, 0, 0, 1, 2, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
COMMENTS
Dirichlet convolution of A010051(n) with itself, where A010051 = characteristic function of primes (A000040).
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 A100959 (non-semiprimes); a(n) = 1 for n = p^2, p = prime; a(n) = 2 for numbers n from A006881 (product of two distinct primes).
LINKS
FORMULA
a(n) = Sum_(d|n) A010051(d) * A010051(n/d).
Dirichlet g.f.: primezeta(s)^2. - Benedict W. J. Irwin, Jul 11 2018
EXAMPLE
For n = 6: a(6) = Sum_(d|6) A010051(d) * A010051(6/d) = 0*0 + 1*1 + 1*1 + 1*0 = 2.
MATHEMATICA
Table[Total@ Map[Times @@ Boole@ {PrimeQ@ #, PrimeQ[n/#]} &, FactorInteger[n][[All, 1]]], {n, 95}] (* Michael De Vlieger, Jul 29 2017 *)
PROG
(PARI) a(n)=sumdiv(n, d, isprime(d)*isprime(n/d)) \\ Ralf Stephan, Oct 30 2013
(PARI) a(n) = my(f=factor(f)); (vecsum(f[, 2])==2) * #f~ \\ David A. Corneth, Jul 28 2017
(PARI) first(n) = my(v = vector(n)); forprime(p = 2, sqrtint(n), v[p^2] = 1; forprime(q = p + 1, n \ p, v[p*q] = 2)); v \\ David A. Corneth, Jul 28 2017
(Python)
from sympy import factorint
def A230595(n): return 0 if sum(f:=factorint(n).values())!=2 else len(f) # Chai Wah Wu, Jul 23 2024
CROSSREFS
Sequence in context: A363665 A308183 A346632 * A345957 A325189 A357637
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Oct 27 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 04:38 EDT 2024. Contains 375526 sequences. (Running on oeis4.)