login
Search: a303554 -id:a303554
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of co-balanced factorizations of n.
+10
30
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 3, 1, 4, 1, 2, 1, 1, 1, 5, 1, 2, 2, 4, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 8
OFFSET
1,12
COMMENTS
We define a factorization of n into factors > 1 to be co-balanced if it has exactly A001221(n) factors.
LINKS
EXAMPLE
The a(n) co-balanced factorizations for n = 12, 24, 36, 72, 120, 144, 180:
2*6 3*8 4*9 8*9 3*5*8 2*72 4*5*9
3*4 4*6 6*6 2*36 4*5*6 3*48 5*6*6
2*12 2*18 3*24 2*2*30 4*36 2*2*45
3*12 4*18 2*3*20 6*24 2*3*30
6*12 2*4*15 8*18 2*5*18
2*5*12 9*16 2*6*15
2*6*10 12*12 2*9*10
3*4*10 3*3*20
3*4*15
3*5*12
3*6*10
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
Table[Length[Select[facs[n], Length[#]==PrimeNu[n]&]], {n, 100}]
PROG
(PARI) A340596(n, m=n, om=omega(n)) = if(1==n, (0==om), sumdiv(n, d, if((d>1)&&(d<=m), A340596(n/d, d, om-1)))); \\ Antti Karttunen, Jun 10 2024
CROSSREFS
Positions of terms > 1 are A126706.
Positions of 1's are A303554.
The version for unlabeled multiset partitions is A319616.
The alt-balanced version is A340599.
The balanced version is A340653.
The cross-balanced version is A340654.
The twice-balanced version is A340655.
A001055 counts factorizations.
A045778 counts strict factorizations.
A316439 counts factorizations by product and length.
Other balance-related sequences:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A098124 counts balanced compositions.
- A106529 lists Heinz numbers of balanced partitions.
- A340597 lists numbers with an alt-balanced factorization.
- A340598 counts balanced set partitions.
- A340600 counts unlabeled balanced multiset partitions.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 15 2021
EXTENSIONS
Data section extended up to a(120) by Antti Karttunen, Jun 10 2024
STATUS
approved
Number of cross-balanced factorizations of n.
+10
23
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 1, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 2, 1, 1, 1, 5, 1, 2, 2, 5, 1, 1, 1, 3, 1
OFFSET
1,12
COMMENTS
We define a factorization of n into factors > 1 to be cross-balanced if either (1) it is empty or (2) the maximum image of A001222 over the factors is A001221(n).
LINKS
EXAMPLE
The cross-balanced factorizations for n = 12, 24, 36, 72, 144, 240:
2*6 4*6 4*9 2*4*9 4*4*9 8*30
3*4 2*2*6 6*6 2*6*6 4*6*6 12*20
2*3*4 2*2*9 3*4*6 2*2*4*9 5*6*8
2*3*6 2*2*2*9 2*2*6*6 2*4*30
3*3*4 2*2*3*6 2*3*4*6 2*6*20
2*3*3*4 3*3*4*4 2*8*15
2*2*2*2*9 3*4*20
2*2*2*3*6 3*8*10
2*2*3*3*4 4*5*12
2*10*12
2*3*5*8
2*2*2*30
2*2*3*20
2*2*5*12
MATHEMATICA
facs[n_]:=If[n<=1, {{}}, Join@@Table[Map[Prepend[#, d]&, Select[facs[n/d], Min@@#>=d&]], {d, Rest[Divisors[n]]}]];
Table[Length[Select[facs[n], #=={}||PrimeNu[n]==Max[PrimeOmega/@#]&]], {n, 100}]
PROG
(PARI) A340654(n, m=n, om=omega(n), mbo=0) = if(1==n, (mbo==om), sumdiv(n, d, if((d>1)&&(d<=m), A340654(n/d, d, om, max(mbo, bigomega(d)))))); \\ Antti Karttunen, Jun 19 2024
CROSSREFS
Positions of terms > 1 are A126706.
Positions of 1's are A303554.
The co-balanced version is A340596.
The version for unlabeled multiset partitions is A340651.
The balanced version is A340653.
The twice-balanced version is A340655.
A001055 counts factorizations.
A045778 counts strict factorizations.
A316439 counts factorizations by product and length.
A320655 counts factorizations into semiprimes.
Other balance-related sequences:
- A010054 counts balanced strict partitions.
- A047993 counts balanced partitions.
- A098124 counts balanced compositions.
- A106529 lists Heinz numbers of balanced partitions.
- A340597 have an alt-balanced factorization.
- A340598 counts balanced set partitions.
- A340599 counts alt-balanced factorizations.
- A340652 counts unlabeled twice-balanced multiset partitions.
- A340656 have no twice-balanced factorizations.
- A340657 have a twice-balanced factorization.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 15 2021
EXTENSIONS
Data section extended up to a(105) by Antti Karttunen, Jun 19 2024
STATUS
approved
Number of (1,2,1) or (2,1,2)-matching permutations of the prime indices of n.
+10
21
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 3, 0, 1, 0, 1, 0, 2, 0, 2, 0, 0, 0, 6, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 8, 0, 0, 1, 1, 0, 0, 0, 3, 0, 0, 0, 6, 0, 0, 0
OFFSET
1,24
COMMENTS
Depends only on sorted prime signature (A118914).
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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).
EXAMPLE
The a(n) compositions for n = 12, 24, 48, 36, 60, 72:
(121) (1121) (11121) (1212) (1213) (11212)
(1211) (11211) (1221) (1231) (11221)
(12111) (2112) (1312) (12112)
(2121) (1321) (12121)
(2131) (12211)
(3121) (21112)
(21121)
(21211)
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
Table[Length[Select[Permutations[primeMS[n]], MatchQ[#, {___, x_, ___, y_, ___, x_, ___}/; x!=y]&]], {n, 100}]
CROSSREFS
Positions of zeros are A303554.
The (1,2,1)-matching part is A335446.
The (2,1,2)-matching part is A335453.
Replacing "or" with "and" gives A335462.
Permutations of prime indices are counted by A008480.
Unsorted prime signature is A124010. Sorted prime signature is A118914.
STC-numbers of permutations of prime indices are A333221.
(1,2,1) and (2,1,2)-avoiding permutations of prime indices are A333175.
Patterns matched by standard compositions are counted by A335454.
(1,2,1) and (2,1,2)-matching permutations of prime indices are A335462.
Dimensions of downsets of standard compositions are A335465.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 20 2020
STATUS
approved
The "rootless" zeta function. Dirichlet inverse of the function defined by r(n) = (-1)^Omega(n) if n is 1 or not a perfect power and r(n) = 0 otherwise.
+10
9
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 4, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 7, 1, 1, 2, 2, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 3, 1, 2, 2, 5, 1, 1, 1, 2, 1
OFFSET
1,12
COMMENTS
Omega(n) = A001222(n) is the number of prime factors of n counted with multiplicity.
First occurrence of k: 1, 12, 48, 60, 36, 3072, 72, 420, 240, 786432, 3145728, 144, 216, ..., . - Robert G. Wilson v, Jul 22 2018
Records: 1, 2, 5, 7, 12, 13, 15, 18, 26, 37, 38, 57, 60, 67, 81, 96, 142, 165, 199, 221, 234, ..., . - Robert G. Wilson v, Jul 22 2018
LINKS
FORMULA
a(1) = 1 and a(n > 1) = -Sum_{d|n, d not a perfect power} (-1)^Omega(d) * a(n/d).
MATHEMATICA
a[n_]:=a[n]=If[n==1, 1, -Sum[(-1)^PrimeOmega[d]*a[n/d], {d, Select[Rest[Divisors[n]], GCD@@FactorInteger[#][[All, 2]]==1&]}]];
Array[a, 100]
PROG
(PARI) A304779(n) = if(1==n, 1, -sumdiv(n, d, if((d>1)&&!ispower(d), ((-1)^bigomega(d))*A304779(n/d), 0))); \\ Antti Karttunen, Jul 22 2018
CROSSREFS
Positions of entries greater than 1 appear to be A126706.
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 18 2018
EXTENSIONS
More terms from Antti Karttunen, Jul 22 2018
STATUS
approved
The greatest number of runs possible in a permutation of the prime factors of n (A373957) minus the number of distinct such factors (A001221).
+10
7
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0
OFFSET
1,36
COMMENTS
If n has separable prime factors (A335433), then a(n) = A001222(n) - A001221(n) = A046660(n). A multiset is separable iff it has an anti-run permutation (meaning there are no adjacent equal parts).
FORMULA
a(n) = A373957(n) - A001221(n).
EXAMPLE
The runs of the 6 permutations of the prime factors of 36 are:
((2,2),(3,3))
((2),(3),(2),(3))
((2),(3,3),(2))
((3),(2,2),(3))
((3),(2),(3),(2))
((3,3),(2,2))
The longest length is 4, so a(36) = 4 - 2 = 2.
MATHEMATICA
prifacs[n_]:=If[n==1, {}, Flatten[ConstantArray@@@FactorInteger[n]]];
Table[Max@@Table[Length[Split[y]], {y, Permutations[prifacs[n]]}]-PrimeNu[n], {n, 100}]
CROSSREFS
Positions of first appearances appear to be A026549.
Positions of nonzero terms are A126706, complement A303554.
This is an opposite version of A373957.
The sister-sequence A374246 uses A001222 instead of A001221.
This is the number of nonzero terms in row n of A374252.
A003242 counts run-compressed compositions, i.e., anti-runs.
A008480 counts permutations of prime factors, by number of runs A374252.
A027746 lists prime factors, row-sums A001414.
A027748 is run-compression of prime factors, row-sums A008472.
A304038 is run-compression of prime indices, row-sums A066328.
A333755 counts compositions by number of runs.
A335433 lists separable numbers, complement A335448.
A374250 maximizes sum of run-compression, for indices A373956.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jul 07 2024
STATUS
approved
a(n) = A000005(n) - A008479(n).
+10
6
0, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 3, 1, 1, 3, 1, 4, 3, 3, 1, 4, 1, 3, 1, 4, 1, 7, 1, 1, 3, 3, 3, 4, 1, 3, 3, 5, 1, 7, 1, 4, 4, 3, 1, 4, 1, 2, 3, 4, 1, 1, 3, 5, 3, 3, 1, 10, 1, 3, 4, 1, 3, 7, 1, 4, 3, 7, 1, 4, 1, 3, 3, 4, 3, 7, 1, 5, 1, 3, 1, 10, 3, 3, 3
OFFSET
1,6
COMMENTS
A095960(50) = 3, a(50) = 2.
a(162) = -2 is the first negative term.
LINKS
FORMULA
a(n) = A095960(n) for n in A303554, i.e., for squarefree n or prime powers n.
a(n) = A095960(n) for n in A360767, i.e., for nonsquarefree composite n such that omega(n) > 1 and A003557(n) < A119288(n), since A008479(n) is the number of terms k in row n of A010846 such that k <= A003557(n).
a(n) = A183093(n) - A355432(n).
EXAMPLE
Table of a(n), b(n) = A000005(n), and c(n) = A008479(n) for n <= 12:
n b(n) c(n) a(n)
------------------
1 1 1 0
2 2 1 1
3 2 1 1
4 3 2 1
5 2 1 1
6 4 1 3
7 2 1 1
8 4 3 1
9 3 2 1
10 4 1 3
11 2 1 1
12 6 2 4
a(12) = 4 since 12 has 6 divisors {1, 2, 3, 4, 6, 12}, and row 12 of A369609 has 2 terms {6, 12}.
a(18) = 3 since 18 has 6 divisors {1, 2, 3, 6, 9, 18}, and row 18 of A369609 has 3 terms {6, 12, 18}.
a(50) = 2 since 50 has 6 divisors {1, 2, 5, 10, 25, 50}, and row 50 of A369609 has 4 terms {10, 20, 40, 50}
a(162) = -2 since 162 has 10 divisors {1,2,3,6,9,18,27,54,81,162} but row 162 of A369609 has 12 terms {6,12,18,24,36,48,54,72,96,108,144,162}.
a(500) = 0 since 500 has as many divisors {1,2,4,5,10,20,25,50,100,125,250,500} as terms in row 500 of A369609 {10,20,40,50,80,100,160,200,250,320,400,500}.
MATHEMATICA
rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]]; Table[r = rad[n]; DivisorSigma[0, n] - Count[Range[n/r], _?(Divisible[r, rad[#]] &)], {n, 120}]
PROG
(PARI) a(n) = my(f=factor(n)[, 1], s); forvec(v=vector(#f, i, [1, logint(n, f[i])]), if(prod(i=1, #f, f[i]^v[i])<=n, s++)); numdiv(n) - s; \\ after A008479 \\ Michel Marcus, Jun 03 2024
KEYWORD
sign
AUTHOR
Michael De Vlieger, May 13 2024
STATUS
approved
a(n) = (-1)^Omega(n) if n is not a perfect power > 1, and 0 otherwise.
+10
3
1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, -1, -1, 1, 1, 0, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 0, -1, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 0, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1
OFFSET
1
COMMENTS
Omega(n) = A001222(n) is the number of prime factors of n counted with multiplicity.
EXAMPLE
Agrees with Moebius function A008683 except for numbers like 12, 18, .... Moebius(12) = 0, a(12) = (-1)^3 = -1. - N. J. A. Sloane, May 26 2018
MATHEMATICA
Table[If[GCD @@ FactorInteger[n][[All, 2]] == 1, (-1)^PrimeOmega[n], 0], {n, 100}]
KEYWORD
sign
AUTHOR
Gus Wiseman, May 18 2018
STATUS
approved
Augmented integer conjugate of n. a(n) = (1/n) * A007947(n)^(1 + A051903(n)) where A007947 is squarefree kernel and A051903 is maximum prime exponent.
+10
2
1, 2, 3, 2, 5, 6, 7, 2, 3, 10, 11, 18, 13, 14, 15, 2, 17, 12, 19, 50, 21, 22, 23, 54, 5, 26, 3, 98, 29, 30, 31, 2, 33, 34, 35, 6, 37, 38, 39, 250, 41, 42, 43, 242, 75, 46, 47, 162, 7, 20, 51, 338, 53, 24, 55, 686, 57, 58, 59, 450, 61, 62, 147, 2, 65, 66, 67
OFFSET
1,2
COMMENTS
Image is the weak numbers A052485, on which n -> a(n) is an involution whose fixed points are the squarefree numbers A005117.
LINKS
FORMULA
If n = Product_{i = 1..k} prime(x_i)^y_i, then a(n) = Product_{i = 1..k} prime(x_i)^(max{y_1,...,y_k} - y_i + 1).
MATHEMATICA
acj[n_]:=Module[{f, m}, f=FactorInteger[n]; m=Max[Last/@f]; Times@@Table[p[[1]]^(m-p[[2]]+1), {p, f}]];
Array[acj, 100]
PROG
(PARI) a(n) = {if(n==1, 1, my(f = factor(n), e = vecmax(f[, 2]) + 1); prod(i = 1, #f~, f[i, 1]^e) / n); } \\ Amiram Eldar, Feb 12 2023
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 18 2018
STATUS
approved
Numbers that are either squarefree or a perfect power.
+10
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89
OFFSET
1,2
COMMENTS
First differs from A072774 at a(105) = 144, A072774(105) = 145.
Apparently the 1 and the members of A062770. - R. J. Mathar, May 22 2018
FORMULA
Union of A005117 and A001597. Complement of A303946.
MATHEMATICA
Select[Range[150], SquareFreeQ[#]||GCD@@FactorInteger[#][[All, 2]]>1&]
PROG
(PARI) isok(n) = issquarefree(n) || ispower(n); \\ Michel Marcus, May 13 2018
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A304449(n):
def f(x): return int(n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))+sum(mobius(k)*(integer_nthroot(x, k)[0]-1) for k in range(2, x.bit_length())))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 19 2024
KEYWORD
nonn
AUTHOR
Gus Wiseman, May 12 2018
STATUS
approved
Union of prime powers and numbers that are not squarefree.
+10
1
1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 31, 32, 36, 37, 40, 41, 43, 44, 45, 47, 48, 49, 50, 52, 53, 54, 56, 59, 60, 61, 63, 64, 67, 68, 71, 72, 73, 75, 76, 79, 80, 81, 83, 84, 88, 89, 90, 92, 96, 97, 98, 99, 100, 101, 103
OFFSET
1,2
COMMENTS
Numbers that are prime powers p^m, m >= 0, or products of multiple powers of distinct primes p^m where at least 1 prime power p^m is such that m > 1.
Let N = A000027. Analogous to the following sequences:
A002808 = N \ {{1} U A000040} = {1} U A024619 U A013929,
A085961 = N \ {{1} U A246547} = {A005117 U A024619} \ {1}.
LINKS
FORMULA
Complement of A120944, i.e., A000027 \ A120944.
Union of A000961 and A013929.
Union of {1}, A000040, A126706, and A246547.
EXAMPLE
1 is in the sequence because it is the empty product.
Prime p is in the sequence because it is not a composite squarefree number.
Numbers k that have prime power factors p^m | k where at least one prime power factor is such that m > 1 are in the sequence because they are not squarefree composites. Examples include 8, 9, 12, 20, and 36.
MATHEMATICA
Select[Range[103], Nand[SquareFreeQ[#], CompositeQ[#]] &]
PROG
(PARI) isok(k) = (k==1) || isprimepower(k) || !issquarefree(k); \\ Michel Marcus, Aug 24 2023
(Python)
from math import isqrt
from sympy import mobius, primepi
def A363597(n):
if n==1: return 1
def f(x): return n-1+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))-primepi(x)
m, k = n-1, f(n-1)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 02 2024
KEYWORD
nonn,easy
AUTHOR
Michael De Vlieger, Aug 15 2023
STATUS
approved

Search completed in 0.010 seconds