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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A173551 Palindromes in base 10 and in at least one other base (from 2 to 9). 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 33, 55, 88, 99, 111, 121, 141, 151, 171, 191, 212, 242, 252, 282, 292, 313, 333, 343, 373, 393, 414, 434, 464, 484, 555, 585, 626, 646, 656, 666, 676, 717, 757, 777, 787, 868, 939, 1221, 1441, 3663, 6886, 7447, 7667, 7777, 7997, 8778, 9009 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
Edray Herber Goins, Palindromes in Different Bases: A Conjecture of J. Ernest Wilkins, Integers 9 (2009), 725-734.
EXAMPLE
a(11) = 33 = {1,0,0,0,1} in base 2;
a(99) = 909909 = {3, 1, 3, 0, 0, 3, 1, 3} in base 6;
a(98) = 848848 = {1, 1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1, 1} in base 3.
MAPLE
N:= 6: # to get all terms of up to N digits
digrev:= proc(n) local L;
L:= convert(n, base, 10);
add(L[-i]*10^(i-1), i=1..nops(L));
end proc:
basepali:= proc(b, n)
local L;
L:= convert(n, base, b);
evalb(L = ListTools:-Reverse(L))
end proc:
Res:= $0..9:
for d from 2 to N do
if d::even then
m:= d/2;
Res:= Res, seq(n*10^m + digrev(n), n=10^(m-1)..10^m-1);
else
m:= (d-1)/2;
Res:= Res, seq(seq(n*10^(m+1)+y*10^m+digrev(n), y=0..9), n=10^(m-1)..10^m-1);
fi
od:
select(t -> ormap(basepali, [$2..9], t), [Res]); # Robert Israel, Oct 15 2014
MATHEMATICA
palQ[n_Integer, base_Integer]:=Block[{}, Reverse[idn=IntegerDigits[n, base]]==idn]
; 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 *)
palQ[n_, b_]:=Module[{idb=IntegerDigits[n, b]}, idb==Reverse[idb]]; pal2to9[n_]:=Total[Boole[ Table[palQ[n, b], {b, 2, 9}]]]>0; Select[Range[0, 10000], PalindromeQ[#]&&pal2to9[#]&] (* Harvey P. Dale, Jul 13 2023 *)
CROSSREFS
Cf. A165932.
Sequence in context: A261279 A295638 A357195 * A271534 A072482 A254958
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Term 0 prepended by Robert G. Wilson v, Oct 10 2014
Definition clarified by Harvey P. Dale, Jul 13 2023
STATUS
approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 18:00 EDT 2024. Contains 371750 sequences. (Running on oeis4.)