A336640 a(n) is the minimal value of Sum x_i when Sum binomial(x_i, 2) = n.
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, 10, 12, 11, 13, 15, 12, 14, 9, 11, 13, 12, 14, 16, 13, 14, 16, 10, 12, 14, 13, 15, 17, 14, 16, 18, 17, 11, 13, 15, 14, 16, 16, 15, 17, 19, 17, 16, 12, 14, 16, 15, 17
Offset: 0
Examples
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. 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.
Links
- David A. Corneth, Table of n, a(n) for n = 0..10000
- Mara Hashuga, Megan Herbine, Alathea Jensen, Numerical Semigroups Generated by Quadratic Sequences, arXiv:2009.01981 [math.GR], 2020.
Programs
-
Haskell
a336640_list = map a336640 [0..] a336640 0 = 0 a336640 n = minimum $ map (\(i, t) -> i + (a336640_list !! (n - t))) triangular where triangular = takeWhile (\(_, m) -> m <= n) $ map t [2..] where t i = (i, i*(i-1) `div` 2) -- Peter Kagey, Sep 20 2020
-
PARI
lista(nn) = {my(mu=vector(nn), t, x); for(n=2, nn, x=[]; for(i=2, n, if((t=binomial(i, 2))
Jinyuan Wang, Jul 29 2020 -
Python
f = open("mu(n,mu).txt","a") N = 10000 mu = [0] x = [] f.write("0 0\n") for n in range(1,N): for i in range(2,N): iChoose2 = (i*(i-1))/2 if iChoose2 <= n: x.append(mu[int(n-iChoose2)]+i) mu.append(min(x)) f.write(str(n)+" "+str(min(x))+"\n") x.clear() f.close()
Extensions
More terms from Jinyuan Wang, Jul 29 2020
Comments