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}]
A359756
First position of n in the sequence of zero-based weighted sums of standard compositions (A124757), if we start with position 0.
Original entry on oeis.org
0, 3, 6, 7, 13, 14, 15, 27, 29, 30, 31, 55, 59, 61, 62, 63, 111, 119, 123, 125, 126
Offset: 0
The terms together with their standard compositions begin:
0: ()
3: (1,1)
6: (1,2)
7: (1,1,1)
13: (1,2,1)
14: (1,1,2)
15: (1,1,1,1)
27: (1,2,1,1)
29: (1,1,2,1)
30: (1,1,1,2)
31: (1,1,1,1,1)
A053632 counts compositions by zero-based weighted sum.
A066099 lists standard compositions.
-
nn=10;
stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
wts[y_]:=Sum[(i-1)*y[[i]],{i,Length[y]}];
seq=Table[wts[stc[n]],{n,0,2^(nn-1)}];
Table[Position[seq,k][[1,1]]-1,{k,0,nn}]
A359757
Greatest positive integer whose weakly increasing prime indices have zero-based weighted sum (A359674) equal to n.
Original entry on oeis.org
4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409, 10201, 12167, 11449, 15341, 24389, 16399, 26071, 29791, 31117, 35557, 50653, 39401, 56129, 68921, 58867, 72283, 83521, 79007, 86903, 103823
Offset: 1
The terms together with their prime indices begin:
4: {1,1}
9: {2,2}
25: {3,3}
49: {4,4}
121: {5,5}
169: {6,6}
289: {7,7}
361: {8,8}
529: {9,9}
841: {10,10}
A053632 counts compositions by zero-based weighted sum.
A124757 = zero-based weighted sum of standard compositions, reverse
A231204.
-
nn=10;
prix[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[prix[n]],{n,2^nn}];
Table[Position[seq,k][[-1,1]],{k,nn}]
-
a(n)={ my(recurse(r, k, m) = if(k==1, if(m>=r, prime(r)^2),
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));
vecmax(vector((sqrtint(8*n+1)-1)\2, k, recurse(n,k,n)));
} \\ Andrew Howroyd, Jan 21 2023
Comments