Questions tagged [palindrome]

Questions related to creating and determining palindromic numbers, words, lists and sub-lists. A palindromic sequence is a sequence that remains the same if we reverse it. An example of a numeral palindrome is "191". An example of a word palindrome is "noon".

Filter by
Sorted by
Tagged with
2 votes
1 answer

Palindrome by deleting a character

I need to find a list of strings with input string length n for whom are palindrome by deleting a character from it . The strings are stored inside function ...
Normal Student's user avatar
2 votes
2 answers

Creating a large database of all palindromic numbers

OEIS A002113, palindromes in base 10, shows a number of Mathematica constructs. I have used: ...
Hans Havermann's user avatar
4 votes
2 answers

Generating numbers palindromic in two number bases

The purpose of the code below is to generate numbers that are $2d+1$ digit palindromes in number base $b+1$, and are also palindromic in number base $b+3$, where: The ...
Vepir's user avatar
  • 622
2 votes
3 answers

Finding the largest palindrome which is the product of two 2-digit numbers

My goal is to find the largest palindrome which is the product of two 2-digit numbers using the following program. I want the program to add each palindrome it finds, to the list H. I also want it to ...
Joe's user avatar
  • 23
13 votes
5 answers

Largest palindrome from given string

Someone recently posted a request on LinkedIn for an algorithm to find the largest palindrome from a given string. I came up with this, which I believe does the trick, but I am wondering if there ...
Jonathan Kinlay's user avatar
3 votes
2 answers

How to find the palindromic number I'm looking for?

I'm looking for a number which is the same when you read it reverse like 101 or 878. I have to get all numbers from 10 to 1000. There are 99 numbers. {11,...,99,101,...,191,...,202,...,292,...,909,......
Masirius's user avatar
  • 231
2 votes
5 answers

Prime-palindromic number selected from a list

I want to find all prime-palindromic numbers up to 5000. Prime-palindromic numbers are numbers that themselves and their reverse digits are both primes. For example, 31 is a prime-palindromic number ...
Lawerance's user avatar
  • 517
4 votes
2 answers

What's wrong with my palindrome finding function?

I'm trying to find the palindromes in the dictionary, but my output isn't giving me all of them. I have this so far ...
jas's user avatar
  • 143
8 votes
5 answers

Better way to make a certain list with palindromic sublists

Here is my code, which works, but seems a little too long, I think might be a more refined version. ...
expression's user avatar
  • 5,562
5 votes
3 answers

Generating a list of pure variables

I want to pass a list of pure variables to a function, in which the ordering of the variables matters. For instance, if I want a palindrome, my function might be: ...
Ooku's user avatar
  • 891
5 votes
10 answers

How to find palindromic numbers (Project Euler #4)?

I'm trying to solve the fourth Project Euler's problem with this: ...
Red Banana's user avatar
  • 5,121
9 votes
2 answers

How can I get the list of dates in the next $n$ years

How can I get the list of all dates from today 21.02.2012 (which is a palindrome) up to say next $n$ years? Then finding the other palindromes are not difficult. I could not find an easy way to ...
PlatoManiac's user avatar
  • 14.6k
116 votes
9 answers

Functional style using lazy lists?

Let's say I want to answer the question "what are the first 400 palindromic prime numbers?" The first approach that comes to my mind from the set of languages that I know is to use some sort ...
sblom's user avatar
  • 6,413