cp's OEIS Frontend

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.

Previous Showing 11-16 of 16 results.

A283370 Minimal number of terms required to write n as sum of numbers in A000389 = { C(k,5); k=1,2,3,... } (with repetitions allowed).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6, 7, 8, 4, 5, 6, 2, 3, 4, 5, 6, 7, 3, 4, 5, 6
Offset: 0

Views

Author

M. F. Hasler, Mar 06 2017

Keywords

Comments

Analog, for A000389 = {C(n,5)}, of A061336 (for triangular numbers A000217 = {C(n,2)}), A104246 (for tetrahedral numbers A000292 = {C(n,3)}) and A283365 (for A000332 = {C(n,4)}).

Crossrefs

Cf. A000332 = {C(n,4)}; A061336 (analog for A000217), A104246 (analog for A000292), A283365 (analog for A000332).

Programs

  • PARI
    {a(n,k=5,M=9e9,N=n) = n>k || return(n); for(m=k,M,binomial(m,k)>n && (M=m) && break); M-- <= k && return(n); my(b=binomial(M,k),c=binomial(M-1,k),NN); forstep( nn=n\b,0,-1, if(N>NN=nn+a(n-nn*b,k,M,N),N=NN); n-(nn-1)*b >= (N-nn+1)*c && break); N}

Formula

a(n) <= 10 = a(220) for all n, according to Kim (2003, p. 74, first row of table "d = 5"), but this "numerical result" has no "* denoting exact values" (see Remark at end of paper), so it could be incorrect. [Disclaimer added by M. F. Hasler, Sep 22 2022]

A338479 Least number of hexagonal numbers needed to represent n.

Original entry on oeis.org

1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 2, 3, 4, 1, 2, 3, 3, 4, 5, 2, 3, 4, 4, 5, 6, 3, 1, 2, 2, 3, 4, 4, 2, 3, 3, 4, 5, 5, 3, 4, 4, 2, 3, 1, 2, 3, 4, 3, 4, 2, 3, 4, 5, 4, 2, 3, 3, 4, 2, 3, 3, 4, 4, 5, 1, 2, 3, 4, 5, 3, 2, 2, 3, 3, 4, 4, 3, 3, 4, 2, 3, 4, 3, 4, 4, 3, 3, 4, 2, 1, 2, 3, 2, 3, 3, 2, 3, 4, 3, 3
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 29 2020

Keywords

Crossrefs

A338481 Least number of octagonal numbers needed to represent n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8, 2, 3, 4, 5, 6, 1, 2, 3, 3, 4, 5, 6, 7, 2, 3, 4, 4, 5, 6, 7, 8, 3, 4, 5, 1, 2, 2, 3, 4, 4, 5, 6, 2, 3, 3, 4, 5, 5, 6, 7, 3, 4, 4, 5, 6, 2, 3, 3, 4, 1, 2, 3, 4, 3, 4, 4, 5, 2, 3, 4, 5, 4, 5, 5, 2, 3, 3, 4, 4, 5, 2, 3, 3, 4, 4, 5, 5, 6, 3, 4, 1, 2, 3, 4, 5, 3
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 29 2020

Keywords

Crossrefs

A061337 Smallest number of distinct triangular numbers which sum to n (or -1 if not possible).

Original entry on oeis.org

0, 1, -1, 1, 2, -1, 1, 2, -1, 2, 1, 2, -1, 2, 3, 1, 2, 3, 2, 3, 4, 1, 2, -1, 2, 2, 3, 2, 1, 2, 3, 2, 3, -1, 2, 3, 1, 2, 2, 2, 3, 3, 2, 2, 3, 1, 2, 3, 2, 2, 3, 2, 3, 3, 3, 1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 2, 1, 2, 3, 2, 2, 3, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 3, 2, 2, 3, 3, 2, 2, 3, 3, 1, 2, 2, 2, 3, 3, 2, 3, 2, 2, 2, 2, 3, 3, 1, 2, 3, 2, 3, 3, 2, 2, 3, 2, 2, 3, 3, 3, 2, 1, 2, 3
Offset: 0

Views

Author

Henry Bottomley, Apr 25 2001

Keywords

Comments

20 is the only case where n>3.

Examples

			a(20)=4 since 20=1+3+6+10, a(21)=1 since 21 is triangular, a(22)=2 since 22=1+21, a(23)=-1 since no combination of distinct triangular numbers sum to 23.
		

Crossrefs

A336640 a(n) is the minimal value of Sum x_i when Sum binomial(x_i, 2) = n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

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}.
Ap(S,c) = {a(n)*c+n*b | n = 0, 1, 2, ...}.
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.

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.
		

Crossrefs

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

A356037 Conjecturally, a(n) is the smallest number m such that every natural number is a sum of at most m n-simplex numbers.

Original entry on oeis.org

1, 3, 5, 8, 10, 13, 15, 15, 19, 24
Offset: 1

Views

Author

Mohammed Yaseen, Jul 24 2022

Keywords

Comments

n-simplex numbers are {binomial(k,n); k>=n}.
This problem is the simplex number analog of Waring's problem.
a(2) = 3 was proposed by Fermat and proved by Gauss, see A061336.
Pollock conjectures that a(3) = 5. Salzer and Levine prove this for numbers up to 452479659. See A104246 and A000797.
Kim gives a(4)=8, a(5)=10, a(6)=13 and a(7)=15 (not proved).

Examples

			2-simplex numbers are {binomial(k,2); k>=2} = {1,3,6,10,...}, the triangular numbers. 3 is the smallest number m such that every natural number is a sum of at most m triangular numbers. So a(2)=3.
3-simplex numbers are {binomial(k,3); k>=3} = {1,4,10,20,...}, the tetrahedral numbers. 5 is presumed to be the smallest number m such that every natural number is a sum of at most m tetrahedral numbers. So a(3)=5.
		

Crossrefs

Minimal number of x-simplex numbers whose sum equals n: A061336 (x=2), A104246 (x=3), A283365 (x=4), A283370 (x=5).
x-simplex numbers: A000217 (x=2), A000292 (x=3), A000332 (x=4), A000389 (x=5), A000579 (x=6), A000580 (x=7), A000581 (x=8), A000582 (x=9).
Previous Showing 11-16 of 16 results.