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.

Showing 1-7 of 7 results.

A000008 Number of ways of making change for n cents using coins of 1, 2, 5, 10 cents.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28, 31, 34, 40, 43, 49, 52, 58, 64, 70, 76, 82, 88, 98, 104, 114, 120, 130, 140, 150, 160, 170, 180, 195, 205, 220, 230, 245, 260, 275, 290, 305, 320, 341, 356, 377, 392, 413, 434, 455, 476, 497, 518, 546
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into parts 1, 2, 5, and 10.
There is a unique solution to this puzzle: "There are a prime number of ways that I can make change for n cents using coins of 1, 2, 5, 10 cents; but a semiprime number of ways that I can make change for n-1 cents and for n+1 cents." There is a unique solution to this related puzzle: "There are a prime number of ways that I can make change for n cents using coins of 1, 2, 5, 10 cents; but a 3-almost prime number of ways that I can make change for n-1 cents and for n+1 cents." - Jonathan Vos Post, Aug 26 2005

Examples

			G.f. = 1 + x + 2*x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 5*x^6 + 6*x^7 + 7*x^8 + 8*x^9 + 11*x^10 + ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 316.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 152.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a000008 = p [1,2,5,10] where
       p _          0 = 1
       p []         _ = 0
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Dec 15 2013
    
  • Magma
    [#RestrictedPartitions(n,{1,2,5,10}):n in [0..60]]; // Marius A. Burtea, May 07 2019
  • Maple
    M:= Matrix(18, (i,j)-> if(i=j-1 and i<17) or (j=1 and member(i, [2,5,10,17,18])) or (i=18 and j=18) then 1 elif j=1 and member(i, [7,12,15]) then -1 else 0 fi); a:= n-> (M^(n+1))[18,1]; seq(a(n), n=0..51); # Alois P. Heinz, Jul 25 2008
    # second Maple program:
    a:= proc(n) local m, r; m := iquo(n, 10, 'r'); r:= r+1; ([23, 26, 35, 38, 47, 56, 65, 74, 83, 92][r]+ (3*r+ 24+ 10*m) *m) *m/6+ [1, 1, 2, 2, 3, 4, 5, 6, 7, 8][r] end: seq(a(n), n=0..100); # Alois P. Heinz, Oct 05 2008
  • Mathematica
    a[ n_] := SeriesCoefficient[ 1 / ((1 - x)(1 - x^2)(1 - x^5)(1 - x^10)), {x, 0, n}]
    a[n_, d_] := SeriesCoefficient[1/(Times@@Map[(1-x^#)&, d]), {x, 0, n}] (* general case for any set of denominations represented as a list d of coin values in cents *)
    Table[Length[FrobeniusSolve[{1,2,5,10},n]],{n,0,70}] (* Harvey P. Dale, Apr 02 2012 *)
    LinearRecurrence[{1, 1, -1, 0, 1, -1, -1, 1, 0, 1, -1, -1, 1, 0, -1, 1, 1, -1}, {1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28}, 100] (* Vincenzo Librandi, Feb 10 2016 *)
    a[ n_] := Quotient[ With[{r = Mod[n, 10, 1]}, n^3 + 27 n^2 + (191 + 3 {4, 13, 0, 5, 8, 9, 8, 5, 0, 13}[[r]]) n + 25], 600] + 1; (* Michael Somos, Mar 06 2018 *)
    Table[Length@IntegerPartitions[n,All,{1,2,5,10}],{n,0,70}] (* Giorgos Kalogeropoulos, May 07 2019 *)
  • Maxima
    a(n):=floor(((n+17)*(2*n^2+20*n+81)+15*(n+1)*(-1)^n+120*((floor(n/5)+1)*((1+(-1)^mod(n,5))/2-floor(((mod(n,5))^2)/8))))/1200); /* Tani Akinari, Jun 21 2013 */
    
  • PARI
    {a(n) = if( n<-17, -a(-18-n), if( n<0, 0, polcoeff( 1 / ((1 - x) * (1 - x^2) * (1 - x^5) * (1 - x^10)) + x * O(x^n), n)))}; /* Michael Somos, Apr 01 2003 */
    
  • PARI
    Vec( 1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)) + O(x^66) ) \\ Joerg Arndt, Oct 02 2013
    
  • PARI
    {a(n) = my(r = (n-1)%10 + 1); (n^3 + 27*n^2 + (191 + 3*[4, 13, 0, 5, 8, 9, 8, 5, 0, 13][r])*n + 25)\600 + 1}; /* Michael Somos, Mar 06 2018 */
    

Formula

G.f.: 1 / ((1 - x) * (1 - x^2) * (1 - x^5) * (1 - x^10)). - Michael Somos, Nov 17 1999
a(n) - a(n-1) = A025810(n). - Michael Somos, Dec 15 2002
a(n) = a(n-2) + a(n-5) - a(n-7) + a(n-10) - a(n-12) - a(n-15) + a(n-17) + 1. - Michael Somos, Apr 01 2003
a(n) = -a(-18-n). - Michael Somos, Apr 01 2003
a(n) = (q+1)*(h(n) - q*(3n-10q+7)/6) with q = floor(n/10) and h(n) = A000115(n) = round((n+4)^2/20). See link "Derivation of formulas". - Gerhard Kirchner, Feb 10 2017
a(n) = floor((2*n^3 + 54*n^2 + 421*n + 15*n*(-1)^n + 24*n * ((-1)^[(n mod 5)>2] - [(n mod 5)=1]) + 1248)/1200). - Hoang Xuan Thanh, Jun 27 2025

A001312 Number of ways of making change for n cents using coins of 1, 2, 5, 10, 50, 100 cents.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28, 31, 34, 40, 43, 49, 52, 58, 64, 70, 76, 82, 88, 98, 104, 114, 120, 130, 140, 150, 160, 170, 180, 195, 205, 220, 230, 245, 260, 275, 290, 305, 320, 342, 357, 379, 394, 416, 438, 460, 482, 504, 526
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into parts 1, 2, 5, 10, 50, and 100. - Joerg Arndt, Sep 05 2014

Examples

			1 + x + 2*x^2 + 2*x^3 + 3*x^4 + 4*x^5 + 5*x^6 + 6*x^7 + 7*x^8 + 8*x^9 + 11*x^10 + ...
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 316.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1.

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[1/((1 - x)(1 - x^2)(1 - x^5)(1 - x^10)(1 - x^50)(1 - x^100)), {x, 0, n}]
    Table[Length[FrobeniusSolve[{1,2,5,10,50,100},n]],{n,0,60}] (* Harvey P. Dale, Dec 29 2017 *)

Formula

G.f.: 1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)*(1-x^50)*(1-x^100)).

A001301 Number of ways of making change for n cents using coins of 1, 2, 5, 10, 25 cents.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28, 31, 34, 40, 43, 49, 52, 58, 65, 71, 78, 84, 91, 102, 109, 120, 127, 138, 151, 162, 175, 186, 199, 217, 230, 248, 261, 279, 300, 318, 339, 357, 378, 406, 427, 455, 476, 504, 536, 564, 596, 624, 656
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into parts 1, 2, 5, 10, and 25. - Joerg Arndt, Sep 05 2014

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 316.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1.

Programs

  • Maple
    M := Matrix(43, (i,j)-> if (i=j-1) or (j=1 and member(i, [1, 2, 5, 8, 10, 13, 16, 17, 25, 28, 31, 32, 36, 37, 40, 43])) then 1 elif j=1 and member(i, [3, 6, 7, 11, 12, 15, 18, 26, 27, 30, 33, 35, 38, 41, 42]) then -1 else 0 fi); a := n -> (M^(n))[1,1]; seq (a(n), n=0..51); # Alois P. Heinz, Jul 25 2008
  • Mathematica
    CoefficientList[ Series[ 1 / ((1 - x)(1 - x^2)(1 - x^5)(1 - x^10)(1 - x^25)), {x, 0, 55} ], x ]
    Table[Length[FrobeniusSolve[{1,2,5,10,25},n]],{n,0,60}] (* Harvey P. Dale, Jan 19 2020 *)
  • PARI
    Vec(1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)*(1-x^25)) + O(x^100)) \\ Michel Marcus, Sep 05 2014

