OFFSET
1,1
COMMENTS
These numbers are also called upside-down numbers.
All terms belong to A052382 (zeroless numbers).
The central digit of the terms with an odd number of digits is always 5.
This sequence has similarities with A284811: here d_i + d_{k+1-i} = 10, there d_i + d_{k+1-i} = 9.
These numbers have a palindromic Morse code representation (see A060109). To get all numbers with this property one has to include 0 and terms with corresponding "interior" digits 5 replaced by digits 0, e.g., 5 -> 0, 159 -> 109, 555 -> 505, 1559 -> 1009, 15559 -> {10009, 10509, 15059}. - M. F. Hasler, Nov 02 2020
LINKS
Robert E. Kennedy and Curtis N. Cooper, Bach, 5465, and Upside-Down Numbers, The College Mathematics Journal, Vol. 18, No. 2 (Mar., 1987), pp. 111-115.
Giovanni Resta, Upside-down numbers, Numbers Aplenty.
EXAMPLE
1 + 9 = 10 and 5 + 5 = 10 and 9 + 1 = 10, hence 159 belongs to this sequence.
4 + 2 = 6, hence 42 does not belong to this sequence.
MAPLE
Res:= NULL;
for d from 1 to 3 do
for x from 0 to 9^(d-1)-1 do
L:= convert(9^(d-1)+x, base, 9)[1..d-1];
Res:= Res, 5*10^(d-1)+add((1+L[-i])*10^(2*d-1-i)+(9-L[-i])*10^(i-1), i=1..d-1)
od;
for x from 0 to 9^d-1 do
L:= convert(9^d+x, base, 9)[1..d];
Res:= Res, add((1+L[-i])*10^(2*d-i)+(9-L[-i])*10^(i-1), i=1..d)
od
od:
Res; # Robert Israel, Mar 06 2018
MATHEMATICA
Select[Range[4300], AllTrue[#1[[1 ;; #2]] + Reverse@ #1[[-#2 ;; -1]], # == 10 &] & @@ {#, Ceiling[Length[#]/2]} &@ IntegerDigits[#] &] (* Michael De Vlieger, Nov 04 2020 *)
PROG
(PARI) is(n) = my (d=digits(n)); Set(d+Vecrev(d))==Set(10)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Rémy Sigrist, Mar 05 2018
STATUS
approved