OFFSET
1,3
COMMENTS
a(2n) = 0, for all n >= 2.
LINKS
EXAMPLE
13 in binary is 1101. The distinct binary numbers that can be made by doubling any number of 1's are: 1101 (13 in decimal), 11011 (doubling the rightmost 1, getting 27 in decimal), 11101 (29), 111101 (61), 111011 (59), and 1111011 (123). Of these, four are primes (13, 29, 61, 59). So a(13) = 4.
PROG
(PARI) A163496(n, x=0, w=0, z=1) = if(1==n, isprime(x+2^w)+z*isprime(x+3*(2^w)), if(!(n%2), A163496(n/2, x, w+1, 1), A163496(n\2, x+(2^w), w+1, 0)+if(z, A163496(n\2, x+3*(2^w), w+2, z), 0))); \\ Antti Karttunen, Jan 30 2020
CROSSREFS
KEYWORD
AUTHOR
Leroy Quet, Jul 29 2009
EXTENSIONS
More terms from Sean A. Irvine, Oct 11 2009
STATUS
approved