Formula

G.f.: 1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)*(1-x^25)).

A001302 Number of ways of making change for n cents using coins of 1, 2, 5, 10, 25, 50 cents.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28, 31, 34, 40, 43, 49, 52, 58, 65, 71, 78, 84, 91, 102, 109, 120, 127, 138, 151, 162, 175, 186, 199, 217, 230, 248, 261, 279, 300, 318, 339, 357, 378, 407, 428, 457, 478, 507, 540, 569, 602, 631, 664
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into parts 1, 2, 5, 10, 25, and 50. - Joerg Arndt, Sep 05 2014

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 316.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1.

Programs

  • Mathematica
    CoefficientList[ Series[ 1 / ((1 - x)(1 - x^2)(1 - x^5)(1 - x^10)(1 - x^25)(1 - x^50)), {x, 0, 55} ], x ]
    Array[Length@IntegerPartitions[#, All, {1, 2, 5, 10, 25, 50}]&, 100, 0] (* Giorgos Kalogeropoulos, Apr 24 2021 *)
  • PARI
    Vec(1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)*(1-x^25)*(1-x^50))+ O(x^100)) \\ Michel Marcus, Sep 05 2014

Formula

G.f.: 1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)*(1-x^25)*(1-x^50)).
a(n) = Sum_{k=0..floor(n/2)} A001300(n-2*k). - Christian Krause, Apr 24 2021

