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 A328480 #6 Oct 19 2019 21:28:05 %S A328480 0,0,0,1,2,3,0,1,2,3,4,5,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17, %T A328480 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, %U A328480 26,27,28,29,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 %N A328480 a(0) = 0; for n > 0, a(n) = n - {the largest term of A129912 <= n}. %H A328480 Antti Karttunen, <a href="/A328480/b328480.txt">Table of n, a(n) for n = 0..30030</a> %H A328480 <a href="/index/Pri#primorial_numbers">Index entries for sequences related to primorial numbers</a> %o A328480 (PARI) %o A328480 isA129912(n) = { my(o=valuation(n, 2), t); if(o<1||n<2, return(n==1)); n>>=o; forprime(p=3, , t=valuation(n, p); n/=p^t; if(t>o || t<o-1, return(0)); if(t==0, return(n==1)); o=t); }; \\ From A129912 %o A328480 A328480(n) = if(!n,n, my(u=0); for(k=1, oo, if(isA129912(k), if(k==n, return(0), if(k>n, return(n-u), u = k))))); %Y A328480 Cf. A002110, A129912, A328481, A328482, A328483. %K A328480 nonn %O A328480 0,5 %A A328480 _Antti Karttunen_, Oct 19 2019