This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A359497 #13 Jan 21 2023 22:26:51 %S A359497 1,2,3,5,7,11,13,17,19,25,29,35,49,55,77,121,91,143,169,187,221,289, %T A359497 247,323,361,391,437,539,605,847,1331,715,1001,1573,1183,1859,2197, %U A359497 1547,2431,2873,3179,3757,4913,3553,4199,5491,4693,6137,6859,9317,14641 %N A359497 Greatest positive integer whose weakly increasing prime indices have weighted sum (A304818) equal to n. %C A359497 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. %C A359497 The weighted sum of a sequence (y_1,...,y_k) is Sum_{i=1..k} i*y_i. %H A359497 Andrew Howroyd, <a href="/A359497/b359497.txt">Table of n, a(n) for n = 0..500</a> %e A359497 The terms together with their prime indices begin: %e A359497 1: {} %e A359497 2: {1} %e A359497 3: {2} %e A359497 5: {3} %e A359497 7: {4} %e A359497 11: {5} %e A359497 13: {6} %e A359497 17: {7} %e A359497 19: {8} %e A359497 25: {3,3} %e A359497 29: {10} %e A359497 35: {3,4} %e A359497 49: {4,4} %e A359497 55: {3,5} %e A359497 77: {4,5} %e A359497 The 5 numbers with weighted sum of prime indices 12, together with their prime indices: %e A359497 20: {1,1,3} %e A359497 27: {2,2,2} %e A359497 33: {2,5} %e A359497 37: {12} %e A359497 49: {4,4} %e A359497 Hence a(12) = 49. %t A359497 nn=10; %t A359497 primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]; %t A359497 ots[y_]:=Sum[i*y[[i]],{i,Length[y]}]; %t A359497 seq=Table[ots[primeMS[n]],{n,1,2^nn}]; %t A359497 Table[Position[seq,k][[-1,1]],{k,0,nn}] %o A359497 (PARI) %o A359497 a(n)={ my(recurse(r, k, m) = if(k==1, if(m>=r, prime(r)), %o A359497 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)); %o A359497 if(n==0, 1, vecmax(vector((sqrtint(8*n+1)-1)\2, k, recurse(n, k, n)))); %o A359497 } \\ _Andrew Howroyd_, Jan 21 2023 %Y A359497 First position of n in A304818, reverse A318283. %Y A359497 The least instead of greatest is given by A359682, reverse A359679. %Y A359497 The reverse version is A359683. %Y A359497 A112798 lists prime indices, length A001222, sum A056239. %Y A359497 A320387 counts multisets by weighted sum, zero-based A359678. %Y A359497 A358136 lists partial sums of prime indices, ranked by A358137, rev A359361. %Y A359497 Cf. A001248, A029931, A055932, A089633, A243055, A358194, A359043, A359676, A359681, A359755. %K A359497 nonn %O A359497 0,2 %A A359497 _Gus Wiseman_, Jan 15 2023 %E A359497 Terms a(21) and beyond from _Andrew Howroyd_, Jan 21 2023