A001319 Number of (unordered) ways of making change for n cents using coins of 2, 5, 10, 20, 50 cents.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 3, 3, 3, 3, 3, 3, 7, 3, 7, 3, 7, 7, 7, 7, 7, 7, 13, 7, 13, 7, 13, 13, 13, 13, 13, 13, 22, 13, 22, 13, 22, 22, 22, 22, 22, 22, 35, 22, 35, 22, 35, 35, 35, 35, 35, 35, 53, 35, 53, 35, 53, 53, 53, 53, 53, 53, 77, 53, 77
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into parts 2, 5, 10, 20, and 50. - Joerg Arndt, Sep 05 2014

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 316.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1.

Crossrefs

First differences of A001313.

Programs

  • Maple
    1/(1-x^2)/(1-x^5)/(1-x^10)/(1-x^20)/(1-x^50)
  • Mathematica
    CoefficientList[Series[1/((1 - x^2) (1 - x^5) (1 - x^10) (1 - x^20) (1 - x^50)), {x, 0, 50}], x]

A057537 Number of ways of making change for n Euro-cents using the Euro currency.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28, 31, 34, 41, 44, 51, 54, 61, 68, 75, 82, 89, 96, 109, 116, 129, 136, 149, 162, 175, 188, 201, 214, 236, 249, 271, 284, 306, 328, 350, 372, 394, 416, 451, 473, 508, 530, 565, 600, 635, 670, 705, 740, 793, 828
Offset: 0

Views

Author

Thomas Brendan Murphy (murphybt(AT)tcd.ie), Sep 06 2000

Keywords

Comments

Euro currency has coins and bills of size 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000 cents.
Differs from A001313 first at n=100. - Georg Fischer, Oct 06 2018

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 316.
  • G. Pólya and G. Szegő, Problems and Theorems in Analysis, Springer-Verlag, NY, 2 vols., 1972, Vol. 1, p. 1.

Crossrefs

Cf. A001313.

Programs

  • Maple
    gf:= 1/expand((1-x) * (1-x^2) * (1-x^5) * (1-x^10) * (1-x^20) * (1-x^50) * (1-x^100) * (1-x^200) * (1-x^500) * (1-x^1000) * (1-x^2000) * (1-x^5000) * (1-x^10000) * (1-x^20000) * (1-x^50000)):
    a:= n-> coeff(series(gf, x, n+1), x, n):
    seq(a(n), n=0..100);
  • Mathematica
    f = 1/Times@@(1 - x^{1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000, 50000}); a[n_] := SeriesCoefficient[f, {x, 0, n}]; Table[a[n], {n, 1, 61}] (* Jean-François Alcover, Nov 28 2013, after Maple *)
  • PARI
    coins(v[..])=my(x='x); prod(i=1,#v,1/(1-x^v[i]))
    Vec(coins(1, 2, 5, 10, 20, 50, 100, 200)+O(x^99)) \\ Charles R Greathouse IV, Jan 24 2022

Formula

G.f.: 1/((1-x) * (1-x^2) * (1-x^5) * (1-x^10) * (1-x^20) * (1-x^50) * (1-x^100) * (1-x^200) * (1-x^500) * (1-x^1000) * (1-x^2000) * (1-x^5000) * (1-x^10000) * (1-x^20000) * (1-x^50000)).

A339094 Number of (unordered) ways of making change for n US Dollars using the current US denominations of $1, $2, $5, $10, $20, $50 and $100 bills.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 11, 12, 15, 16, 19, 22, 25, 28, 31, 34, 41, 44, 51, 54, 61, 68, 75, 82, 89, 96, 109, 116, 129, 136, 149, 162, 175, 188, 201, 214, 236, 249, 271, 284, 306, 328, 350, 372, 394, 416, 451, 473, 508, 530, 565, 600, 635, 670, 705, 740, 793, 828, 881, 916
Offset: 0

Views

Author

Robert G. Wilson v, Nov 25 2020

Keywords

Comments

Not the same as A001313. First difference appears at A001313(100) being 4562, whereas a(100) is 4563; obviously one more than A001313(100).
Not the same as A057537.
Number of partitions of n into parts 1, 2, 5, 10, 20, 50 and 100.

Examples

			a(5) is 4 because 1+1+1+1+1 = 2+1+1+1 = 2+2+1 = 5.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ IntegerPartitions[n, All, {1, 2, 5, 10, 20, 50, 100}]; Array[f, 75, 0] (* or *)
    CoefficientList[ Series[1/((1 - x) (1 - x^2) (1 - x^5) (1 - x^10) (1 - x^20) (1 - x^50) (1 - x^100)), {x, 0, 75}], x] (* or *)
    Table[ Length@ FrobeniusSolve[{1, 2, 5, 10, 20, 50, 100}, n], {n, 0, 75}] (* much slower *)
  • PARI
    coins(v[..])=my(x='x); prod(i=1, #v, 1/(1-x^v[i]))
    Vec(coins(1, 2, 5, 10, 20, 50, 100)+O(x^99)) \\ Charles R Greathouse IV, Jan 24 2022

Formula

G.f.: 1/((1-x)*(1-x^2)*(1-x^5)*(1-x^10)*(1-x^20)*(1-x^50)*(1-x^100)).
Showing 1-7 of 7 results.