A328841 Substitute ones for all nonzero digits in primorial base expansion of n, then convert back to decimal.
0, 1, 2, 3, 2, 3, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 6, 7, 8, 9, 8, 9, 30, 31, 32, 33, 32, 33, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 30, 31, 32, 33, 32, 33, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 36, 37, 38, 39, 38, 39, 30
Offset: 0
Links
Crossrefs
Programs
-
PARI
A328841(n) = { my(p=2, r=1, s=0); while(n, s += ((!!(n%p))*r); r *= p; n = n\p; p = nextprime(1+p)); (s); };