login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A151945 Denomination sequence. Start with the 0th and first coins of value 1 cent: a(0)=a(1)=1. Thereafter a(n), the value of the n-th coin (n>=2), is the number of ways to make change for n cents in earlier coins. The two one-cent coins are considered distinct. 3
1, 1, 3, 5, 7, 10, 14, 19, 25, 32, 42, 53, 66, 82, 101, 124, 150, 181, 216, 257, 306, 361, 424, 495, 577, 671, 776, 895, 1029, 1180, 1350, 1540, 1752, 1988, 2252, 2547, 2872, 3231, 3630, 4071, 4558, 5093, 5683, 6330, 7040, 7822, 8674, 9606, 10625, 11738 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

a(n) is the number of nonnegative solutions to the Diophantine equation 1*x_0 + 1*x_1 + ... + a(n-1)*x_(n-1) = n. - Melvin Peralta, Jan 03 2016

LINKS

Robert G. Wilson v, Table of n, a(n) for n = 0..3500

FORMULA

G.f: g(x) = Product_{n >= 0} 1/(1-x^a(n)) - x.

EXAMPLE

Call the two one-cent coins c and d.

Then we can make change for 2 cents in three ways: cc,cd,dd, so a(2) = 3.

Then we can make change for 3 cents in five ways: ccc,ccd,cdd,ddd,3, so a(3) = 5.

MAPLE

b:= proc(n, i) option remember;

      if n<0 then 0

    elif n=0 then 1

    elif i<0 then 0

    elif i=1 then n+1

    else b(n, i-1) +b(n-a(i), i)

      fi

    end:

a:= n-> b(n, n-1):

seq(a(n), n=0..100);  # Alois P. Heinz, Aug 14 2009

MATHEMATICA

b[n_, i_] := b[n, i] = If[n < 0, 0, If[n == 0, 1, If[i < 0, 0, If[i == 1, n + 1, b[n, i - 1] + b[n - a[i], i]] ]]]; a[0] = a[1] = 1; a[n_] := a[n] = b[n, n - 1]; Table[ a@n, {n, 0, 50}] (* Robert G. Wilson v, Aug 17 2009 *)

PROG

(Haskell)

a151945 n = a151945_list !! n

a151945_list = 1 : 1 : f [2..] where

   f (x:xs) = p (take x a151945_list) x : f xs

   p _ 0 = 1; p [] _ = 0

   p ds'@(d:ds) m = if m < d then 0 else p ds' (m - d) + p ds m

-- Reinhard Zumkeller, Jan 21 2014

CROSSREFS

Sequence in context: A054040 A011848 A131673 * A140261 A015827 A088635

Adjacent sequences:  A151942 A151943 A151944 * A151946 A151947 A151948

KEYWORD

nonn,nice

AUTHOR

David W. Wilson, Aug 14 2009

EXTENSIONS

More terms from Alois P. Heinz, Aug 14 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 21 05:01 EST 2017. Contains 294988 sequences.