A359678
Number of multisets (finite weakly increasing sequences of positive integers) with zero-based weighted sum (A359674) equal to n > 0.
Original entry on oeis.org
1, 2, 4, 4, 6, 9, 8, 10, 14, 13, 16, 21, 17, 22, 28, 23, 30, 37, 30, 38, 46, 38, 46, 59, 46, 55, 70, 59, 70, 86, 67, 81, 96, 84, 98, 115, 95, 114, 135, 114, 132, 158, 127, 156, 178, 148, 176, 207, 172, 201, 227, 196, 228, 270, 222, 255, 296, 255, 295, 338, 278
Offset: 1
The a(1) = 1 through a(8) = 10 multisets:
{1,1} {1,2} {1,3} {1,4} {1,5} {1,6} {1,7} {1,8}
{2,2} {2,3} {2,4} {2,5} {2,6} {2,7} {2,8}
{3,3} {3,4} {3,5} {3,6} {3,7} {3,8}
{1,1,1} {4,4} {4,5} {4,6} {4,7} {4,8}
{5,5} {5,6} {5,7} {5,8}
{1,1,2} {6,6} {6,7} {6,8}
{1,2,2} {7,7} {7,8}
{2,2,2} {1,1,3} {8,8}
{1,1,1,1} {1,2,3}
{2,2,3}
Number of appearances of n > 0 in
A359674.
A053632 counts compositions by zero-based weighted sum.
A124757 gives zero-based weighted sums of standard compositions, rev
A231204.
-
zz[n_]:=Select[IntegerPartitions[n],UnsameQ@@#&&GreaterEqual @@ Differences[Append[#,0]]&];
Table[Sum[Append[z,0][[1]]-Append[z,0][[2]],{z,zz[n]}],{n,30}]
-
seq(n)={Vec(sum(k=2, (sqrtint(8*n+1)+1)\2, my(t=binomial(k, 2)); x^t/((1-x^t)*prod(j=1, k-1, 1 - x^(t-binomial(j, 2)) + O(x^(n-t+1))))))} \\ Andrew Howroyd, Jan 22 2023
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[[#]]]&]
A320509
Number of partitions of n such that the successive differences of consecutive parts are nonincreasing, and first difference <= first part.
Original entry on oeis.org
1, 1, 2, 3, 3, 4, 6, 4, 6, 8, 7, 8, 11, 7, 12, 14, 10, 13, 19, 12, 18, 21, 16, 19, 27, 19, 25, 30, 25, 30, 37, 25, 35, 40, 35, 42, 49, 35, 49, 56, 46, 54, 66, 50, 65, 72, 60, 70, 83, 68, 84, 90, 80, 94, 110, 86, 107, 116, 98, 119, 137, 111, 134, 146, 130, 148, 165, 141, 169
Offset: 0
There are a(11) = 8 such partitions of 11:
01: [11]
02: [4, 7]
03: [5, 6]
04: [2, 4, 5]
05: [3, 4, 4]
06: [2, 3, 3, 3]
07: [1, 2, 2, 2, 2, 2]
08: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
There are a(12) = 11 such partitions of 12:
01: [12]
02: [4, 8]
03: [5, 7]
04: [6, 6]
05: [2, 4, 6]
06: [3, 4, 5]
07: [4, 4, 4]
08: [3, 3, 3, 3]
09: [1, 2, 3, 3, 3]
10: [2, 2, 2, 2, 2, 2]
11: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
Cf.
A320387 (distinct parts, nonincreasing, and first difference <= first part).
-
Table[Length[Select[IntegerPartitions[n],GreaterEqual@@Differences[Append[#,0]]&]],{n,0,30}] (* Gus Wiseman, May 03 2019 *)
-
def partition(n, min, max)
return [[]] if n == 0
[max, n].min.downto(min).flat_map{|i| partition(n - i, min, i).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 A320509(n)
(0..n).map{|i| f(i)}
end
p A320509(50)
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}]
A179269
Number of partitions of n into distinct parts such that the successive differences of consecutive parts are increasing, and first difference > first part.
Original entry on oeis.org
1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 5, 5, 5, 7, 7, 7, 10, 10, 10, 13, 14, 14, 18, 19, 19, 23, 25, 25, 30, 32, 33, 38, 41, 42, 48, 52, 54, 60, 65, 67, 75, 81, 84, 92, 99, 103, 113, 121, 126, 136, 147, 153, 165, 177, 184, 197, 213, 221, 236, 253, 264, 280, 301, 313, 331, 355, 371, 390, 418, 435, 458
Offset: 0
a(10) = 5 as there are 5 such partitions of 10: 1 + 3 + 6 = 1 + 9 = 2 + 8 = 3 + 7 = 10.
a(10) = 5 as there are 5 such partitions of 10: 10, 8 + 1 + 1, 6 + 2 + 2, 4 + 3 + 3, 3 + 2 + 2 + 1 + 1 + 1 (second definition).
From _Gus Wiseman_, May 04 2019: (Start)
The a(3) = 1 through a(13) = 7 partitions whose differences are strictly increasing (with the last part taken to be 0) are the following (A = 10, B = 11, C = 12, D = 13). The Heinz numbers of these partitions are given by A325460.
(3) (4) (5) (6) (7) (8) (9) (A) (B) (C) (D)
(31) (41) (51) (52) (62) (72) (73) (83) (93) (94)
(61) (71) (81) (82) (92) (A2) (A3)
(91) (A1) (B1) (B2)
(631) (731) (831) (C1)
(841)
(931)
The a(3) = 1 through a(11) = 5 partitions whose multiplicities form an initial interval of positive integers are the following (A = 10, B = 11). The Heinz numbers of these partitions are given by A307895.
(3) (4) (5) (6) (7) (8) (9) (A) (B)
(211) (311) (411) (322) (422) (522) (433) (533)
(511) (611) (711) (622) (722)
(811) (911)
(322111) (422111)
(End)
-
Table[Length@
Select[IntegerPartitions[n],
And @@ Equal[Range[Length[Split[#]]], Length /@ Split[#]] &], {n,
0, 40}] (* Olivier Gérard, Jul 28 2017 *)
Table[Length[Select[IntegerPartitions[n],Less@@Differences[Append[#,0]]&]],{n,0,30}] (* Gus Wiseman, May 04 2019 *)
-
R(n)={my(L=List(), v=vectorv(n, i, 1), w=1, t=1); while(v, listput(L,v); w++; t+=w; v=vectorv(n, i, sum(k=1, (i-1)\t, L[w-1][i-k*t]))); Mat(L)}
seq(n)={my(M=R(n)); concat([1], vector(n, i, vecsum(M[i,])))} \\ Andrew Howroyd, Aug 27 2019
-
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.reverse && ary0.uniq == ary0
}
cnt
end
def A179269(n)
(0..n).map{|i| f(i)}
end
p A179269(50) # Seiichi Manyama, Oct 12 2018
-
def A179269(n):
has_increasing_diffs = lambda x: min(differences(x,2)) >= 1
special = lambda x: (x[1]-x[0]) > x[0]
allowed = lambda x: (len(x) < 2 or special(x)) and (len(x) < 3 or has_increasing_diffs(x))
return len([x for x in Partitions(n,max_slope=-1) if allowed(x[::-1])])
# D. S. McNeil, Jan 06 2011
A359682
Least positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n.
Original entry on oeis.org
1, 2, 3, 4, 7, 6, 8, 10, 15, 12, 16, 18, 20, 26, 24, 28, 50, 36, 40, 46, 48, 52, 56, 62, 68, 74, 88, 76, 107, 86, 92, 94, 131, 106, 136, 118, 124, 122, 152, 134, 173, 142, 164, 146, 193, 158, 199, 166, 188, 178, 229, 194, 239, 202, 236, 206, 263, 214, 271, 218
Offset: 0
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) = 20.
-
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[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[[#]]]&]
Showing 1-10 of 34 results.
Comments