OFFSET
1,3
COMMENTS
A rotationally ambigrammatic number (A045574) is one that can be rotated by 180 degrees resulting in a readable, most often new number. Such numbers, by definition, can only contain the digits 0, 1, 6, 8, 9.
If the number once rotated happens to be the same number (e.g., 6889) it is a strobogrammatic number. Those present here are the terms of A018848.
Numbers such as 100, which is a square with trailing zeros, have been excluded. Such numbers rotated by 180 degrees would be written with leading zeros. Typically this is not the way we write numbers.
This sequence is infinite as it contains (10^k + 3)^2 and (3*10^k + 1)^2 for any k >= 0 (note also that A004086((10^k + 3)^2) = (3*10^k + 1)^2 when k > 0). - Rémy Sigrist, Dec 30 2020
LINKS
Wikipedia, Ambigram
FORMULA
a(n) = A339996(n)^2.
MATHEMATICA
Select[Range[0, 1000], (# == 0 || ! Divisible[#, 10]) && AllTrue[IntegerDigits[#^2], MemberQ[{0, 1, 6, 8, 9}, #1] &] &]^2 (* Amiram Eldar, Dec 30 2020 *)
PROG
(PARI) isra(n) = (n%10) && (!setminus(Set(Vec(Str(n))), Vec("01689"))) || !n; \\ A045574
isok(n) = issquare(n) && isra(n); \\ Michel Marcus, Dec 30 2020
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Philip Mizzi, Dec 30 2020
STATUS
approved