login
Omit 1's from n.
6

%I #24 Oct 24 2023 20:38:21

%S 0,0,2,3,4,5,6,7,8,9,0,0,2,3,4,5,6,7,8,9,20,2,22,23,24,25,26,27,28,29,

%T 30,3,32,33,34,35,36,37,38,39,40,4,42,43,44,45,46,47,48,49,50,5,52,53,

%U 54,55,56,57,58,59,60,6,62,63,64,65,66,67,68,69,70,7,72,73,74

%N Omit 1's from n.

%C 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

%H Rémy Sigrist, <a href="/A004176/b004176.txt">Table of n, a(n) for n = 0..10000</a>

%t Table[FromDigits[DeleteCases[IntegerDigits[n],1]],{n,0,3000}] (* _Zak Seidov_, Dec 08 2010 *)

%o (PARI) a(n) = fromdigits(select(d -> d!=1, digits(n))) \\ _Rémy Sigrist_, Jul 13 2019

%o (Python) def A004176(n): return int(s) if (s:=str(n).replace('1','')) else 0 # _M. F. Hasler_, Jan 23 2023

%Y See A004720 for another version.

%Y Cf. A359510 (numbers that can't be written as a palindromic product).

%K nonn,base,look

%O 0,3

%A _N. J. A. Sloane_