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.

Showing 1-4 of 4 results.

A060873 Intrinsic 3-palindromes: n is an intrinsic k-palindrome if it is a k-digit palindrome in some base.

Original entry on oeis.org

5, 7, 10, 13, 16, 17, 20, 21, 23, 25, 26, 29, 31, 34, 36, 37, 38, 41, 42, 43, 46, 49, 50, 51, 52, 55, 57, 59, 61, 62, 63, 64, 65, 67, 71, 72, 73, 74, 78, 80, 81, 82, 83, 85, 86, 88, 89, 91, 92, 93, 97, 98, 100, 101, 104, 105, 107, 109, 111, 113, 114, 117, 118
Offset: 1

Views

Author

Harvey P. Dale, May 05 2001

Keywords

Comments

All numbers are intrinsic 1- and (except 1 and 2) 2-palindromes, almost all numbers are intrinsic 3-palindromes and very few numbers are intrinsic k-palindromes for k >= 4.

Crossrefs

Programs

  • Mathematica
    testQ[n_, k_] := For[b = 2, b <= Ceiling[(n-1)^(1/(k-1))], b++, d = IntegerDigits[n, b]; If[Length[d] == k && d == Reverse[d], Return[True]]]; n0[k_] := 2^(k-1) + 1; Reap[Do[If[testQ[n, 3] === True, Print[n, " ", FromDigits[d], " b = ", b]; Sow[n]], {n, n0[3], 200}]][[2, 1]] (* Jean-François Alcover, Nov 07 2014 *)

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

Original entry on oeis.org

5, 7, 9, 10, 13, 15, 16, 17, 20, 21, 23, 25, 26, 27, 28, 29, 31, 33, 34, 36, 37, 38, 40, 41, 42, 43, 45, 46, 49, 50, 51, 52, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 71, 72, 73, 74, 78, 80, 81, 82, 83, 85, 86, 88, 89, 91, 92, 93, 97, 98, 99, 100, 101, 104, 105, 107, 109
Offset: 1

Views

Author

Jason Orendorff (jason.orendorff(AT)gmail.com), Feb 05 2006

Keywords

Comments

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.

Examples

			5 is present because the palindrome (101 base 2) = 5; 803 is present because (30203 base 4) = 803.
		

Crossrefs

Programs

  • 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..]
    
  • Mathematica
    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 *)
  • 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

Extensions

Cross-references from Charles R Greathouse IV, Aug 04 2010

A100563 Number of bases less than sqrt(n) in which n is a palindrome.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 2, 0, 1, 0, 1, 2, 1, 1, 1, 0, 2, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 0, 0, 1, 1, 2, 2, 0, 0, 2, 1, 2, 0, 1, 0, 1, 1, 2, 1, 3, 0, 2, 1, 0, 0, 1, 1, 2, 1, 0, 0, 0, 2, 0, 2, 1, 2, 1, 0, 3, 1, 0, 1, 1, 0, 2, 2, 2, 0, 0, 0, 1, 2, 1, 3, 1, 0, 0, 2, 2
Offset: 1

Views

Author

Gordon Hamilton, Nov 29 2004

Keywords

Comments

Is there a number m such that a(n) > 0 for all n > m? I call the set of numbers for which a(n)=0 "unkempt" for refusing to use a mirror in any base. Is there an infinite number of unkempt numbers? a(n) can be arbitrarily large.
The sequence A123586 gives the values of n where a(n)=0. - Robert G. Wilson v, Nov 01 2014
Is there a closed-form formula for this function? - Robert G. Wilson v, Nov 01 2014
From Robert G. Wilson v, Nov 26 2014: (Start)
The first occurrence, beginning at 0, of n is: 1, 5, 17, 65, 121, 562, 1432, 1477, 4369, 36582, 35101, 86677, 83161, 360361, 291721, 720721, 887041, 1496881, 1670761, 3931201, 3341521, 5654881, 7207201, 7761601,...
Positions where a(n)=k:
k = 0: A123586;
k = 1: 5, 7, 9, 10, 13, 15, 16, 20, 23, 25, 27, 28, 29, 33, 34, 36, 37, 38, 40, ...;
k = 2: 17, 21, 26, 31, 46, 51, 52, 55, 57, 63, 67, 73, 78, 80, 82, 91, 92, 93, 98, ...;
k = 3: 65, 85, 100, 130, 154, 164, 170, 178, 191, 195, 203, 209, 242, 282, 292, ...;
k = 4: 121, 235, 255, 257, 273, 300, 325, 341, 343, 373, 400, 495, 601, 610, 626, 666, ...;
k = 5: 562, 676, 771, 819, 1009, 1111, 1220, 1333, 1365, 1441, 1543, 1978, 1981, 2000, ...;
k = 6: 1432, 2380, 2666, 2925, 3280, 4035, 4095, 4161, 4225, 4401, 4525, 4561, 4681, ...;
k = 7: 1477, 4097, 4591, 7141, 7993, 8191, 9640, 10081, 10297, 10626, 10858, 11761, ...; etc.
(End)

Examples

			100 is a palindrome in bases 3, 7 and 9, so a(100) = 3.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Module[{p}, Table[ p = IntegerDigits[n, b]; If[p == Reverse@ p, {b, p}, Sequence @@ {}], {b, 2, Sqrt@ n}]]; Array[ Length@ f@# &, 105] (* Robert G. Wilson v, Nov 01 2014 *)
  • PARI
    a(n) = {my(nb = 0); for (b=2, sqrt(n), d = digits(n, b); nb+= (Vecrev(d) == d);); nb;} \\ Michel Marcus, Nov 05 2014

Formula

a(n) = A135551(n) - A033831(n). - Robert G. Wilson v, Nov 01 2014

Extensions

a(58) from Robert G. Wilson v, Nov 05 2014

A275220 a(n) is the smallest integer with at least n palindromic representations of length >= 3 in bases b >= 2.

Original entry on oeis.org

5, 17, 65, 121, 562, 1432, 1477, 4369, 35101, 35101, 83161, 83161, 291721, 291721, 720721, 887041, 1496881, 1670761, 3341521, 3341521, 5654881, 7207201, 7761601, 10810801, 12252241, 15135121, 21621601, 28274401, 28274401, 41081041, 41081041, 41081041
Offset: 1

Views

Author

Clive Stott, Jul 20 2016

Keywords

Comments

a(9) and a(10) are identical because there is no number less than 35101 with nine palindromic representations in different bases; likewise for a(11) and a(12), and for a(13) and a(14).

Crossrefs

Cf. A123586.

Programs

  • PARI
    isok(k, n) = sum(b=2, k-1, (d=digits(k,b)) && (#d >= 3) && (Vecrev(d) == d)) >= n;
    a(n) = my(j=1); while(! isok(j, n), j++); j; \\ Michel Marcus, Jul 28 2016

Extensions

a(17)-a(32) from Giovanni Resta, Jul 28 2016
Showing 1-4 of 4 results.