A324116 a(n) = A002487(1+A323247(n)) = A324288(A156552(n)).
1, 1, 1, 3, 1, 4, 1, 2, 5, 5, 1, 3, 1, 6, 7, 8, 1, 2, 1, 4, 9, 7, 1, 13, 7, 8, 5, 5, 1, 3, 1, 7, 11, 9, 10, 12, 1, 10, 13, 18, 1, 4, 1, 6, 8, 11, 1, 12, 9, 2, 15, 7, 1, 11, 13, 23, 17, 12, 1, 19, 1, 13, 11, 13, 16, 5, 1, 8, 19, 3, 1, 13, 1, 14, 7, 9, 13, 6, 1, 17, 10, 15, 1, 26, 19, 16, 21, 28, 1, 18, 17, 10, 23, 17, 22, 23, 1, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..16384
- Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537
- Index entries for sequences related to binary expansion of n
- Index entries for sequences computed from indices in prime factorization
- Index entries for sequences related to Stern's sequences
Programs
-
PARI
A002487(n) = { my(s=sign(n), a=1, b=0); n = abs(n); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (s*b); }; \\ So we use this one, modified from the one given in A002487 A005187(n) = { my(s=n); while(n>>=1, s+=n); s; }; A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n)))); A324288(n) = A002487(1+A005187(n)); A324116(n) = A324288(A156552(n));
Comments