A320387
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are nonincreasing, and first difference <= first part.
Original entry on oeis.org
1, 1, 1, 2, 1, 2, 3, 2, 2, 4, 3, 4, 5, 3, 5, 7, 4, 7, 8, 6, 8, 11, 7, 9, 13, 9, 11, 16, 12, 15, 18, 13, 17, 20, 17, 21, 24, 19, 24, 30, 22, 28, 34, 26, 34, 38, 30, 37, 43, 37, 42, 48, 41, 50, 58, 48, 55, 64, 53, 64, 71, 59, 73, 81, 69, 79, 89, 79, 90, 101, 87, 100, 111
Offset: 0
There are a(29) = 15 such partitions of 29:
01: [29]
02: [10, 19]
03: [11, 18]
04: [12, 17]
05: [13, 16]
06: [14, 15]
07: [5, 10, 14]
08: [6, 10, 13]
09: [6, 11, 12]
10: [7, 10, 12]
11: [8, 10, 11]
12: [3, 6, 9, 11]
13: [5, 7, 8, 9]
14: [2, 4, 6, 8, 9]
15: [3, 5, 6, 7, 8]
There are a(30) = 18 such partitions of 30:
01: [30]
02: [10, 20]
03: [11, 19]
04: [12, 18]
05: [13, 17]
06: [14, 16]
07: [5, 10, 15]
08: [6, 10, 14]
09: [6, 11, 13]
10: [7, 10, 13]
11: [7, 11, 12]
12: [8, 10, 12]
13: [3, 6, 9, 12]
14: [9, 10, 11]
15: [4, 7, 9, 10]
16: [2, 4, 6, 8, 10]
17: [6, 7, 8, 9]
18: [4, 5, 6, 7, 8]
A053632 counts compositions by weighted sum.
-
prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
Table[Length[Select[Range[2^n],ots[prix[#]]==n&]],{n,10}] (* Gus Wiseman, Jan 17 2023 *)
-
seq(n)={Vec(sum(k=1, (sqrtint(8*n+1)+1)\2, my(t=binomial(k,2)); x^t/prod(j=1, k-1, 1 - x^(t-binomial(j,2)) + O(x^(n-t+1)))))} \\ Andrew Howroyd, Jan 22 2023
-
def partition(n, min, max)
return [[]] if n == 0
[max, n].min.downto(min).flat_map{|i| partition(n - i, min, i - 1).map{|rest| [i, *rest]}}
end
def f(n)
return 1 if n == 0
cnt = 0
partition(n, 1, n).each{|ary|
ary << 0
ary0 = (1..ary.size - 1).map{|i| ary[i - 1] - ary[i]}
cnt += 1 if ary0.sort == ary0
}
cnt
end
def A320387(n)
(0..n).map{|i| f(i)}
end
p A320387(50)
A359755
Positions of first appearances in the sequence of weighted sums of prime indices (A304818).
Original entry on oeis.org
1, 2, 3, 4, 6, 7, 8, 10, 12, 15, 16, 18, 20, 24, 26, 28, 36, 40, 46, 48, 50, 52, 56, 62, 68, 74, 76, 86, 88, 92, 94, 106, 107, 118, 122, 124, 131, 134, 136, 142, 146, 152, 158, 164, 166, 173, 178, 188, 193, 194, 199, 202, 206, 214, 218, 226, 229, 236, 239, 254
Offset: 1
The terms together with their prime indices begin:
1: {}
2: {1}
3: {2}
4: {1,1}
6: {1,2}
7: {4}
8: {1,1,1}
10: {1,3}
12: {1,1,2}
15: {2,3}
16: {1,1,1,1}
18: {1,2,2}
20: {1,1,3}
24: {1,1,1,2}
A053632 counts compositions by weighted sum.
-
nn=1000;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
seq=Table[ots[primeMS[n]],{n,1,nn}];
Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]
A359674
Zero-based weighted sum of the prime indices of n in weakly increasing order.
Original entry on oeis.org
0, 0, 0, 1, 0, 2, 0, 3, 2, 3, 0, 5, 0, 4, 3, 6, 0, 6, 0, 7, 4, 5, 0, 9, 3, 6, 6, 9, 0, 8, 0, 10, 5, 7, 4, 11, 0, 8, 6, 12, 0, 10, 0, 11, 8, 9, 0, 14, 4, 9, 7, 13, 0, 12, 5, 15, 8, 10, 0, 14, 0, 11, 10, 15, 6, 12, 0, 15, 9, 11, 0, 17, 0, 12, 9, 17, 5, 14, 0, 18
Offset: 1
The prime indices of 12 are {1,1,2}, so a(12) = 0*1 + 1*1 + 2*2 = 5.
Positions of last appearances (except 0) are
A001248.
Number of appearances of positive n is
A359678(n).
A053632 counts compositions by zero-based weighted sum.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
Table[wts[primeMS[n]],{n,100}]
A359676
Least positive integer whose weakly increasing prime indices have zero-based weighted sum n (A359674).
Original entry on oeis.org
1, 4, 6, 8, 14, 12, 16, 20, 30, 24, 32, 36, 40, 52, 48, 56, 100, 72, 80, 92, 96, 104, 112, 124, 136, 148, 176, 152, 214, 172, 184, 188, 262, 212, 272, 236, 248, 244, 304, 268, 346, 284, 328, 292, 386, 316, 398, 332, 376, 356, 458, 388, 478, 404, 472, 412, 526
Offset: 1
The terms together with their prime indices begin:
1: {}
4: {1,1}
6: {1,2}
8: {1,1,1}
14: {1,4}
12: {1,1,2}
16: {1,1,1,1}
20: {1,1,3}
30: {1,2,3}
24: {1,1,1,2}
32: {1,1,1,1,1}
36: {1,1,2,2}
40: {1,1,1,3}
52: {1,1,6}
48: {1,1,1,1,2}
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sum of standard compositions, rev
A231204.
-
nn=20;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
seq=Table[wts[primeMS[n]],{n,1,Prime[nn]^2}];
Table[Position[seq,k][[1,1]],{k,0,nn}]
A359681
Least positive integer whose reversed (weakly decreasing) prime indices have zero-based weighted sum (A359677) equal to n.
Original entry on oeis.org
1, 4, 9, 8, 18, 50, 16, 36, 100, 54, 32, 72, 81, 108, 300, 64, 144, 400, 216, 600, 243, 128, 288, 800, 432, 486, 1350, 648, 256, 576, 729, 864, 2400, 3375, 1296, 3600, 512, 1152, 1944, 1728, 4800, 9000, 2187, 2916, 8100, 1024, 2304, 6400, 3456, 4374, 12150
Offset: 0
The terms together with their prime indices begin:
1: {}
4: {1,1}
9: {2,2}
8: {1,1,1}
18: {1,2,2}
50: {1,3,3}
16: {1,1,1,1}
36: {1,1,2,2}
100: {1,1,3,3}
54: {1,2,2,2}
32: {1,1,1,1,1}
72: {1,1,1,2,2}
81: {2,2,2,2}
108: {1,1,2,2,2}
300: {1,1,2,3,3}
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sum of standard compositions, rev
A231204.
Cf.
A001248,
A029931,
A055932,
A089633,
A243055,
A359043,
A358194,
A359360,
A359361,
A359497,
A359683.
-
nn=20;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
seq=Table[wts[Reverse[primeMS[n]]],{n,1,Prime[nn]^2}];
Table[Position[seq,k][[1,1]],{k,0,nn}]
A359497
Greatest positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.
Original entry on oeis.org
1, 2, 3, 5, 7, 11, 13, 17, 19, 25, 29, 35, 49, 55, 77, 121, 91, 143, 169, 187, 221, 289, 247, 323, 361, 391, 437, 539, 605, 847, 1331, 715, 1001, 1573, 1183, 1859, 2197, 1547, 2431, 2873, 3179, 3757, 4913, 3553, 4199, 5491, 4693, 6137, 6859, 9317, 14641
Offset: 0
The terms together with their prime indices begin:
1: {}
2: {1}
3: {2}
5: {3}
7: {4}
11: {5}
13: {6}
17: {7}
19: {8}
25: {3,3}
29: {10}
35: {3,4}
49: {4,4}
55: {3,5}
77: {4,5}
The 5 numbers with weighted sum of prime indices 12, together with their prime indices:
20: {1,1,3}
27: {2,2,2}
33: {2,5}
37: {12}
49: {4,4}
Hence a(12) = 49.
-
nn=10;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
seq=Table[ots[primeMS[n]],{n,1,2^nn}];
Table[Position[seq,k][[-1,1]],{k,0,nn}]
-
a(n)={ my(recurse(r, k, m) = if(k==1, if(m>=r, prime(r)),
my(z=0); for(j=1, min(m, (r-k*(k-1)/2)\k), z=max(z, self()(r-k*j, k-1, j)*prime(j))); z));
if(n==0, 1, vecmax(vector((sqrtint(8*n+1)-1)\2, k, recurse(n, k, n))));
} \\ Andrew Howroyd, Jan 21 2023
A359679
Least number with weighted sum of reversed (weakly decreasing) prime indices (A318283) equal to n.
Original entry on oeis.org
1, 2, 3, 4, 6, 10, 8, 12, 19, 18, 16, 24, 27, 36, 43, 32, 48, 59, 61, 67, 71, 64, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 0
12 has reversed prime indices (2,1,1), with weighted sum 7, and no number < 12 has the same weighted sum of reversed prime indices, so a(7) = 12.
The unreversed zero-based version is
A359676.
-
nn=20;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
seq=Table[ots[Reverse[primeMS[n]]],{n,1,Prime[nn]^2}];
Table[Position[seq,k][[1,1]],{k,0,nn}]
A359675
Positions of first appearances in the sequence of zero-based weighted sums of prime indices (A359674).
Original entry on oeis.org
1, 4, 6, 8, 12, 14, 16, 20, 24, 30, 32, 36, 40, 48, 52, 56, 72, 80, 92, 96, 100, 104, 112, 124, 136, 148, 152, 172, 176, 184, 188, 212, 214, 236, 244, 248, 262, 268, 272, 284, 292, 304, 316, 328, 332, 346, 356, 376, 386, 388, 398, 404, 412, 428, 436, 452, 458
Offset: 1
The terms together with their prime indices begin:
1: {}
4: {1,1}
6: {1,2}
8: {1,1,1}
12: {1,1,2}
14: {1,4}
16: {1,1,1,1}
20: {1,1,3}
24: {1,1,1,2}
30: {1,2,3}
32: {1,1,1,1,1}
36: {1,1,2,2}
40: {1,1,1,3}
48: {1,1,1,1,2}
Positions of first appearances in
A359674.
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sum of standard compositions, rev
A231204.
-
nn=100;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
seq=Table[wts[primeMS[n]],{n,1,nn}];
Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]
A359680
Positions of first appearances in the sequence of zero-based weighted sums of reversed prime indices (A359677).
Original entry on oeis.org
1, 4, 8, 9, 16, 18, 32, 36, 50, 54, 64, 72, 81, 100, 108, 128, 144, 216, 243, 256, 288, 300, 400, 432, 486, 512, 576, 600, 648, 729, 800, 864, 1024, 1152, 1296, 1350, 1728, 1944, 2048, 2187, 2304, 2400, 2916, 3375, 3456, 3600, 4096, 4374, 4608, 4800, 5184
Offset: 1
The terms together with their prime indices begin:
1: {}
4: {1,1}
8: {1,1,1}
9: {2,2}
16: {1,1,1,1}
18: {1,2,2}
32: {1,1,1,1,1}
36: {1,1,2,2}
50: {1,3,3}
54: {1,2,2,2}
64: {1,1,1,1,1,1}
72: {1,1,1,2,2}
81: {2,2,2,2}
100: {1,1,3,3}
108: {1,1,2,2,2}
128: {1,1,1,1,1,1,1}
This is the sorted version of
A359681.
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sums of standard compositions, rev
A231204.
-
nn=1000;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
seq=Table[wts[Reverse[primeMS[n]]],{n,1,nn}];
Select[Range[nn],FreeQ[seq[[Range[#-1]]],seq[[#]]]&]
A359683
Greatest positive integer whose reversed (weakly decreasing) prime indices have weighted sum (A318283) equal to n.
Original entry on oeis.org
1, 2, 3, 5, 7, 11, 14, 22, 26, 34, 44, 55, 68, 85, 110, 130, 170, 190, 242, 290, 374, 418, 506, 638, 748, 836, 1012, 1276, 1364, 1628, 1914, 2090, 2552, 3190, 3410, 4070, 4510, 5060, 6380, 7018, 8140, 9020, 9922, 11396, 14036, 15004, 17908, 19844, 21692, 23452
Offset: 0
The terms together with their prime indices begin:
1: {}
2: {1}
3: {2}
5: {3}
7: {4}
11: {5}
14: {1,4}
22: {1,5}
26: {1,6}
34: {1,7}
44: {1,1,5}
55: {3,5}
68: {1,1,7}
85: {3,7}
110: {1,3,5}
130: {1,3,6}
170: {1,3,7}
190: {1,3,8}
242: {1,5,5}
290: {1,3,10}
The 6 numbers with weighted sum of reversed prime indices 9, together with their prime indices:
18: {1,2,2}
23: {9}
25: {3,3}
28: {1,1,4}
33: {2,5}
34: {1,7}
Hence a(9) = 34.
-
nn=10;
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
ots[y_]:=Sum[i*y[[i]],{i,Length[y]}];
seq=Table[ots[Reverse[primeMS[n]]],{n,1,2^nn}];
Table[Position[seq,k][[-1,1]],{k,0,nn}]
Showing 1-10 of 13 results.
Comments