OFFSET
1,3
EXAMPLE
8 = 2^2 + 4; so for a(8) we want the number of terms among terms a(1), a(2),... a(7) which are coprime to a(4) = 3. So a(8) = 6.
PROG
(PARI) A118577(mmax)= { local(a, ncopr); a=[1]; for(m=0, mmax, for(k=1, 2^m, ncopr=0; for(i=1, 2^m+k-1, if( gcd(a[k], a[i])==1, ncopr++; ); ); a=concat(a, ncopr); ); ); return(a); } { print(A118577(6)); } - R. J. Mathar, May 30 2006
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, May 24 2006
EXTENSIONS
More terms from R. J. Mathar, May 30 2006
STATUS
approved