OFFSET
0,3
COMMENTS
Numbers which can be rotated are those having only decimal digits 0, 1, 2, 6, 7, 8, 9 (none of 3, 4, 5).
180-degree rotation is digit reversal and mapping 2 <-> 7 and 6 <-> 9 (and leading 0s are discarded from the result).
Digits 2 and 7 are taken to be 180-degree rotations of each other, though visually this may require a font designed to facilitate ambigrams.
MATHEMATICA
lst = {}; fQ[n_] := Block[{s = {0, 1, 2, 6, 7, 8, 9}, id = IntegerDigits[n]}, If[ Union[ Join[s, id ]] == s, AppendTo[lst, FromDigits[Reverse[(id /. {2 -> 7, 7 -> 2, 6 -> 9, 9 -> 6})]]], False]]; Select[ Range[0, 1000], fQ[#] &]; lst
PROG
(PARI) my(flip=[0, 1, 7, 9, 2, 8, 6]); \
a(n) = fromdigits([flip[d+1] |d<-Vecrev(digits(n, 7))]); \\ Kevin Ryde, Jan 18 2024
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Darrell W. Acree, Jan 17 2024
STATUS
approved