OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
# given lists Primes of primes and Palis of palindromes, with Palis[-1] > Primes[-1]
m:= 1; A:= 'A':
for n from 1 to nops(Primes) do
while m < nops(Palis) and Palis[m+1] <= Primes[n] do m:= m+1 od:
A[n]:= Palis[m]
od:
seq(A[i], i=1..nops(Primes)); # Robert Israel, Apr 26 2016
MATHEMATICA
lpn[n_]:=Module[{k=0}, While[!PalindromeQ[n-k], k++]; n-k]; Table[lpn[n], {n, Prime[Range[60]]}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 18 2020 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Giovanni Teofilatto, Sep 06 2010
EXTENSIONS
Corrected by Robert Israel, Apr 26 2016
STATUS
approved