login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = largest base-9 palindrome m <= n such that every base-9 digit of m is <= the corresponding digit of n; m is written in base 10.
1

%I #12 Jan 13 2020 12:01:28

%S 0,1,2,3,4,5,6,7,8,0,10,10,10,10,10,10,10,10,0,10,20,20,20,20,20,20,

%T 20,0,10,20,30,30,30,30,30,30,0,10,20,30,40,40,40,40,40,0,10,20,30,40,

%U 50,50,50,50,0,10,20,30,40,50,60,60,60,0,10,20,30,40,50,60,70,70,0,10,20,30,40,50,60,70,80,0,82,82

%N a(n) = largest base-9 palindrome m <= n such that every base-9 digit of m is <= the corresponding digit of n; m is written in base 10.

%H Robert Israel, <a href="/A265523/b265523.txt">Table of n, a(n) for n = 0..10000</a>

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

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

%p if L[1] = 0 then return 0 fi;

%p add(min(L[i],L[-i])*9^(i-1),i=1..nops(L))

%p end proc:

%p map(F, [$0..100]); # _Robert Israel_, Jan 13 2020

%Y Sequences related to palindromic floor and ceiling: A175298, A206913, A206914, A261423, A262038, and the large block of consecutive sequences beginning at A265509.

%K nonn,base,look

%O 0,3

%A _N. J. A. Sloane_, Dec 09 2015