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 A336640 #71 Dec 04 2020 20:44:26 %S A336640 0,2,4,3,5,7,4,6,8,7,5,7,8,8,10,6,8,10,9,11,10,7,9,11,10,11,13,11,8, %T A336640 10,12,11,13,15,12,14,9,11,13,12,14,16,13,14,16,10,12,14,13,15,17,14, %U A336640 16,18,17,11,13,15,14,16,16,15,17,19,17,16,12,14,16,15,17 %N A336640 a(n) is the minimal value of Sum x_i when Sum binomial(x_i, 2) = n. %C A336640 a(n) = Min_{m in the integers such that m*c+n*b is in S} where n is greater than or equal to 0, n is less than c, where S is an infinite numerical semigroup generated by {y_0, y_1, ...}, and c and b are set natural number values, y_n = n*c + binomial(n, 2)*b. a(n) can be used to find the Apéry set of S. Ap(s,c) = {a(n)*c+n*b for n = 0, 1, ..., c-1}. %C A336640 Ap(S,c) = {a(n)*c+n*b | n = 0, 1, 2, ...}. %C A336640 a(n) is a general value, however for some n, b, and c values, there is an m value less than the general a(n). This value is denoted a_c,b(n). For (c,b,n) = (29,1,26), (45,1,33), (47,1,44), (50,1,41), (55,1,50), (67,1,53), (73,1,63), or (79,1,74), a_c,b(n) = a(n)-1. %H A336640 David A. Corneth, <a href="/A336640/b336640.txt">Table of n, a(n) for n = 0..10000</a> %H A336640 Mara Hashuga, Megan Herbine, Alathea Jensen, <a href="https://arxiv.org/abs/2009.01981">Numerical Semigroups Generated by Quadratic Sequences</a>, arXiv:2009.01981 [math.GR], 2020. %e A336640 If n = 2, then n = binomial(2,2) + binomial(2,2) is the only way to write n = 2 as a sum of binomial coefficients. So x_1 = 2 and x_2 = 2, making a(n) = x_1 + x_2 = 4. %e A336640 For n=273, x's list 23, 5, 5 has binomial(23,2) + binomial(5,2) + binomial(5,2) = 273 = n. The sum of these x's is 23+5+5 = 33. No x's with a smaller sum (of x's) gives 273, so a(273) = 33. %o A336640 (Python) %o A336640 f = open("mu(n,mu).txt","a") %o A336640 N = 10000 %o A336640 mu = [0] %o A336640 x = [] %o A336640 f.write("0 0\n") %o A336640 for n in range(1,N): %o A336640 for i in range(2,N): %o A336640 iChoose2 = (i*(i-1))/2 %o A336640 if iChoose2 <= n: %o A336640 x.append(mu[int(n-iChoose2)]+i) %o A336640 mu.append(min(x)) %o A336640 f.write(str(n)+" "+str(min(x))+"\n") %o A336640 x.clear() %o A336640 f.close() %o A336640 (PARI) lista(nn) = {my(mu=vector(nn), t, x); for(n=2, nn, x=[]; for(i=2, n, if((t=binomial(i, 2))<n, x=concat(x, mu[n-t]+i))); mu[n]=vecmin(x)); mu; } \\ _Jinyuan Wang_, Jul 29 2020 %o A336640 (Haskell) %o A336640 a336640_list = map a336640 [0..] %o A336640 a336640 0 = 0 %o A336640 a336640 n = minimum $ map (\(i, t) -> i + (a336640_list !! (n - t))) triangular where %o A336640 triangular = takeWhile (\(_, m) -> m <= n) $ map t [2..] where %o A336640 t i = (i, i*(i-1) `div` 2) %o A336640 -- _Peter Kagey_, Sep 20 2020 %Y A336640 Cf. A000217, A061336. %K A336640 nonn,easy %O A336640 0,2 %A A336640 _Mara Hashuga_, _Megan Herbine_, _Alathea Jensen_, Jul 27 2020 %E A336640 More terms from _Jinyuan Wang_, Jul 29 2020