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 A381535 #9 Mar 01 2025 12:18:43 %S A381535 11,0,2,27,92,352,1002,16927,2302,7827,25052,220052,13352,1487552, %T A381535 101752,195677,85177,137532552,173577 %N A381535 a(n) is the least nonnegative number that can be represented as the sum of two (not necessarily distinct) generalized pentagonal numbers in exactly n ways. %C A381535 a(n) is the least k >= 0 such that A093518(k) = n. %C A381535 a(17) > 5.4 * 10^7 if it exists. %C A381535 From _Pontus von Brömssen_, Feb 28 2025: (Start) %C A381535 a(19) > 3*10^9 if it exists. %C A381535 After a(19), the following are all terms below 3*10^9: %C A381535 n | a(n) %C A381535 ---+----------- %C A381535 20 | 333802 %C A381535 21 | 4891927 %C A381535 22 | 391438802 %C A381535 23 | 2543802 %C A381535 24 | 494027 %C A381535 25 | 55039427 %C A381535 27 | 3764827 %C A381535 28 | 8345052 %C A381535 30 | 4339427 %C A381535 32 | 2737177 %C A381535 35 | 1375985677 %C A381535 36 | 6422352 %C A381535 38 | 429902552 %C A381535 40 | 12350677 %C A381535 41 | 85573502 %C A381535 42 | 108485677 %C A381535 45 | 94120677 %C A381535 48 | 29014077 %C A381535 50 | 733363177 %C A381535 54 | 120983227 %C A381535 56 | 308766927 %C A381535 60 | 160558802 %C A381535 63 | 2353016927 %C A381535 64 | 101275552 %C A381535 68 | 2139337552 %C A381535 72 | 344336877 %C A381535 80 | 725351927 %C A381535 96 | 1073520852 %C A381535 (End) %F A381535 A093518(a(n)) = n. %e A381535 a(3) = 27 because 27 = 1 + 26 = 5 + 22 = 12 + 15 has 3 representations as the sum of two generalized pentagonal numbers, and no smaller number works. %p A381535 GP:= [0,seq(op([m*(3*m-1)/2, m*(3*m+1)/2]),m=1..2000)]: %p A381535 N:= GP[-1]: %p A381535 V:= Array(0..N, datatype=integer[4]): %p A381535 for i from 1 to nops(GP) do %p A381535 for j from 1 to i do %p A381535 r:= GP[i]+GP[j]; %p A381535 if r > N then break fi; %p A381535 V[r]:= V[r]+1 %p A381535 od od: %p A381535 W:= Array(0..16): count:= 0: %p A381535 for i from 1 to N while count < 17 do %p A381535 v:= V[i]; if v <= 16 and W[v] = 0 then W[v]:= i; count:= count + 1 fi %p A381535 od: %p A381535 W[1]:= 0: %p A381535 convert(W,list); %Y A381535 Cf. A001318, A093518. %K A381535 nonn,more %O A381535 0,1 %A A381535 _Robert Israel_, Feb 26 2025 %E A381535 a(17)-a(18) from _Pontus von Brömssen_, Feb 28 2025