[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
A373607
Sum of the odd-indexed digits in the primorial base representation (A049345) of n.
4
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,5
FORMULA
a(n) = A276150(n) - A373606(n).
a(n) = A373606(n) - A373605(n).
EXAMPLE
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.
PROG
(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); };
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 18 2024
STATUS
approved