diff --git a/src/oeis/A000108.ts b/src/oeis/A000108.ts index 4a0fd166b6..77b3356366 100644 --- a/src/oeis/A000108.ts +++ b/src/oeis/A000108.ts @@ -4,6 +4,5 @@ import { factorial } from '../utils' export default function* A000108(): Generator { for (let n = 0n; /*∞*/; n++) { yield factorial(2n * n) / factorial(n + 1n) / factorial(n) - } } diff --git a/src/oeis/A000245.ts b/src/oeis/A000245.ts index 706d7f0562..9b70604f00 100644 --- a/src/oeis/A000245.ts +++ b/src/oeis/A000245.ts @@ -1,35 +1,10 @@ +import { factorial } from '../utils' + // a(n) = 3*(2*n)!/((n+2)!*(n-1)!). export default function* A000245(): Generator { - for (const n of [ - 0n, - 1n, - 3n, - 9n, - 28n, - 90n, - 297n, - 1001n, - 3432n, - 11934n, - 41990n, - 149226n, - 534888n, - 1931540n, - 7020405n, - 25662825n, - 94287120n, - 347993910n, - 1289624490n, - 4796857230n, - 17902146600n, - 67016296620n, - 251577050010n, - 946844533674n, - 3572042254128n, - 13505406670700n, - 51166197843852n, - 194214400834356n, - ]) { - yield n + yield 0n + for (let n = 1n; /*∞*/; n++) { + // 3*(2*n)!/((n+2)!*(n-1)!) + yield 3n * factorial(2n * n) / ( factorial(n + 2n) * factorial(n - 1n) ) } }