OFFSET
1,1
COMMENTS
Obviously n is in the sequence iff reverse(n) is in the sequence.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..10000
EXAMPLE
409 + 904 = 1313 has only odd digits, so 409 and 904 are in the sequence.
MATHEMATICA
odQ[n_]:=Module[{t=Count[IntegerDigits[n+FromDigits[Reverse[IntegerDigits[n]]]], _?EvenQ]}, t==0&&!Divisible[n, 10]]; Select[Range[700], odQ] (* Harvey P. Dale, Feb 20 2013 *)
PROG
(PARI) reverse(n, m)=n=[n]; while(n=divrem(n[1], 10), m=10*m+n[2]); m odd=Vec("13579"); for(i=1, 999, i%10&!setminus(Set(Vec(Str(i+reverse(i)))), odd)&print1(i", "))
(Python)
def ok(n): return n%10 and set(str(n + int(str(n)[::-1]))) <= set("13579")
print([k for k in range(620) if ok(k)]) # Michael S. Branicky, Aug 15 2022
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
M. F. Hasler, Dec 01 2007, Dec 05 2007
STATUS
approved