A167678 Replace prime digits with 2 and nonprime digits with 1.
1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 11, 11, 12, 12, 11, 12, 11, 12, 11, 11, 21, 21, 22, 22, 21, 22, 21, 22, 21, 21, 21, 21, 22, 22, 21, 22, 21, 22, 21, 21, 11, 11, 12, 12, 11, 12, 11, 12, 11, 11, 21, 21, 22, 22, 21, 22, 21, 22, 21, 21, 11, 11, 12, 12, 11, 12, 11, 12, 11, 11, 21, 21, 22
Offset: 0
Programs
-
Mathematica
Table[FromDigits[If[PrimeQ[ # ],2,1]&/@IntegerDigits[n]],{n,0,200}]