This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A328842 #9 Nov 01 2019 18:40:01 %S A328842 0,0,0,0,2,2,0,0,0,0,2,2,6,6,6,6,8,8,12,12,12,12,14,14,18,18,18,18,20, %T A328842 20,0,0,0,0,2,2,0,0,0,0,2,2,6,6,6,6,8,8,12,12,12,12,14,14,18,18,18,18, %U A328842 20,20,30,30,30,30,32,32,30,30,30,30,32,32,36,36,36,36,38,38,42,42,42,42,44,44,48,48,48,48,50,50,60,60 %N A328842 Decrement each nonzero digit by one in primorial base representation of n, then convert back to decimal. %H A328842 Antti Karttunen, <a href="/A328842/b328842.txt">Table of n, a(n) for n = 0..30030</a> %H A328842 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %F A328842 a(n) = n - A328841(n). %F A328842 a(n) = A276085(A328572(n)) = A276085(A003557(A276086(n))). %F A328842 For all n >= 0, a(A276086(n)) = A328844(n). %F A328842 For all n >= 1, A328114(a(n)) = A328114(n) - 1. %o A328842 (PARI) A328842(n) = { my(p=2, r=1, s=0); while(n, if((n%p)>0, s += ((n%p)-1)*r); r *= p; n = n\p; p = nextprime(1+p)); (s); }; %Y A328842 Cf. A002110, A003557, A276085, A276086, A328114, A328572, A328841, A328844. %Y A328842 Cf. A276156 (positions of zeros). %Y A328842 Cf. A276009 for analogous sequence. %K A328842 nonn,base %O A328842 0,5 %A A328842 _Antti Karttunen_, Oct 30 2019