A373607 Sum of the odd-indexed digits in the primorial base representation (A049345) of n.
0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 0, 0, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3, 4, 4, 2, 2, 3, 3, 4, 4, 2, 2, 3, 3, 4, 4, 2, 2, 3, 3, 4, 4, 2, 2, 3, 3, 4, 4, 3, 3, 4, 4, 5, 5, 3, 3, 4, 4, 5, 5, 3, 3, 4, 4
Offset: 0
Keywords
Examples
A049345(85) = 2401, and the sum of digits at the odd positions (with the rightmost digit having index 0) is 0+2 = 2, thus a(85) = 2.
Links
Programs
-
PARI
A373607(n) = { my(p=2, i=0, s=0); while(n, if(i%2, s += (n%p)); n = n\p; p = nextprime(1+p); i = !i); (s); };