{"id":"sequence-identifier","title":"Integer Sequence Identifier","description":"Identifies an integer sequence from terms (a JSON array or pasted text), an OEIS A-number, a safe-parsed formula or recurrence, or a description, and leads with a verdict, confidence, A-number, formula, next terms and a next step. Searches the OEIS directly, then superseeker-style (differences, partial sums, gcd, ratios, binomial, Euler, leading terms, plus a search without the last two terms to flag disagreeing terms) under an 8-search budget, aligns offsets, and marks which terms agree or disagree. Fits linear recurrences and polynomials exactly over the rationals and reports one only when it predicts held-out terms. Candidates are ranked in code; a model is used only for a description input (one fast call, OEIS confirms what it proposes) and for the optional explain sentence (one more call, quote verified against OEIS text). Output carries the CC BY-SA 4.0 OEIS attribution.","roi":"Turns a list of numbers into its OEIS A-number, formula and next terms in one call, or a verified recurrence or polynomial when OEIS has none.","audience":"research","channels":["x402","mcp","rapidapi","apify"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/identify-sequence","path":"/api/v1/identify-sequence","contentType":"application/json"},"price":{"amount":"0.10","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"properties":{"terms":{"type":"array","minItems":4,"maxItems":60,"items":{"anyOf":[{"type":"integer"},{"type":"string","pattern":"^[+-]?[0-9]{1,40}$"}]},"description":"Integer terms, 4 to 60, each at most 40 digits. Pass values beyond 2^53 as decimal strings."},"termsText":{"type":"string","minLength":4,"maxLength":4000,"description":"Alternative to terms: the terms pasted as text, separated by commas, spaces or semicolons (for example copied from a spreadsheet, a paper or an OEIS data line)."},"aNumber":{"type":"string","minLength":1,"maxLength":120,"description":"Alternative to terms: an OEIS A-number (A000108) or oeis.org URL. The entry is fetched and its data searched for related sequences; returns its name, formulas and next terms."},"formula":{"type":"string","minLength":1,"maxLength":300,"description":"Alternative to terms: a closed form in n such as \"binomial(2*n,n)/(n+1)\", or a recurrence such as \"a(n) = a(n-1) + a(n-2)\" (with initialTerms). Operators + - * / % ^, functions binomial fact abs gcd min max floor mod. Evaluated by a safe parser, never eval; every term must be an integer."},"initialTerms":{"type":"array","maxItems":20,"items":{"anyOf":[{"type":"integer"},{"type":"string","pattern":"^[+-]?[0-9]{1,40}$"}]},"description":"Seed values a(start), a(start+1), ... for a recurrence formula."},"start":{"type":"integer","minimum":-100,"maximum":1000,"description":"Index n of the first expanded term; default 0."},"count":{"type":"integer","minimum":4,"maximum":60,"description":"How many terms to expand from the formula; default 20."},"description":{"type":"string","minLength":3,"maxLength":500,"description":"Alternative to terms and formula: a plain-language description. A short description that names an entry (up to 4 content words, all in the entry name, e.g. Catalan numbers) is resolved by OEIS text search with no model; otherwise one fast model call proposes terms and keywords, which OEIS then confirms."},"explain":{"type":"boolean","description":"Ask a model for a one-sentence explanation drawn only from the matched OEIS entry; its quote is verified in code, otherwise the entry name is returned. Default false."}}},"resultSchema":{"type":"object","properties":{"answer":{"type":"object","description":"Headline: verdict (same as status), confidence 0-100, aNumber, name, url, formula and formulaSource (oeis or fitted), nextTerms (from a verified fit), alsoConsistentWith, a one-sentence summary and a concrete nextStep."},"status":{"type":"string","enum":["IDENTIFIED","IDENTIFIED_VIA_TRANSFORM","PARTIAL_MATCH","RECURRENCE_ONLY","NO_MATCH"]},"input":{"type":"object","description":"kind, termsSource (caller, formula, model, oeis-entry or oeis-text-search), the terms analyzed, the expanded formula and any model keywords."},"candidates":{"type":"array","description":"Ranked OEIS candidates: aNumber, url, name, evidence, transform used (null = direct), alignment (OEIS index of the first compared term), matched/mismatched terms, unverified terms beyond the entry's data, exact, formulas, references.","items":{"type":"object"}},"explanation":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"One line from OEIS text only: the entry name, or a model sentence whose quote was verified (source oeis-name or model)."},"recurrence":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Constant-coefficient linear recurrence solved exactly over the rationals from the first 2*order terms; reported only when it reproduces every later term (heldOutTerms >= 2)."},"polynomial":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Polynomial in n from vanishing finite differences, reported only with held-out terms predicted exactly."},"search":{"type":"object","description":"OEIS searches made (budget 8, sequential and rate limited), steps skipped or not applicable, and failures."},"llmCalls":{"type":"integer"},"llmFailures":{"type":"integer"},"decidedBy":{"type":"object","description":"Where the terms, ranking and explanation came from."},"attribution":{"type":"object","description":"OEIS source and the CC BY-SA 4.0 notice."},"notes":{"type":"array","items":{"type":"string"}}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"answer":{"type":"object","description":"Headline: verdict (same as status), confidence 0-100, aNumber, name, url, formula and formulaSource (oeis or fitted), nextTerms (from a verified fit), alsoConsistentWith, a one-sentence summary and a concrete nextStep."},"status":{"type":"string","enum":["IDENTIFIED","IDENTIFIED_VIA_TRANSFORM","PARTIAL_MATCH","RECURRENCE_ONLY","NO_MATCH"]},"input":{"type":"object","description":"kind, termsSource (caller, formula, model, oeis-entry or oeis-text-search), the terms analyzed, the expanded formula and any model keywords."},"candidates":{"type":"array","description":"Ranked OEIS candidates: aNumber, url, name, evidence, transform used (null = direct), alignment (OEIS index of the first compared term), matched/mismatched terms, unverified terms beyond the entry's data, exact, formulas, references.","items":{"type":"object"}},"explanation":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"One line from OEIS text only: the entry name, or a model sentence whose quote was verified (source oeis-name or model)."},"recurrence":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Constant-coefficient linear recurrence solved exactly over the rationals from the first 2*order terms; reported only when it reproduces every later term (heldOutTerms >= 2)."},"polynomial":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Polynomial in n from vanishing finite differences, reported only with held-out terms predicted exactly."},"search":{"type":"object","description":"OEIS searches made (budget 8, sequential and rate limited), steps skipped or not applicable, and failures."},"llmCalls":{"type":"integer"},"llmFailures":{"type":"integer"},"decidedBy":{"type":"object","description":"Where the terms, ranking and explanation came from."},"attribution":{"type":"object","description":"OEIS source and the CC BY-SA 4.0 notice."},"notes":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"terms":[1,1,2,5,14,42,132,429,1430,4862]},"openapiOperation":{"operationId":"sequence_identifier","summary":"Integer Sequence Identifier","description":"Identifies an integer sequence from terms (a JSON array or pasted text), an OEIS A-number, a safe-parsed formula or recurrence, or a description, and leads with a verdict, confidence, A-number, formula, next terms and a next step. Searches the OEIS directly, then superseeker-style (differences, partial sums, gcd, ratios, binomial, Euler, leading terms, plus a search without the last two terms to flag disagreeing terms) under an 8-search budget, aligns offsets, and marks which terms agree or disagree. Fits linear recurrences and polynomials exactly over the rationals and reports one only when it predicts held-out terms. Candidates are ranked in code; a model is used only for a description input (one fast call, OEIS confirms what it proposes) and for the optional explain sentence (one more call, quote verified against OEIS text). Output carries the CC BY-SA 4.0 OEIS attribution.\n\nPrice: 0.10 USDC on Base (x402).","x-x402-price-usdc":"0.10","x-x402-amount":"100000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.10"}},"x-audience":"research","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/sequence-identifier","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"terms":{"type":"array","minItems":4,"maxItems":60,"items":{"anyOf":[{"type":"integer"},{"type":"string","pattern":"^[+-]?[0-9]{1,40}$"}]},"description":"Integer terms, 4 to 60, each at most 40 digits. Pass values beyond 2^53 as decimal strings."},"termsText":{"type":"string","minLength":4,"maxLength":4000,"description":"Alternative to terms: the terms pasted as text, separated by commas, spaces or semicolons (for example copied from a spreadsheet, a paper or an OEIS data line)."},"aNumber":{"type":"string","minLength":1,"maxLength":120,"description":"Alternative to terms: an OEIS A-number (A000108) or oeis.org URL. The entry is fetched and its data searched for related sequences; returns its name, formulas and next terms."},"formula":{"type":"string","minLength":1,"maxLength":300,"description":"Alternative to terms: a closed form in n such as \"binomial(2*n,n)/(n+1)\", or a recurrence such as \"a(n) = a(n-1) + a(n-2)\" (with initialTerms). Operators + - * / % ^, functions binomial fact abs gcd min max floor mod. Evaluated by a safe parser, never eval; every term must be an integer."},"initialTerms":{"type":"array","maxItems":20,"items":{"anyOf":[{"type":"integer"},{"type":"string","pattern":"^[+-]?[0-9]{1,40}$"}]},"description":"Seed values a(start), a(start+1), ... for a recurrence formula."},"start":{"type":"integer","minimum":-100,"maximum":1000,"description":"Index n of the first expanded term; default 0."},"count":{"type":"integer","minimum":4,"maximum":60,"description":"How many terms to expand from the formula; default 20."},"description":{"type":"string","minLength":3,"maxLength":500,"description":"Alternative to terms and formula: a plain-language description. A short description that names an entry (up to 4 content words, all in the entry name, e.g. Catalan numbers) is resolved by OEIS text search with no model; otherwise one fast model call proposes terms and keywords, which OEIS then confirms."},"explain":{"type":"boolean","description":"Ask a model for a one-sentence explanation drawn only from the matched OEIS entry; its quote is verified in code, otherwise the entry name is returned. Default false."}}},"example":{"terms":[1,1,2,5,14,42,132,429,1430,4862]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"answer":{"type":"object","description":"Headline: verdict (same as status), confidence 0-100, aNumber, name, url, formula and formulaSource (oeis or fitted), nextTerms (from a verified fit), alsoConsistentWith, a one-sentence summary and a concrete nextStep."},"status":{"type":"string","enum":["IDENTIFIED","IDENTIFIED_VIA_TRANSFORM","PARTIAL_MATCH","RECURRENCE_ONLY","NO_MATCH"]},"input":{"type":"object","description":"kind, termsSource (caller, formula, model, oeis-entry or oeis-text-search), the terms analyzed, the expanded formula and any model keywords."},"candidates":{"type":"array","description":"Ranked OEIS candidates: aNumber, url, name, evidence, transform used (null = direct), alignment (OEIS index of the first compared term), matched/mismatched terms, unverified terms beyond the entry's data, exact, formulas, references.","items":{"type":"object"}},"explanation":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"One line from OEIS text only: the entry name, or a model sentence whose quote was verified (source oeis-name or model)."},"recurrence":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Constant-coefficient linear recurrence solved exactly over the rationals from the first 2*order terms; reported only when it reproduces every later term (heldOutTerms >= 2)."},"polynomial":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"Polynomial in n from vanishing finite differences, reported only with held-out terms predicted exactly."},"search":{"type":"object","description":"OEIS searches made (budget 8, sequential and rate limited), steps skipped or not applicable, and failures."},"llmCalls":{"type":"integer"},"llmFailures":{"type":"integer"},"decidedBy":{"type":"object","description":"Where the terms, ranking and explanation came from."},"attribution":{"type":"object","description":"OEIS source and the CC BY-SA 4.0 notice."},"notes":{"type":"array","items":{"type":"string"}}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/sequence-identifier/","docsJson":"https://agents.writerslogic.com/docs/sequence-identifier.json","sample":"https://agents.writerslogic.com/api/v1/samples/sequence-identifier","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}