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!)
A196510 Smallest number greater than n that is palindromic in base 3 and base n. 1
6643, 4, 10, 26, 28, 8, 121, 10, 121, 244, 13, 28, 1210, 16, 68, 784, 1733, 20, 1604, 242, 23, 2096, 100, 26, 937, 28, 203, 3280, 1952, 160, 1249, 68, 280, 1366, 14483, 608, 11293, 40, 82, 5948, 7102, 484, 2069, 644, 1222, 4372, 784, 100, 6452, 52 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
MAPLE
ispal := proc(n, b)
dgs := convert(n, base, b) ;
for i from 1 to nops(dgs)/2 do
if op(i, dgs) <> op(-i, dgs) then
return false;
end if;
end do;
return true;
end proc:
A196510 := proc(n)
for k from n+1 do
if ispal(k, n) and ispal(k, 3) then
return k;
end if;
end do:
end proc:
seq(A196510(n), n=2..30) ; # R. J. Mathar, Oct 13 2011
MATHEMATICA
pal3n[n_]:=Module[{k=n+1}, While[IntegerDigits[k, 3]!=Reverse[ IntegerDigits[ k, 3]] || IntegerDigits[ k, n]!= Reverse[ IntegerDigits[k, n]], k++]; k]; Array[ pal3n, 60, 2] (* Harvey P. Dale, Jan 16 2022 *)
PROG
(Sage)
def A196510(n):
is_palindrome = lambda x, b=10: x.digits(b) == (x.digits(b))[::-1]
return next(k for k in IntegerRange(n+1, infinity) if is_palindrome(k, n) and is_palindrome(k, 3))
# D. S. McNeil, Oct 03 2011
CROSSREFS
Cf. A056749.
Sequence in context: A237792 A345571 A345827 * A293925 A048268 A043634
KEYWORD
nonn,base
AUTHOR
Kausthub Gudipati, Oct 03 2011
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 29 10:52 EDT 2024. Contains 372113 sequences. (Running on oeis4.)