OFFSET
1,1
COMMENTS
Example : 1/(7*2^5) = 0.0044642857(142857...) where 142857 is the period of 1/7, hence a(5)=44642857.
FORMULA
a(n)=(1/7)*(5^n*10^(n mod 6)-1).
Empirical g.f.: x*(-44640625*x^5+43750000*x^4+875000*x^3+17500*x^2+350*x+7) / (15625*x^7-15625*x^6-x+1). - Colin Barker, Jun 16 2013
PROG
(PARI) a(n)=(1/7)*(5^n*10^(n%6)-1)
(PARI) a(n)=if(n<0, 0, s=1; while(frac(10^s/7/2^n-1/7)>0, s++); floor(10^s/7/2^n))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Benoit Cloitre, Jan 29 2002; revised Dec 11, 2004
STATUS
approved