The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A173551 Palindromes in base 10 and in one other base (from 2 to 9). 2

%I

%S 0,1,2,3,4,5,6,7,8,9,33,55,88,99,111,121,141,151,171,191,212,242,252,

%T 282,292,313,333,343,373,393,414,434,464,484,555,585,626,646,656,666,

%U 676,717,757,777,787,868,939,1221,1441,3663,6886,7447,7667,7777,7997,8778,9009

%N Palindromes in base 10 and in one other base (from 2 to 9).

%H Robert G. Wilson v, <a href="/A173551/b173551.txt">Table of n, a(n) for n = 1..510</a>

%H Edray Herber Goins, <a href="http://www.emis.de/journals/INTEGERS/papers/j55/j55.Abstract.html">Palindromes in Different Bases: A Conjecture of J. Ernest Wilkins</a>, Integers 9 (2009), 725-734.

%e a(11) = 33 = {1,0,0,0,1} in base 2;

%e a(99) = 909909 = {3, 1, 3, 0, 0, 3, 1, 3} in base 6;

%e a(98) = 848848 = {1, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1} in base 3.

%p N:= 6: # to get all terms of up to N digits

%p digrev:= proc(n) local L;

%p L:= convert(n,base,10);

%p end proc:

%p basepali:= proc(b,n)

%p local L;

%p L:= convert(n,base,b);

%p evalb(L = ListTools:-Reverse(L))

%p end proc:

%p Res:= \$0..9:

%p for d from 2 to N do

%p if d::even then

%p m:= d/2;

%p Res:= Res, seq(n*10^m + digrev(n), n=10^(m-1)..10^m-1);

%p else

%p m:= (d-1)/2;

%p Res:= Res, seq(seq(n*10^(m+1)+y*10^m+digrev(n), y=0..9), n=10^(m-1)..10^m-1);

%p fi

%p od:

%p select(t -> ormap(basepali,[\$2..9],t), [Res]); # _Robert Israel_, Oct 15 2014

%t palQ[n_Integer,base_Integer]:=Block[{},Reverse[idn=IntegerDigits[n,base]]==idn]

%t ; Select[Range[0, 10000], palQ[#,10] && (palQ[#,2] || palQ[#,3] || palQ[#,4] || palQ[#,5] || palQ[#,6] || palQ[#,7] || palQ[#,8] || palQ[#,9]) &] (* _Robert G. Wilson v_, Oct 10 2014 *)

%Y Cf. A165932.

%K nonn,base

%O 1,3

%A _José María Grau Ribas_, Feb 21 2010

%E Term 0 prepended by _Robert G. Wilson v_, Oct 10 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 5 07:43 EST 2023. Contains 360082 sequences. (Running on oeis4.)