login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A331749
a(n) = A002487(A163511(n)) - A002487(n).
3
1, 0, 0, 0, 0, 1, 0, 0, 0, 4, 1, 2, 0, -1, 0, -1, 0, 9, 4, 4, 1, 10, 2, 2, 0, 5, -1, 1, 0, 1, -1, 0, 0, 16, 9, 34, 4, 23, 4, 37, 1, 5, 10, 10, 2, 14, 2, 4, 0, 7, 5, 11, -1, 5, 1, 6, 0, -4, 1, 0, -1, -3, 0, -1, 0, 57, 16, 116, 9, 98, 34, 84, 4, 69, 23, 103, 4, 9, 37, 98, 1, 52, 5, 70, 10, 19, 10, 39, 2, 19, 14, 38, 2, 34, 4, 18, 0, 39
OFFSET
0,10
FORMULA
a(n) = A323901(n) - A002487(n) = A002487(A163511(n)) - A002487(n).
a(2^n) = 0 for all n >= 0.
PROG
(PARI)
A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
A054429(n) = ((3<<#binary(n\2))-n-1); \\ From A054429
A163511(n) = if(!n, 1, A005940(1+A054429(n)));
A331749(n) = (A002487(A163511(n)) - A002487(n));
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 05 2020
STATUS
approved