OFFSET
0,4
LINKS
FORMULA
a(n) = A261423(n-1) for all n>0. - M. F. Hasler, Sep 11 2015
MAPLE
# Pal has list of palindromes; palfloor is A261423
palfloor:=proc(n) global Pal; local i;
for i from 1 to nops(Pal) do
if Pal[i]=n then return(n); fi;
if Pal[i]>n then return(Pal[i-1]); fi;
od:
end;
prevpal:=proc(n) global palfloor;
if n=0 then return(0);
elif member(n, Pal) then return(palfloor(n-1));
else return(palfloor(n)); fi; end;
MATHEMATICA
lp[n_]:=Module[{k=n-1}, While[!PalindromeQ[k], k--]; k]; Join[{0}, Array[lp, 70]] (* Harvey P. Dale, Oct 17 2022 *)
PROG
(Haskell)
a261914 n = a261914_list !! n
a261914_list = f 0 a002113_list where
f n ps@(p:ps'@(p':_)) = p : f (n + 1) (if n < p' then ps else ps')
-- Reinhard Zumkeller, Sep 16 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Sep 10 2015
STATUS
approved