(
ce: ComputeEngine,
name: string,
count: number = 10,
options: OEISOptions = {}
)
| 297 | return lookupOEISByTerms(numericTerms, options); |
| 298 | } |
| 299 | |
| 300 | /** |
| 301 | * Check if a defined sequence matches an OEIS sequence. |
| 302 | * |
| 303 | * @param ce - ComputeEngine instance |
| 304 | * @param name - Name of the defined sequence |
| 305 | * @param count - Number of terms to check (default: 10) |
| 306 | * @param options - Optional configuration |
| 307 | * @returns Promise with match results |
| 308 | */ |
| 309 | export async function checkSequence( |
| 310 | ce: ComputeEngine, |
| 311 | name: string, |
| 312 | count: number = 10, |
| 313 | options: OEISOptions = {} |
| 314 | ): Promise<{ |
| 315 | matches: OEISSequenceInfo[]; |
| 316 | terms: number[]; |
| 317 | }> { |
| 318 | if (!ce.isSequence(name)) { |
| 319 | throw new Error(`'${name}' is not a defined sequence`); |
| 320 | } |
| 321 | // The terms start at the first index of the domain of the sequence |
| 322 | // (0 when the domain has no lower bound). |
| 323 | const info = ce.getSequence(name); |
nothing calls this directly
no test coverage detected