login
A369235
The 180-degree rotations of those numbers which can be rotated 180 degrees, where digits 2 and 7 are 180-degree rotations of each other.
0
0, 1, 7, 9, 2, 8, 6, 1, 11, 71, 91, 21, 81, 61, 7, 17, 77, 97, 27, 87, 67, 9, 19, 79, 99, 29, 89, 69, 2, 12, 72, 92, 22, 82, 62, 8, 18, 78, 98, 28, 88, 68, 6, 16, 76, 96, 26, 86, 66, 1, 101, 701, 901, 201, 801, 601, 11, 111, 711, 911, 211, 811, 611, 71, 171, 771, 971, 271, 871, 671
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
Sequence in context: A316246 A249546 A336076 * A110793 A199290 A309644
KEYWORD
nonn,base,easy
AUTHOR
Darrell W. Acree, Jan 17 2024
STATUS
approved