login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A359757 Greatest positive integer whose weakly increasing prime indices have zero-based weighted sum (A359674) equal to n. 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Appears to first differ from A001248 at a(27) = 12167, A001248(27) = 10609.
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.
The zero-based weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} (i-1)*y_i.
LINKS
EXAMPLE
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}
MATHEMATICA
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}]
PROG
(PARI) 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
CROSSREFS
The one-based version is A359497, minimum A359682 (sorted A359755).
Last position of n in A359674, reverse A359677.
The minimum instead of maximum is A359676, sorted A359675, reverse A359681.
A053632 counts compositions by zero-based weighted sum.
A112798 lists prime indices, length A001222, sum A056239, reverse A296150.
A124757 = zero-based weighted sum of standard compositions, reverse A231204.
A304818 gives weighted sums of prime indices, reverse A318283.
A320387 counts multisets by weighted sum, zero-based A359678.
A358136 = partial sums of prime indices, ranked by A358137, reverse A359361.
Sequence in context: A350343 A001248 A280076 * A052043 A188836 A030146
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jan 16 2023
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Jan 21 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 04:48 EDT 2024. Contains 372178 sequences. (Running on oeis4.)