OFFSET
1,3
LINKS
Michel Marcus, Table of n, a(n) for n = 1..10000
EXAMPLE
For n = 7, the pairs (sum, difference) for k = 1..6 are (8, 6), (9, 5), (10, 4), (11, 3), (12, 2), (13, 1). The last two pairs are not allowed so a(7) = 4.
PROG
(PARI) ok(a, b)=length(setintersect(Set(digits(a+b)), Set(digits(a-b))))==0;
count(n)={c=0; for(k=1, n-1, if(ok(n, k), c++)); c};
a(limit)=vector(limit, n, count(n));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lars Blomberg, Oct 20 2019
STATUS
approved