# Questions tagged [palindrome]

Palindromes are words, phrases, representations of numbers or times which read the same in reverse, for example "level", "reviver", "12321", "10:01". See also the [balanced-string] tag.

100 questions
Filter by
Sorted by
Tagged with
1k views

### Pretty Palintiples

Imagine you have a positive integer number $n$. Let $m$ be the number obtained by reversing $n$'s digits. If $m$ is a whole multiple of $n$, then $n$ is said to be a reverse divisible ...
• 487
3k views

### Numbers that can be negated by reading backwards

Balanced ternary is a modified version of ternary (base 3), using the three digits 1,0 and -1...
• 6,035
1 vote
164 views

• 1,656
261 views

### Find the index of reflection of a substring of a palindrome [closed]

Problem Statement: You will receive a substring of a palindromic string. You must return the index of the substring which marks the point of reflection of the original string. You are only provided ...
605 views

### Pairs of palindromic anagramic dates separated by a palindromic number of days

Definitions: A palindrome is a string which reads the same backward or forward (not counting spaces or special characters), such as "madam" or "Sorel Eros". A date is said to be a palindrome when ...
1k views

### Number of palindrome splits

In this task you will take as input a non-negative integer $n$, and output the number of pairs of non-negative integers $a,b$ such that both are palindromes*, $a \leq b$, and $a+b = n$. For ...
• 98.8k
294 views

### Is this number a palindrome? [closed]

Input A single integer in your language's preferred format, e.g int or an array of digits are all acceptable. Output A truthy or falsely value, depending on ...
• 2,321
2k views

Derived from this, now deleted, post. Given a string, answer (truthy/falsy or two consistent values) if it constitutes a good Bishop password, which is when all the following conditions are met: it ...
• 30.4k
373 views

### A Radiation Hardened Palindromic Quine

There are radiation hardened quines, palindromic quines, but has anyone tried both?! I think not! Rules So the challenge here is to make a quine that if any symbol is deleted it prints its original ...
2k views

### Is this string a palindrome (in Morse Code)?

Challenge Inspired by this video. As you may know, a palindrome is a word that is spelled the same forward as it is backward. The word "PULP" is not a palindrome, but when translated into ...
• 1,650
165 views

### Every positive integer can be written as the sum of 3 palindrome integers. Wha'ts the largest possible palindrome integer for each integer n? [duplicate]

Let n be a positive integer then n = a + b + c for some a, b, and c that are palindrome integers. What is the largest possible integer ...
• 127
1k views

### Stitch Together a Palindrome from Palindromic Substrings

Given a string l, find all palindromic substrings p of l (including duplicates and single ...
• 20.7k
565 views

### Length of the Longest Palindromic Substring [duplicate]

A palindrome is a string which is the same when read forwards and backwards. For example "racecar" is a palindrome, but "Racecar" is not. A substring is a contiguous set of characters in a larger ...
• 841
2k views

### List all palindromic prime dates between 0000-01-01 and 99999-12-31

You know what a palindrome, a prime and a date are. Your task is to list all dates in 100 thousands of years that fulfill all three characteristics. Nevermind anything but the numbers, use the ...
• 1,796
5k views

Given a string s, return the smallest contiguous substring you can remove to create a palindrome. Examples: ...
• 20.7k
9k views

### Yo boy, must it sum

Every positive integer can be expressed as the sum of at most three palindromic positive integers in any base b≥5.   Cilleruelo et al., 2017 A positive integer is palindromic in a given base if ...
• 105k
793 views

### Smaller-Base Palindromes

For the purpose of this challenge, a smaller-base palindrome (SBP) is a number which is palindromic in a base between 1 and itself (exclusive), and is not a repdigit in the same base. For example, 5 ...
• 7,235
562 views

### Count the Palindromes [duplicate]

Given a number n, calculate the amount of bases in the range of [2, n) in which b(n) is a ...
• 10.8k
3k views

### Palindromic numbers with a binary twist

Warning : this is NOT a "hey, let's draw a cake in ASCII-art" challenge! Please keep reading ;) Some time ago it was my birthday, I'm 33 now. So there is this awkward social tradition consisting in ...
• 401
279 views

### Find the Closest Double Palindrome

Given a double-precision float, find the closest double-precision float whose binary representation is a palindrome. Input A floating point number x. You may use ...
• 2,898
1k views

### Emoticon numbers!

(related) Your challenge is to output the highest number you can. You can output as a number or as a string. You must output something that matches the regex ^\d+\$,...
2k views

### Fully-palindromic triangles

Consider the string 160615051. It can be "triangulated" as such: 1 606 15051 Then, each row is a palindrome. Also note ...
• 40.1k
5k views

### User Appreciation Challenge #1: Dennis ♦

I got the spontaneous idea of making a series of challenges of users that have helped and continue to help the PPCG community be an enjoyable place for everyone, or maybe just specifically for me. :P ...
• 42.4k
6k views

### Perfect Palindromes

Your task is to determine how much of a perfect palindrome a string is. Your typical palindrome (eg 12321) is a perfect palindrome; its perfectness is 1. To determine the perfectness of a string, you ...
• 16.4k
2k views

### Palindromic Primes without 11

Every palindrome with an even number of digits is divisible by 11, so 11 is the only [palindromic prime] with an even number of digits. - David Wasserman, OEIS I learned this today the manual way, ...
• 14k
4k views

### Never odd or even

Did you notice, that this is a palindrome? Input Non-negative integer number or string representing it Output 4 possible outputs, representing two properties of number: is it palindrome tricky #2 ...
• 3,434
1k views

### Palindromic Residue

Today, as I'm writing this, is March 31st. In the US, this is 3/31. I was playing around with 331 as a number to come up with a ...
• 43.4k
520 views

### Numbers that are palindromes in N bases

Given an non-negative integer $n \ge 0$, output forever the sequence of integers $x_i \ge 3$ that are palindromes in exactly $n$ different bases $b$, where the base can be $2 \le b le x_i-2$....
• 23.4k
1k views

### Number of string permutations that are palindromes

Your input will be a string consisting of small english letters. Your task is to determine the number of distinct permutations of the original string that are a palindrome. The input string has up ...
28k views

### I'm a palindrome. Are you?

There have been a couple of previous attempts to ask this question, but neither conforms to modern standards on this site. Per discussion on Meta, I'm reposting it in a way that allows for fair ...
1 vote
72 views

### Complete my palindrome [duplicate]

Create a function (preferably) or a program that takes an ordered collection and outputs the smallest possible palindrome that starts with the input. For example: ...
• 1,289
484 views

### Smallest Multiple to "Palindromize" [duplicate]

Goal: Given any non-zero natural number a, find the smallest non-zero natural number b such that ...
• 3,723
649 views

### The Essential™ (comment-free) Convenient Palindromic Quine Golf

A program is "conveniently palindromic" if it is equal to the string derived when its reverse has all its parentheses (()), brackets (...
• 1,446
3k views

### Goodness Giza Golf!

A "Giza number", also colloquially known as a Timmy Number is any number where the digits represent a pyramid (A134810). For example, "12321" is a giza number because it can be visualized like this: <...
• 59.3k
2k views

### Palindrome polyglot

Your task is to write a program that runs in two different languages, and does the following: In one language, it palindromizes a given string. Take the string. ...
• 10.6k