OFFSET
0,3
COMMENTS
a(210) = 20 is the first term that differs from the variant "strip any leading or trailing digits 1 from n" [where digits 1 "protected" on both sides by digits different from 1 would be preserved]. Up to there, if a(n) is palindromic, then n is not in A359510, but if a(n) is non-palindromic and n is prime, then n is in A359510. - M. F. Hasler, Jan 23 2023
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
MATHEMATICA
Table[FromDigits[DeleteCases[IntegerDigits[n], 1]], {n, 0, 3000}] (* Zak Seidov, Dec 08 2010 *)
PROG
(PARI) a(n) = fromdigits(select(d -> d!=1, digits(n))) \\ Rémy Sigrist, Jul 13 2019
(Python) def A004176(n): return int(s) if (s:=str(n).replace('1', '')) else 0 # M. F. Hasler, Jan 23 2023
CROSSREFS
KEYWORD
AUTHOR
STATUS
approved