Displaying 1-10 of 18 results found.
1, -2, -2, 2, -2, 5, -2, -2, 2, 5, -2, -7, -2, 5, 5, 2, -2, -7, -2, -7, 5, 5, -2, 9, 2, 5, -2, -7, -2, -16, -2, -2, 5, 5, 5, 14, -2, 5, 5, 9, -2, -16, -2, -7, -7, 5, -2, -11, 2, -7, 5, -7, -2, 9, 5, 9, 5, 5, -2, 30, -2, 5, -7, 2, 5, -16, -2, -7, 5, -16, -2, -23, -2, 5, -7, -7, 5, -16, -2, -11, 2, 5, -2, 30, 5, 5, 5, 9, -2, 30, 5
COMMENTS
The Dirichlet inverse function, a(n) = (omega + 1)^(-1)(n). - Original name.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = -DivisorSum[n, (PrimeNu[n/#] + 1)*a[#] &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 21 2022 *)
PROG
(PARI) cOmega(n) = if (n==1, 1, my(f=factor(n)); bigomega(n)!*prod(k=1, #f~, 1/f[k, 2]!)); \\ A008480
a(n) = (-1)^bigomega(n)*sumdiv(n, d, moebius(n/d)^2*cOmega(d));
(PARI)
memoA341444 = Map();
A341444(n) = if(1==n, 1, my(v); if(mapisdefined(memoA341444, n, &v), v, v = -sumdiv(n, d, if(d<n, (1+omega(n/d))* A341444(d), 0)); mapput(memoA341444, n, v); (v))); \\ Antti Karttunen, Jul 21 2022~
EXTENSIONS
Data section extended up to a(91) and name edited by Antti Karttunen, Jul 21 2022
Numbers that are the product of exactly three (not necessarily distinct) primes.
+10
294
8, 12, 18, 20, 27, 28, 30, 42, 44, 45, 50, 52, 63, 66, 68, 70, 75, 76, 78, 92, 98, 99, 102, 105, 110, 114, 116, 117, 124, 125, 130, 138, 147, 148, 153, 154, 164, 165, 170, 171, 172, 174, 175, 182, 186, 188, 190, 195, 207, 212, 222, 230, 231, 236, 238, 242, 244
COMMENTS
Sometimes called "triprimes" or "3-almost primes".
See also A001358 for product of two primes (sometimes called semiprimes).
If you graph a(n)/n for n up to 10000 (and probably quite a bit higher), it appears to be converging to something near 3.9. In fact the limit is infinite. - Franklin T. Adams-Watters, Sep 20 2006
Meng shows that for any sufficiently large odd integer n, the equation n = a + b + c has solutions where each of a, b, c is 3-almost prime. The number of such solutions is (log log n)^6/(16 (log n)^3)*n^2*s(n)*(1 + O(1/log log n)), where s(n) = Sum_{q >= 1} Sum_{a = 1..q, (a, q) = 1} exp(i*2*Pi*n*a/q)*mu(n)/phi(n)^3 > 1/2. - Jonathan Vos Post, Sep 16 2005, corrected & rewritten by M. F. Hasler, Apr 24 2019
Also, a(n) are the numbers such that exactly half of their divisors are composite. For the numbers in which exactly half of the divisors are prime, see A167171. - Ivan Neretin, Jan 12 2016
REFERENCES
Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition : Chelsea, New York (1974). See p. 211.
LINKS
Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1 and vol. 2, Leipzig, Berlin, B. G. Teubner, 1909. See Vol. 1, p. 211.
FORMULA
Product p_i^e_i with Sum e_i = 3.
a(n) ~ 2n log n / (log log n)^2 as n -> infinity [Landau, p. 211].
EXAMPLE
Also Heinz numbers of integer partitions into three parts, counted by A001399(n-3) = A069905(n) with ordered version A000217, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). The sequence of terms together with their prime indices begins:
8: {1,1,1} 70: {1,3,4} 130: {1,3,6}
12: {1,1,2} 75: {2,3,3} 138: {1,2,9}
18: {1,2,2} 76: {1,1,8} 147: {2,4,4}
20: {1,1,3} 78: {1,2,6} 148: {1,1,12}
27: {2,2,2} 92: {1,1,9} 153: {2,2,7}
28: {1,1,4} 98: {1,4,4} 154: {1,4,5}
30: {1,2,3} 99: {2,2,5} 164: {1,1,13}
42: {1,2,4} 102: {1,2,7} 165: {2,3,5}
44: {1,1,5} 105: {2,3,4} 170: {1,3,7}
45: {2,2,3} 110: {1,3,5} 171: {2,2,8}
50: {1,3,3} 114: {1,2,8} 172: {1,1,14}
52: {1,1,6} 116: {1,1,10} 174: {1,2,10}
63: {2,2,4} 117: {2,2,6} 175: {3,3,4}
66: {1,2,5} 124: {1,1,11} 182: {1,4,6}
68: {1,1,7} 125: {3,3,3} 186: {1,2,11}
(End)
MATHEMATICA
threeAlmostPrimeQ[n_] := Plus @@ Last /@ FactorInteger@n == 3; Select[ Range@244, threeAlmostPrimeQ[ # ] &] (* Robert G. Wilson v, Jan 04 2006 *)
NextkAlmostPrime[n_, k_: 2, m_: 1] := Block[{c = 0, sgn = Sign[m]}, kap = n + sgn; While[c < Abs[m], While[ PrimeOmega[kap] != k, If[sgn < 0, kap--, kap++]]; If[ sgn < 0, kap--, kap++]; c++]; kap + If[sgn < 0, 1, -1]]; NestList[NextkAlmostPrime[#, 3] &, 2^3, 56] (* Robert G. Wilson v, Jan 27 2013 *)
Select[Range[244], PrimeOmega[#] == 3 &] (* Jayanta Basu, Jul 01 2013 *)
PROG
(PARI) list(lim)=my(v=List(), t); forprime(p=2, lim\4, forprime(q=2, min(lim\(2*p), p), t=p*q; forprime(r=2, min(lim\t, q), listput(v, t*r)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jan 04 2013
(Haskell) a014612 n = a014612_list !! (n-1)
(Scala) def primeFactors(number: Int, list: List[Int] = List())
: List[Int] = {
for (n <- 2 to number if (number % n == 0)) {
return primeFactors(number / n, list :+ n)
}
list
}
(1 to 250).filter(primeFactors(_).size == 3) // Alonso del Arte, Nov 04 2020, based on algorithm by Victor Farcic (vfarcic)
(Python)
from sympy import factorint
def ok(n): f = factorint(n); return sum(f[p] for p in f) == 3
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot
def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a, k in enumerate(primerange(integer_nthroot(x, 3)[0]+1)) for b, m in enumerate(primerange(k, isqrt(x//k)+1), a)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
CROSSREFS
Cf. A109251 (number of 3-almost primes <= 10^n).
Cf. A007304 is the squarefree case.
Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), this sequence (r = 3), A014613 (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - Jason Kimberley, Oct 02 2011
A014311 is a different ranking of ordered triples, with strict case A337453.
Expansion of Product_{k > 0} 1/(1 + x^prime(k)).
+10
14
1, 0, -1, -1, 1, 0, 0, -1, 1, 0, 1, -2, 1, -1, 2, -2, 2, -3, 3, -3, 4, -4, 5, -6, 6, -6, 8, -9, 9, -11, 12, -13, 14, -16, 19, -19, 21, -25, 26, -28, 32, -36, 38, -41, 46, -50, 55, -60, 65, -70, 77, -85, 91, -99, 108, -116, 126, -138, 149, -160, 174, -188, 202, -219, 237, -255, 274, -296
MATHEMATICA
nn=20;
ser=Product[1/(1+x^p), {p, Select[Range[nn], PrimeQ]}];
Table[SeriesCoefficient[ser, {x, 0, n}], {n, nn}] (* Gus Wiseman, Jun 06 2018 *)
Expansion of Sum_{p prime} x^p/(1 + x^p).
+10
14
0, 0, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 2, -1, 1, 0, 1, -2, 2, 0, 1, -2, 1, 0, 1, -2, 1, -1, 1, -1, 2, 0, 2, -2, 1, 0, 2, -2, 1, -1, 1, -2, 2, 0, 1, -2, 1, 0, 2, -2, 1, 0, 2, -2, 2, 0, 1, -3, 1, 0, 2, -1, 2, -1, 1, -2, 2, -1, 1, -2, 1, 0, 2, -2, 2, -1
COMMENTS
a(n) is the number of prime divisors p|n such that n/p is odd, minus the number of prime divisors p|n such that n/p is even.
FORMULA
a(n) = -Sum_{p|n prime} (-1)^(n/p).
If n == 2 (mod 4), a(n) = 2 - A001221(n).
If n == 0 (mod 4) and n > 0, a(n) = - A001221(n). (End)
L.g.f.: log(Product_{k>=1} (1 + x^prime(k))^(1/prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
EXAMPLE
The prime divisors of 12 are 2, 3. We see that 12/2 = 6, 12/3 = 4. None of those are odd, but both of them are even, so a(12) = -2.
The prime divisors of 30 are {2,3,5} with quotients {15,10,6}. One of these is odd and two are even, so a(30) = 1 - 2 = -1.
MAPLE
a:= n-> -add((-1)^(n/i[1]), i=ifactors(n)[2]):
# Alternative
N:= 1000: # to get a(0)..a(N)
V:= Vector(N):
p:= 1:
do
p:= nextprime(p);
if p > N then break fi;
R:= [seq(i, i=p..N, p)];
W:= <seq((-1)^(n+1), n=1..nops(R))>;
V[R]:= V[R]+W;
od:
MATHEMATICA
Table[Sum[If[PrimeQ[d], (-1)^(n/d - 1), 0], {d, Divisors[n]}], {n, 30}]
Number of composite divisors of n.
+10
10
0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 3, 0, 3, 0, 3, 1, 1, 0, 5, 1, 1, 2, 3, 0, 4, 0, 4, 1, 1, 1, 6, 0, 1, 1, 5, 0, 4, 0, 3, 3, 1, 0, 7, 1, 3, 1, 3, 0, 5, 1, 5, 1, 1, 0, 8, 0, 1, 3, 5, 1, 4, 0, 3, 1, 4, 0, 9, 0, 1, 3, 3, 1, 4, 0, 7, 3, 1, 0, 8, 1, 1, 1, 5, 0, 8, 1, 3, 1, 1, 1, 9, 0, 3, 3, 6, 0, 4, 0, 5, 4
COMMENTS
Trivially, there is only one run of three consecutive 0's. However, there are infinitely many runs of three consecutive 1's and they are at positions A056809(n), A086005(n), and A115393(n) for n >= 1. - Timothy L. Tiffin, Jun 21 2021
FORMULA
G.f.: -x/(1 - x) + Sum_{k>=1} (x^k - x^prime(k))/((1 - x^k)*(1 - x^prime(k))). - Ilya Gutkovskiy, Mar 21 2017
Sum_{k=1..n} a(k) ~ n*log(n) - n*log(log(n)) + (2*gamma - 2 - B)*n, where gamma is Euler's constant ( A001620) and B is Mertens's constant ( A077761). - Amiram Eldar, Dec 07 2023
EXAMPLE
a[20] = 3 because the composite divisors of 20 are 4, 10, 20.
MATHEMATICA
Table[ Count[ PrimeQ[ Divisors[n] ], False] - 1, {n, 1, 105} ]
Table[Count[Divisors[n], _?CompositeQ], {n, 120}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 09 2018 *)
a[n_] := DivisorSigma[0, n] - PrimeNu[n] - 1; Array[a, 100] (* Amiram Eldar, Jun 18 2022 *)
PROG
(Haskell)
(PARI) a(n) = numdiv(n) - omega(n) - 1; \\ Michel Marcus, Oct 17 2015
Number of residues modulo n of the maximum order.
+10
10
1, 1, 1, 1, 2, 1, 2, 3, 2, 2, 4, 3, 4, 2, 4, 4, 8, 2, 6, 4, 6, 4, 10, 7, 8, 4, 6, 6, 12, 4, 8, 8, 12, 8, 8, 6, 12, 6, 8, 8, 16, 6, 12, 12, 8, 10, 22, 8, 12, 8, 16, 8, 24, 6, 16, 14, 18, 12, 28, 8, 16, 8, 24, 16, 24, 12, 20, 16, 30, 8, 24, 14, 24, 12, 16, 18, 24, 8, 24, 24, 18, 16, 40, 14, 32, 12
COMMENTS
The maximum order modulo n is given by A002322(n).
a(n) is the number of primitive lambda-roots of n. - Michel Marcus, Mar 17 2016
A primitive lambda-root is an element of maximal order modulo n. - Joerg Arndt, Mar 19 2016
a(n) is odd if and only if n is a factor of 24, i.e., n is in A018253. - Jianing Song, Apr 27 2019
FORMULA
Decompose (Z/nZ)* as a product of cyclic groups C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j, then a(n) = Sum_{d divides psi(n)} (mu(psi(n)/d)*Product{i=1..m} gcd(d, k_i)). This is an immediate corollary from the fact that the number of elements in (Z/nZ)* such that x^d == 1 (mod n) is Product{i=1..m} gcd(d, k_i). Here (Z/nZ)* is the multiplicative group of integers modulo n, psi(n) = A002322(n) and mu(n) = A008683(n). - Jianing Song, Apr 27 2019
Decompose (Z/nZ)* as a product of cyclic groups C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j, then a(n) = phi(n) * Product_{p prime dividing phi(n)} (1 - 1/p^r(p)), where r(p) is the number of j such that v(k_j,p) = v(k_m,p), v(s,p) is the p-adic valuation of s.
Proof: let G = (Z/nZ)*, G_p be the Sylow p-subgroup of G, then G = Product_{p prime dividing phi(n)} G_p: every element x can be uniquely written as Product_{p prime dividing phi(n)} x_p for x_p in G_p. Let ord(x) be the order of x. Since ord(x_p, x_p') = 1 for distinct p and p', we have ord(x) = Product_{p prime dividing phi(n)} ord(x_p), hence x is of maximal order if and only if each x_p is of maximal order in G_p.
Each G_p is isomorphic to C_{p^(e_1)} x C_{p^(e_2)} x ... x C_{p^(e_m)} for e_1 <= e_2 <= ... <= e_m, e_m > 0. Write x_p = (x_{p,1}, x_{p,2}, ..., x_{p,m}). Suppose that e_m = e_{m-1} = ... = e_{m-r+1} > e_{m-r}, then x_p is of maximal order in G_p if and only of x_{p,j} is of order p^(e_m) for some m-r+1 <= j <= m, so the number of such x_p is p^(e_1) * p^(e_2) * ... * p^(e_{m-r}) * (p^(r*e_m) - p^(r*((e_m)-1))) = |G_p| * (1 - 1/p^r).
An example: n = 15903, then (Z/nZ)* = C_6 x C_18 x C_90. We can see that r(2) = 3, r(3) = 2 and r(5) = 1, so a(15903) = phi(15903) * (1 - 1/2^3) * (1 - 1/3^2) * (1 - 1/5^1) = 6048.
It should be clear that a(n) = phi(phi(n)) if and only if r(p) = 1 for every prime p dividing phi(n), or v(k_{m-1},p) < v(k_m,p) for every prime p dividing phi(n). Otherwise, a(n) > phi(phi(n)). (End)
MAPLE
LiDelta := proc(q, n)
local a, p, e, lam, v ;
a := 0 ;
lam := numtheory[lambda](n) ;
for p in numtheory[factorset](n) do
e := padic[ordp](n, p) ;
if p =2 and e= 3 and q =2 and padic[ordp](lam, q) = 1 then
elif isprime(q) then
v := padic[ordp](lam, q) ;
if modp( numtheory[lambda](p^e), q^v) = 0 then
a := a+1 ;
end if;
end if:
end do:
a ;
end proc:
local a, q ;
a := 1;
for q in numtheory[factorset](numtheory[lambda](n)) do
a := a*(1-1/q^LiDelta(q, n)) ;
end do:
a*numtheory[phi](n) ;
end proc:
MATHEMATICA
f[list_]:=Count[list, Max[list]]; Map[f, Table[Table[MultiplicativeOrder[k, n], {k, Select[Range[n], GCD[#, n]==1&]}], {n, 1, 100}]] (* Geoffrey Critzer, Jan 26 2013 *)
PROG
(PARI) { a(n) = my(r, c, r1); r=1; c=0; for(k=0, n-1, if(gcd(k, n)!=1, next); r1=znorder(Mod(k, n)); if(r1==r, c++); if(r1>r, r=r1; c=1) ); c; }
(PARI) { A111725(n) = if(n<3, return(1)); my(k, p); k=znstar(n)[2]; p=factor(k[1])[, 1]; eulerphi(n) * prod(i=1, #p, (1-1/p[i]^vecsum(apply(x->valuation(k[1]\x, p[i])==0, k))) ); } \\ Max Alekseyev, Oct 23 2021
1, 2, 2, 2, 2, 6, 2, 2, 2, 6, 2, 6, 2, 6, 6, 2, 2, 6, 2, 6, 6, 6, 2, 6, 2, 6, 2, 6, 2, 30, 2, 2, 6, 6, 6, 6, 2, 6, 6, 6, 2, 30, 2, 6, 6, 6, 2, 6, 2, 6, 6, 6, 2, 6, 6, 6, 6, 6, 2, 30, 2, 6, 6, 2, 6, 30, 2, 6, 6, 30, 2, 6, 2, 6, 6, 6, 6, 30, 2, 6, 2, 6, 2, 30, 6, 6, 6, 6, 2, 30, 6, 6, 6, 6, 6, 6, 2, 6, 6, 6, 2, 30, 2, 6, 30
COMMENTS
The connection with binary tree A005940 is explained by the fact that on a trajectory from its root (1) to any number n, the numbers of the form 4k+2 will never occur consecutively (they are only born as right children of odd numbers, while all their right descendants from then onward are multiples of four). Thus all the runs are separate runs of length one, from which follows that A278222 when applied to A292382 yields only primorials. Moreover, the steps producing 4k+2 numbers are also only steps in A005940 that add new distinct prime factors to the generated number. Thus the total number of such steps is equal to the number of distinct prime factors of the eventual n. Hence A278222( A292382(n)) = A002110( A001221(n)).
PROG
(PARI) A292586(n) = prod(i=1, omega(n), prime(i));
(Scheme)
CROSSREFS
Cf. A083399 (restricted growth transform of this sequence).
Restricted growth sequence transform of A292589(n); filter based on the prime signature of {n divided by largest squarefree divisor of n}.
+10
6
1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 5, 1, 1, 1, 6, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 2, 1, 1, 2, 7, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 5, 1, 2, 2, 6, 1, 1, 1, 3, 1, 1, 1, 8, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 3
COMMENTS
Also a restricted growth sequence transform of A278222( A292380(n)): a filter constructed from the runlengths of multiples of 4 encountered in trajectories of A005940-tree.
PROG
(PARI)
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
write_to_bfile(start_offset, vec, bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ This function from Charles R Greathouse IV, Aug 17 2011
write_to_bfile(1, rgs_transform(vector(16384, n, A046523( A003557(n)))), "b292582.txt");
CROSSREFS
Cf. A003557, A005940, A046523, A083399, A278222, A292380, A292583, A292585, A292586, A292587, A292589.
Number of distinct possible alternating sums of permutations of the multiset of prime indices of n.
+10
6
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 4, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 4, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3
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.
The alternating sum of a sequence (y_1,...,y_k) is Sum_i (-1)^(i-1) y_i. Of course, the alternating sum of prime indices is also the reverse-alternating sum of reversed prime indices.
Also the number of possible values of A056239(d) where d is a divisor of n with half as many prime factors (rounded up) as n.
EXAMPLE
Grouping the 12 permutations of {1,2,2,3} by alternating sum k gives:
k = -2: (1223) (1322) (2213) (2312)
k = 0: (1232) (2123) (2321) (3212)
k = 2: (2132) (2231) (3122) (3221)
so a(90) = 3.
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
ats[y_]:=Sum[(-1)^(i-1)*y[[i]], {i, Length[y]}];
Table[Length[Union[ats/@Permutations[primeMS[n]]]], {n, 100}]
PROG
(Python)
from sympy import factorint, primepi
from sympy.utilities.iterables import multiset_combinations
fs = dict((primepi(a), b) for (a, b) in factorint(n).items())
return len(set(sum(d) for d in multiset_combinations(fs, (sum(fs.values())+1)//2))) # Chai Wah Wu, Aug 23 2021
CROSSREFS
The version for prime factors instead of indices is A343943.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A097805 counts compositions by alternating (or reverse-alternating) sum.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A316524 gives the alternating sum of prime indices (reverse: A344616).
A345197 counts compositions by length and alternating sum.
A344610 counts partitions by sum and positive reverse-alternating sum.
Cf. A008549, A032443, A083399, A096825, A239830, A344607, A344609, A344651, A345957, A345960, A345961.
Number of even semiprimes dividing n.
+10
5
0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 2, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 2, 0, 2, 0
COMMENTS
Also the number of prime divisors p|n such that n/p is even. - Gus Wiseman, Jun 06 2018
FORMULA
a(n) = card { d | d*p = n, d even, p prime }. - Peter Luschny, Jan 30 2012
O.g.f.: Sum_{p prime} x^(2p)/(1 - x^(2p)). - Gus Wiseman, Jun 06 2018
EXAMPLE
a(60) = #{4, 6, 10} = #{2*2, 2*3, 2*5} = 3.
MATHEMATICA
Table[Length[Select[Divisors[n], PrimeQ[#]&&EvenQ[n/#]&]], {n, 100}] (* Gus Wiseman, Jun 06 2018 *)
Table[Count[Divisors[n], _?(EvenQ[#]&&PrimeOmega[#]==2&)], {n, 110}] (* Harvey P. Dale, May 04 2021 *)
a[n_] := If[EvenQ[n], PrimeNu[n/2], 0]; Array[a, 100] (* Amiram Eldar, Jun 26 2022 *)
PROG
(Sage)
return add(1-(n/d)%2 for d in divisors(n) if is_prime(d))
print([ A106404(n) for n in (1..105)]) # Peter Luschny, Jan 30 2012
(Haskell)
a106404 n = length [d | d <- takeWhile (<= n) a100484_list, mod n d == 0]
Search completed in 0.011 seconds
|