cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A114255 Numbers that are nontrivial (3 digits or more) palindromes when expressed in some base 2 or greater.

This page as a plain text file.
%I A114255 #16 Jul 28 2016 11:25:22
%S A114255 5,7,9,10,13,15,16,17,20,21,23,25,26,27,28,29,31,33,34,36,37,38,40,41,
%T A114255 42,43,45,46,49,50,51,52,55,56,57,59,61,62,63,64,65,67,68,71,72,73,74,
%U A114255 78,80,81,82,83,85,86,88,89,91,92,93,97,98,99,100,101,104,105,107,109
%N A114255 Numbers that are nontrivial (3 digits or more) palindromes when expressed in some base 2 or greater.
%C A114255 All integers are trivially palindromes in base 1. All integers n>2 are trivially 2-digit palindromes because they can be represented as "11" in base n-1.
%e A114255 5 is present because the palindrome (101 base 2) = 5; 803 is present because (30203 base 4) = 803.
%t A114255 palindromeQ[n_, b_] := (id = IntegerDigits[n, b]) === Reverse[id] && Length[id] >= 3; palindromeQ[n_] := Or @@ (palindromeQ[n, #] & ) /@ Range[2, n-2]; Select[ Range[110], palindromeQ] (* _Jean-François Alcover_, Dec 16 2011 *)
%o A114255 (Haskell) isPalindrome s = (s == reverse s) digits 0 _ = [] digits n b = n `rem` b : digits (n `quot` b) b check n = any isPalindrome $ takeWhile (\x -> length x > 2) $ map (digits n) [2..] main = mapM print $ filter check [1..]
%o A114255 (PARI) isok(n) = for (b=2, n-1, if ((d=digits(n,b)) && (#d >= 3) && (Vecrev(d) == d), return (1));); \\ _Michel Marcus_, Jul 28 2016
%Y A114255 Cf. A060873-A060879, A060947-A060949, A123586.
%K A114255 easy,base,nonn
%O A114255 1,1
%A A114255 Jason Orendorff (jason.orendorff(AT)gmail.com), Feb 05 2006
%E A114255 Cross-references from _Charles R Greathouse IV_, Aug 04 2010