|
| |
|
|
A117644
|
|
Number of distinct pairs a < b with nonzero decimal digits such that a + b = 10^n.
|
|
1
| |
|
|
4, 45, 369, 2961, 23697, 189585, 1516689, 12133521, 97068177, 776545425, 6212363409, 49698907281, 397591258257
(list; graph; refs; listen; history; internal format)
|
|
|
|
OFFSET
| 1,1
|
|
|
EXAMPLE
| 10 = 1 + 9 = 2 + 8 = 3 + 7 = 4 + 6 making 4 different pairs, thus a(1) = 4.
|
|
|
MAPLE
| P:=proc(n)local i, j, k, ok, count; count:=0; for i from 1 by 1 to n/2-1 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:=n-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(n/2-1-count); end: P(1000);
|
|
|
PROG
| (PARI) nonzerodigits(n)=while(n, if(n%10, n\=10, return(0))); 1
a(N)=N=10^N; sum(n=1, N/2-1, nonzerodigits(n)&nonzerodigits(N-n))
|
|
|
CROSSREFS
| Sequence in context: A120075 A123650 A122910 * A055602 A073565 A039657
Adjacent sequences: A117641 A117642 A117643 * A117645 A117646 A117647
|
|
|
KEYWORD
| nonn,base
|
|
|
AUTHOR
| Paolo P. Lava & Giorgio Balzarotti (paoloplava(AT)gmail.com), Apr 10 2006
|
|
|
EXTENSIONS
| Extension, new description and program from Charles R Greathouse IV (charles.greathouse(AT)case.edu), Aug 05 2010
a(9)-a(13) from Donovan Johnson (donovan.johnson(AT)yahoo.com), Aug 27 2010
|
| |
|
|