login
A118577
a(1) = 1. For m >= 0 and 1 <= k <= 2^m, a(2^m +k) = number of earlier terms of the sequence which are coprime to a(k).
1
1, 1, 2, 3, 4, 5, 4, 6, 8, 9, 5, 8, 6, 11, 7, 6, 16, 17, 9, 13, 11, 19, 13, 11, 15, 18, 23, 17, 14, 26, 28, 14, 32, 33, 19, 26, 20, 33, 21, 15, 23, 29, 37, 26, 18, 40, 41, 19, 28, 47, 37, 46, 47, 50, 49, 50, 37, 25, 55, 57, 33, 35, 34, 34, 64, 65, 39, 51, 41, 57, 43, 31, 45, 54, 61
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
Sequence in context: A324196 A269597 A233775 * A377070 A135681 A135680
KEYWORD
nonn
AUTHOR
Leroy Quet, May 24 2006
EXTENSIONS
More terms from R. J. Mathar, May 30 2006
STATUS
approved