ForHosting KIT · Math

Palindrome bases finder

See every base in which a number reads the same both ways: up to base 16, 10 is a palindrome in bases 3, 4 and 9, written 101, 22 and 11, and in every base from 11 on as a single digit. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
N
10
Max base
16
You get
Quantity
9

A number can look ordinary in base ten and still be a perfect palindrome in another radix. Ten in base three is one-zero-one; ten in base four is two-two; ten in base nine is one-one. Students, contest programmers, and number-theory hobbyists often need the full set of bases—up to a chosen maximum—where a given non-negative integer is palindromic, not only a yes-or-no test in one fixed base.

What it means for n to be a palindrome in base b

Write a non-negative integer n in integer base b, where b is at least two. The digits are the successive remainders when n is repeatedly divided by b, written from most significant to least significant. That sequence is a palindrome when it equals its own reverse: the first digit matches the last, the second matches the second-to-last, and so on.

Single-digit representations are always palindromes, so every base strictly larger than n (and at least two) counts when it lies inside your scan range. Classic teaching examples: ten is one-zero-one in base three, two-two in base four, and one-one in base nine; one hundred twenty-one is a three-digit palindrome in base ten. Zero is a single zero digit in every base and therefore appears in every base you scan.

The definition is fixed and deterministic—there is no sampling, floating-point digit extraction, or approximate comparison. This page answers a specific search intent: list all bases up to a maximum where n is palindromic, which is different from converting a string between radices or checking whether a decimal string alone is a palindrome.

Practical tips, limits, and where this tool fits

Remember that bases greater than n always contribute single-digit palindromes; if you only want multi-digit palindromes, filter the returned bases client-side with base less than or equal to n. Pair the bases array with the representations array when grading homework so students can recompute each digit sequence by hand. Sibling kit landings convert between two fixed radices or sum digits in one base; this page is specifically for people searching which bases make a given integer palindromic.

Keep n inside the safe-integer range so every remainder stays exact, and you get reproducible multi-base palindrome lists for contests, LMS plugins, and blog demos without standing up a computer-algebra stack.

Classroom multi-base palindrome drills

Give students an integer and a maximum base; check their listed bases and digit strings against the deterministic bases and representations arrays.

Programming contest and interview oracles

Validate solutions that ask for all bases up to B where n is a palindrome without reimplementing digit extraction in every language harness.

Curriculum generators and research notebooks

Batch-scan interesting n values, store counts and base lists, and build worksheets or density tables for multi-base palindromic representations.

Is a single-digit representation a palindrome?

Yes. When base is greater than n, n is written with one digit, which always reads the same forwards and backwards.

Is the palindrome bases finder free?

The browser tool is free and runs locally.

In which bases is 10 a palindrome?

Scanning up to base 16, the answer is bases 3, 4 and 9, where 10 is written 101, 22 and 11, plus every base from 11 to 16, where it is a single digit. That makes 9 bases in total.

Why do bases larger than my number always appear?

In any base larger than the number, it is written with one digit, and a single digit always reads the same both ways. If you only want palindromes with several digits, ignore the bases above your number.

What is the highest base I can scan?

You can scan every base from 2 up to 10,000. A maximum below 2 is refused, because base 2 is the smallest possible base.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/numth/palindrome-bases-list

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/numth/palindrome-bases-list \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"n":10,"max_base":16}'
{
  "n": 10,
  "max_base": 16
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "numth.palindrome_bases_list",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This capability accepts n and max_base, walks every integer base from two through that maximum, extracts base-b digits with pure integer arithmetic, and returns the ascending list of matching bases together with auditable digit representations.

How to call the API and what comes back

Send a JSON body with two required fields: n, a non-negative whole number at most the JavaScript safe-integer limit, and max_base, an integer at least two and at most ten thousand that is the inclusive upper end of the scan. Aliases number and value are accepted for n; maxBase, base_max, and upto are accepted for max_base. On success the response echoes n and max_base, returns bases as an ascending array of every matching base, count as the length of that array, representations as objects each with base, digits (most-significant first), and representation (a printable digit string using zero through nine, then A–Z for ten through thirty-five, or bracketed decimals for larger digit values), and a short formula string restating the palindrome rule. If max_base is below two the task fails with invalid_input and a message that states the maximum base is below two—exactly the hard product rule for this landing. Missing fields, non-integers, negatives for n, or max_base above the published scan cap also fail validation and are never charged. Pricing is a flat $0.002 per successful request.

Practical tips, limits, and where this tool fits

Choose max_base large enough to cover the radices you care about—sixteen or thirty-six for programming courses, a few hundred for exploratory number theory—but stay within the ten-thousand scan cap so interactive requests stay fast on the edge Worker. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners type illegal maxima while learning the contract.

What does this palindrome bases finder return?

Every integer base b from 2 through max_base where the base-b digits of n form a palindrome, plus count and per-base digit representations.

Why must max_base be at least 2?

Integer place-value bases start at two. A maximum base below two is rejected with invalid_input and is not charged.

What inputs are rejected?

Missing n or max_base, non-integers, negative n, max_base below two, and max_base above the published scan cap return invalid_input.

Read the full KIT documentation →