OFFSET
1,3
EXAMPLE
Since 16 = 2^3 +8, a(16) equals the number of terms among (a(1),a(2),...a(15)) that are coprime to 8. Since the terms 1,1,9 and 3 are the only earlier terms coprime to 8, a(16) = 4.
MAPLE
A118982 := proc(nmax) local a, m, k, an, i; a := [1] ; m := 0 ; while 2^m <= nmax do for k from 1 to 2^m do an := 0 ; for i from 1 to nops(a) do if gcd(k, a[i]) = 1 then an := an +1 ; fi ; od ; a := [op(a), an] ; od ; m := m+1 ; od ; RETURN(a) ; end: an := A118982(100) : for n from 1 to nops(an) do printf("%d, ", an[n]) ; od ; # R. J. Mathar, Aug 06 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 25 2006
EXTENSIONS
More terms from R. J. Mathar, Aug 06 2006
STATUS
approved