A034729
a(n) = Sum_{ k, k|n } 2^(k-1).
Original entry on oeis.org
1, 3, 5, 11, 17, 39, 65, 139, 261, 531, 1025, 2095, 4097, 8259, 16405, 32907, 65537, 131367, 262145, 524827, 1048645, 2098179, 4194305, 8390831, 16777233, 33558531, 67109125, 134225995, 268435457, 536887863, 1073741825, 2147516555, 4294968325, 8590000131
Offset: 1
From _Gus Wiseman_, Sep 16 2018: (Start)
The a(4) = 11 constant multiset partitions:
(1)(1)(1)(1)
(11)(11)
(12)(12)
(1111)
(1222)
(1122)
(1112)
(1233)
(1223)
(1123)
(1234)
(End)
-
A034729:= func< n | (&+[2^(d-1): d in Divisors(n)]) >;
[A034729(n): n in [1..40]]; // G. C. Greubel, Jun 26 2024
-
seq(add(2^(k-1),k=numtheory:-divisors(n)), n = 1 .. 100); # Robert Israel, Aug 22 2014
-
Rest[CoefficientList[Series[Sum[x^k/(1-2*x^k),{k,1,30}],{x,0,30}],x]] (* Vaclav Kotesovec, Sep 08 2014 *)
-
A034729(n) = sumdiv(n,k,2^(k-1)) \\ Michael B. Porter, Mar 11 2010
-
{a(n)=polcoeff(sum(m=1,n,2^(m-1)*x^m/(1-x^m +x*O(x^n))),n)}
for(n=1,40,print1(a(n),", ")) \\ Paul D. Hanna, Aug 21 2014
-
{a(n)=local(A=x+x^2);A=sum(m=1,n,x^m*sumdiv(m,d,1/(1 - x^(m/d) +x*O(x^n))^d) );polcoeff(A,n)}
for(n=1,40,print1(a(n),", ")) \\ Paul D. Hanna, Aug 21 2014
-
from sympy import divisors
def A034729(n): return sum(1<<(d-1) for d in divisors(n,generator=True)) # Chai Wah Wu, Jul 15 2022
-
def A034729(n): return sum(2^(k-1) for k in (1..n) if (k).divides(n))
[A034729(n) for n in range(1,41)] # G. C. Greubel, Jun 26 2024
A319193
Irregular triangle where T(n,k) is the number of permutations of the integer partition with Heinz number A215366(n,k).
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 2, 2, 3, 3, 4, 1, 1, 2, 2, 1, 1, 3, 6, 6, 4, 5, 1, 1, 2, 2, 2, 6, 3, 3, 3, 4, 4, 12, 10, 5, 6, 1, 1, 2, 2, 1, 3, 2, 3, 6, 6, 3, 1, 12, 4, 12, 6, 10, 5, 20, 15, 6, 7, 1, 1, 2, 2, 2, 3, 2, 6, 3, 3, 4, 6, 6, 1, 12, 12, 4, 12
Offset: 0
Triangle begins:
1
1
1 1
1 2 1
1 1 2 3 1
1 2 2 3 3 4 1
1 2 2 1 1 3 6 6 4 5 1
The fourth row corresponds to the symmetric function identity: h(4) = -e(4) + e(22) + 2 e(31) - 3 e(211) + e(1111).
A different row ordering is
A072811.
-
b:= proc(n, i) option remember; `if`(n=0 or i<2, [2^n], [seq(
map(p-> p*ithprime(i)^j, b(n-i*j, i-1))[], j=0..n/i)])
end:
T:= n-> map(m-> (l-> add(i, i=l)!/mul(i!, i=l))(map(
i-> i[2], ifactors(m)[2])), sort(b(n$2)))[]:
seq(T(n), n=0..10); # Alois P. Heinz, Feb 14 2020
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Table[Length[Permutations[primeMS[k]]],{n,6},{k,Sort[Times@@Prime/@#&/@IntegerPartitions[n]]}]
(* Second program: *)
b[n_, i_] := b[n, i] = If[n == 0 || i < 2, {2^n}, Flatten[Table[ #*Prime[i]^j& /@ b[n - i*j, i - 1], {j, 0, n/i}]]];
T[n_] := Map[Function[m, Function[l, Total[l]!/Times @@ (l!)][ FactorInteger[m][[All, 2]]]], Sort[b[n, n]]];
T /@ Range[0, 10] // Flatten (* Jean-François Alcover, May 10 2021, after Alois P. Heinz *)
A345164
Number of alternating permutations of the multiset of prime factors of n.
Original entry on oeis.org
1, 1, 1, 0, 1, 2, 1, 0, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 0, 0, 2, 0, 1, 1, 4, 1, 0, 2, 2, 2, 2, 1, 2, 2, 0, 1, 4, 1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 0, 2, 0, 2, 2, 1, 4, 1, 2, 1, 0, 2, 4, 1, 1, 2, 4, 1, 1, 1, 2, 1, 1, 2, 4, 1, 0, 0, 2, 1, 4, 2, 2, 2
Offset: 1
The a(n) alternating permutations of prime indices for n = 180, 210, 300, 420, 900:
(12132) (1324) (13132) (12143) (121323)
(21213) (1423) (13231) (13142) (132312)
(21312) (2143) (21313) (13241) (213132)
(23121) (2314) (23131) (14132) (213231)
(31212) (2413) (31213) (14231) (231213)
(3142) (31312) (21314) (231312)
(3241) (21413) (312132)
(3412) (23141) (323121)
(4132) (24131)
(4231) (31214)
(31412)
(34121)
(41213)
(41312)
Counting all permutations gives
A008480.
Dominated by
A335452 (number of separations of prime factors).
Including twins (x,x) gives
A344606.
Positions of nonzero terms are
A345172.
A001250 counts alternating permutations.
A003242 counts anti-run compositions.
A344604 counts alternating compositions with twins.
A344654 counts non-twin partitions w/o alternating permutation, rank:
A344653.
A344740 counts twins and partitions w/ alternating permutation, rank:
A344742.
A345166 counts separable partitions w/o alternating permutation, rank:
A345173.
A345170 counts partitions with a alternating permutation.
Cf.
A001222,
A071321,
A071322,
A316523,
A316524,
A333489,
A335126,
A344605,
A344614,
A344616,
A344652,
A345163,
A345168.
-
wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&&Length[Split[Sign[Differences[y]]]]==Length[y]-1];
Table[Length[Select[Permutations[Flatten[ConstantArray@@@FactorInteger[n]]],wigQ]],{n,30}]
A321742
Irregular triangle read by rows where T(H(u),H(v)) is the coefficient of m(v) in e(u), where H is Heinz number, m is monomial symmetric functions, and e is elementary symmetric functions.
Original entry on oeis.org
1, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 3, 0, 0, 0, 0, 1, 1, 3, 6, 0, 1, 0, 2, 6, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 1, 0, 2, 1, 5, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 1, 0, 3, 10, 1, 6, 4, 12, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1
Triangle begins:
1
1
0 1
1 2
0 0 1
0 1 3
0 0 0 0 1
1 3 6
0 1 0 2 6
0 0 0 1 4
0 0 0 0 0 0 1
0 2 1 5 12
0 0 0 0 0 0 0 0 0 0 1
0 0 0 0 0 1 5
0 0 0 1 0 3 10
1 6 4 12 24
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
0 0 1 5 2 12 30
For example, row 12 gives: e(211) = 2m(22) + m(31) + 5m(211) + 12m(1111).
Cf.
A008480,
A049311,
A056239,
A116540,
A124794,
A124795,
A300121,
A319193,
A321738,
A321742-
A321765,
A321854.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
nrmptn[n_]:=Join@@MapIndexed[Table[#2[[1]],{#1}]&,If[n==1,{},Flatten[Cases[FactorInteger[n]//Reverse,{p_,k_}:>Table[PrimePi[p],{k}]]]]];
Table[Table[Sum[Times@@Factorial/@Length/@Split[Sort[Length/@mtn,Greater]]/Times@@Factorial/@Length/@Split[mtn],{mtn,Select[mps[nrmptn[n]],And[And@@UnsameQ@@@#,Sort[Length/@#]==primeMS[k]]&]}],{k,Sort[Times@@Prime/@#&/@IntegerPartitions[Total[primeMS[n]]]]}],{n,18}]
A321765
Irregular triangle read by rows where T(H(u),H(v)) is the coefficient of s(v) in p(u), where H is Heinz number, p is power sum symmetric functions, and s is Schur functions.
Original entry on oeis.org
1, 1, 1, -1, 1, 1, 1, -1, 1, 1, 0, -1, 1, 0, -1, 1, -1, 1, 2, 1, 1, 2, -1, -1, 1, 1, -1, 0, 0, 1, 1, -1, 0, 0, 1, -1, 1, 1, 0, 1, -1, -1, 1, 0, -1, 0, 0, 1, 0, 0, -1, 1, -1, 1, 0, -1, 1, 0, 0, -1
Offset: 1
Triangle begins:
1
1
1 -1
1 1
1 -1 1
1 0 -1
1 0 -1 1 -1
1 2 1
1 2 -1 -1 1
1 -1 0 0 1
1 -1 0 0 1 -1 1
1 0 1 -1 -1
1 0 -1 0 0 1 0 0 -1 1 -1
1 0 -1 1 0 0 -1
For example, row 12 gives: p(211) = s(4) + s(31) - s(211) - s(1111).
Cf.
A000085,
A008480,
A056239,
A082733,
A124795,
A153452,
A296188,
A296561,
A300121,
A304438,
A317552,
A317554,
A321742-
A321765.
A351202
Number of permutations of the multiset of prime factors of n (or ordered prime factorizations of n) with all distinct runs.
Original entry on oeis.org
1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 4, 1, 2, 1, 2, 1, 6, 1, 1, 2, 2, 2, 2, 1, 2, 2, 4, 1, 6, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 4, 2, 4, 2, 2, 1, 6, 1, 2, 2, 1, 2, 6, 1, 2, 2, 6, 1, 4, 1, 2, 2, 2, 2, 6, 1, 4, 1, 2, 1, 6, 2, 2, 2
Offset: 1
The a(36) = 2 permutations are (1,1,2,2), (2,2,1,1). Missing are: (1,2,1,2), (1,2,2,1), (2,1,1,2), (2,1,2,1). Here we use prime indices instead of factors.
The maximum number of possible permutations is
A008480.
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A098859 counts partitions with distinct multiplicities, ordered
A242882.
A283353 counts normal multisets with a permutation without distinct runs.
A297770 counts distinct runs in binary expansion.
A351014 counts distinct runs in standard compositions, firsts
A351015.
A351204 = partitions whose perms. have distinct runs, complement
A351203.
Counting words with all distinct runs:
-
Table[Length[Select[Permutations[Join@@ ConstantArray@@@FactorInteger[n]],UnsameQ@@Split[#]&]],{n,100}]
A022915
Multinomial coefficients (0, 1, ..., n)! = C(n+1,2)!/(0!*1!*2!*...*n!).
Original entry on oeis.org
1, 1, 3, 60, 12600, 37837800, 2053230379200, 2431106898187968000, 73566121315513295589120000, 65191584694745586153436251091200000, 1906765806522767212441719098019963758016000000, 2048024348726152339387799085049745725891853852479488000000
Offset: 0
From _Gus Wiseman_, Aug 12 2020: (Start)
The a(3) = 60 permutations of the prime indices of A006939(3) = 360:
(111223) (121123) (131122) (212113) (231211)
(111232) (121132) (131212) (212131) (232111)
(111322) (121213) (131221) (212311) (311122)
(112123) (121231) (132112) (213112) (311212)
(112132) (121312) (132121) (213121) (311221)
(112213) (121321) (132211) (213211) (312112)
(112231) (122113) (211123) (221113) (312121)
(112312) (122131) (211132) (221131) (312211)
(112321) (122311) (211213) (221311) (321112)
(113122) (123112) (211231) (223111) (321121)
(113212) (123121) (211312) (231112) (321211)
(113221) (123211) (211321) (231121) (322111)
(End)
A190945 counts the case of anti-run permutations.
A317829 counts partitions of this multiset.
A325617 is the version for factorials instead of superprimorials.
A006939 lists superprimorials or Chernoff numbers.
A008480 counts permutations of prime indices.
-
with(combinat):
a:= n-> multinomial(binomial(n+1, 2), $0..n):
seq(a(n), n=0..12); # Alois P. Heinz, May 18 2013
-
Table[Apply[Multinomial ,Range[n]], {n, 0, 20}] (* Geoffrey Critzer, Dec 09 2012 *)
Table[Multinomial @@ Range[n], {n, 0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
Table[Binomial[n + 1, 2]!/BarnesG[n + 2], {n, 0, 20}] (* Eric W. Weisstein, Jul 14 2017 *)
Table[Length[Permutations[Join@@Table[i,{i,n},{i}]]],{n,0,4}] (* Gus Wiseman, Aug 12 2020 *)
-
a(n) = binomial(n+1,2)!/prod(k=1, n, k^(n+1-k)); \\ Michel Marcus, May 02 2019
More terms from Larry Reeves (larryr(AT)acm.org), Apr 11 2001
A319191
Coefficient of p(y) / A056239(n)! in Product_{i >= 1} (1 + x_i), where p is power-sum symmetric functions and y is the integer partition with Heinz number n.
Original entry on oeis.org
1, 1, -1, 1, 2, -3, -6, 1, 3, 8, 24, -6, -120, -30, -20, 1, 720, 15, -5040, 20, 90, 144, 40320, -10, 40, -840, -15, -90, -362880, -120, 3628800, 1, -504, 5760, -420, 45, -39916800, -45360, 3360, 40, 479001600, 630, -6227020800, 504, 210, 403200, 87178291200
Offset: 1
Cf.
A000041,
A000110,
A000258,
A005651,
A008480,
A048994,
A056239,
A124794,
A215366,
A318762,
A319182.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
numPermsOfType[ptn_]:=Total[ptn]!/Times@@ptn/Times@@Factorial/@Length/@Split[ptn];
Table[(-1)^(Total[primeMS[n]]-PrimeOmega[n])*numPermsOfType[primeMS[n]],{n,100}]
A318992
Numbers whose consecutive prime indices are not all divisible.
Original entry on oeis.org
15, 30, 33, 35, 45, 51, 55, 60, 66, 69, 70, 75, 77, 85, 90, 91, 93, 95, 99, 102, 105, 110, 119, 120, 123, 132, 135, 138, 140, 141, 143, 145, 150, 153, 154, 155, 161, 165, 170, 175, 177, 180, 182, 186, 187, 190, 195, 198, 201, 203, 204, 205, 207, 209, 210, 215
Offset: 1
The sequence of partitions whose Heinz numbers belong to the sequence begins: (3,2), (3,2,1), (5,2), (4,3), (3,2,2), (7,2), (5,3), (3,2,1,1), (5,2,1), (9,2), (4,3,1), (3,3,2), (5,4), (7,3), (3,2,2,1), (6,4), (11,2), (8,3), (5,2,2).
-
Select[Range[100],!Or[#==1,PrimePowerQ[#],Divisible@@Reverse[PrimePi/@FactorInteger[#][[All,1]]]]&]
-
ok(n)={my(v=apply(primepi, factor(n)[,1])); for(i=2, #v, if(v[i]%v[i-1], return(1))); 0} \\ Andrew Howroyd, Oct 26 2018
A382857
Number of ways to permute the prime indices of n so that the run-lengths are all equal.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 1, 0, 1, 2, 1, 1, 1, 6, 1, 1, 2, 2, 2, 4, 1, 2, 2, 0, 1, 6, 1, 1, 1, 2, 1, 0, 1, 1, 2, 1, 1, 0, 2, 0, 2, 2, 1, 6, 1, 2, 1, 1, 2, 6, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 2, 6, 1, 0, 1, 2, 1, 6, 2, 2
Offset: 0
The prime indices of 216 are {1,1,1,2,2,2} and we have permutations:
(1,1,1,2,2,2)
(1,2,1,2,1,2)
(2,1,2,1,2,1)
(2,2,2,1,1,1)
so a(216) = 4.
The prime indices of 25920 are {1,1,1,1,1,1,2,2,2,2,3} and we have permutations:
(1,2,1,2,1,2,1,2,1,3,1)
(1,2,1,2,1,2,1,3,1,2,1)
(1,2,1,2,1,3,1,2,1,2,1)
(1,2,1,3,1,2,1,2,1,2,1)
(1,3,1,2,1,2,1,2,1,2,1)
so a(25920) = 5.
For distinct instead of equal run-lengths we have
A382771.
For run-sums instead of run-lengths we have
A382877, distinct
A382876.
Positions of first appearances are
A382878.
Positions of terms > 1 are
A383089.
A003963 gives product of prime indices.
A005811 counts runs in binary expansion.
A044813 lists numbers whose binary expansion has distinct run-lengths.
A164707 lists numbers whose binary expansion has all equal run-lengths, distinct
A328592.
A353744 ranks compositions with equal run-lengths, counted by
A329738.
Cf.
A000720,
A000961,
A001221,
A001222,
A003242,
A008480,
A047966,
A238130,
A238279,
A351201,
A351293,
A351295.
-
Table[Length[Select[Permutations[Join@@ConstantArray@@@FactorInteger[n]], SameQ@@Length/@Split[#]&]],{n,0,100}]
Comments