OFFSET
1,5
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
EXAMPLE
10 = 1 + 9 = 2 + 8 = 3 + 7 = 4 + 6 therefore we have 4 different couples.
9 + 1 is not considered because it is the same couple as 1 + 9.
5 + 5 is not considered because we consider couples with different numbers.
MAPLE
P:=proc(n)local i, j, k, cc, lm, ok, count; for cc from 1 by 1 to n do if trunc(cc/2)*2=cc then lm:=cc/2-1 else lm:=trunc(cc/2) fi; count:=0; for i from 1 by 1 to lm do ok:=0; k:=i; while k>0 do j:=frac(k/10)*10; if j=0 then ok:=1; fi; k:=trunc(k/10); od; k:=cc-i; while k>0 do j:=frac(k/10)*10; if j=0 then ok:=1; fi; k:=trunc(k/10); od; if ok=1 then count:=count+1; fi; od; print(lm-count); od; end: P(1000);
PROG
(PARI) iszerofree(n) = vecmin(digits(n)) > 0
a(n) = sum(i = 1, (n-1)\2, iszerofree(i) && iszerofree(n-i)) \\ David A. Corneth, May 12 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Apr 13 2006
EXTENSIONS
Name edited and offset changed to 1 by David A. Corneth, May 12 2024
STATUS
approved