OFFSET
1,1
LINKS
FORMULA
If n is greater than 2 and even, than a(n) is 8 followed by (n / 2) - 2 nines followed by another 8 followed by (n / 2) - 1 threes followed by 5. If n is greater than 2 and odd, than a(n) is 8 followed by (n / 2) - 1.5 nines followed by a 2 followed by (n / 2) - 1.5 threes followed by a 5.
EXAMPLE
a(2) = 75. If someone types 91 into a calculator and rotates it 180 degrees, they will get 16. 91 - 16 = 75. It is easy to check that no larger differences can be obtained.
MATHEMATICA
LinearRecurrence[{11, 0, -110, 100}, {3, 75, 825, 8835}, 30] (* Harvey P. Dale, Nov 13 2021 *)
PROG
(PARI) first(n) = {my(res = List([3, 75, 825, 8835, 89235, 898335, 8992335, 89983335])); for(i = #res + 1, n, listput(res, 11*res[#res] - 110*res[#res-2] + 100 * res[#res-3])); res} \\ David A. Corneth, Aug 05 2020
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Tanya Khovanova and Sergei Bernstein, Dec 29 2006
STATUS
approved