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 A267263 #70 Nov 17 2016 10:18:01 %S A267263 0,1,1,2,1,2,1,2,2,3,2,3,1,2,2,3,2,3,1,2,2,3,2,3,1,2,2,3,2,3,1,2,2,3, %T A267263 2,3,2,3,3,4,3,4,2,3,3,4,3,4,2,3,3,4,3,4,2,3,3,4,3,4,1,2,2,3,2,3,2,3, %U A267263 3,4,3,4,2,3,3,4,3,4,2,3,3,4,3,4,2,3,3,4,3,4,1,2 %N A267263 Number of nonzero digits in representation of n in primorial base. %H A267263 Cade Brown, <a href="/A267263/b267263.txt">Table of n, a(n) for n = 0..10000</a> %H A267263 <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a> %F A267263 a(n) = A001221(A276086(n)). - _Antti Karttunen_, Aug 21 2016 %e A267263 a(3) = 2 because 3 written in primorial base is 11 with 2 nonzero digits. %p A267263 a:= proc(n) local m, p, r; m, p, r:= n, 2, 0; %p A267263 while m>0 do r:= r+`if`(irem(m, p, 'm')>0, 1, 0); %p A267263 p:= nextprime(p) %p A267263 od; r %p A267263 end: %p A267263 seq(a(n), n=0..100); # _Alois P. Heinz_, Jan 15 2016 %t A267263 Table[Length[IntegerDigits[n, MixedRadix@ Prime@ Reverse@ Range@ PrimePi@ n] /. 0 -> Nothing], {n, 0, 120}] (* _Michael De Vlieger_, Jan 12 2016, Version 10.2 *) %t A267263 f[n_] := Block[{a = {{0, n}}}, Do[AppendTo[a, {First@ #, Last@ #} &@ QuotientRemainder[a[[-1, -1]], Times @@ Prime@ Range[# - i]]], {i, 0, #}] &@ NestWhile[# + 1 &, 0, Times @@ Prime@ Range[# + 1] <= n &]; Rest[a][[All, 1]]]; Table[Count[f@ n, d_ /; d > 0], {n, 0, 73}] (* _Michael De Vlieger_, Aug 29 2016 *) %o A267263 (PARI) cnz(n) = my(d = digits(n)); sum(k=1, #d, d[k]!=0); %o A267263 A049345(n, p=2) = if(n<p, n, A049345(n\p, nextprime(p+1))*10 + n%p) %o A267263 a(n) = cnz(A049345(n)); \\ _Michel Marcus_, Jan 12 2016 %o A267263 (PARI) a(n)=my(s); forprime(p=2,, if(n%p, s++, if(n==0, return(s))); n\=p) \\ _Charles R Greathouse IV_, Nov 17 2016 %Y A267263 Cf. A001221, A002110, A049345, A235168, A276086. %Y A267263 Cf. A060735 (positions of ones). %Y A267263 A060130 is an analogous sequence for the factorial base, from which this differs for the first time at n=30, where a(30) = 1, while A060130(30) = 2. %K A267263 nonn,base %O A267263 0,4 %A A267263 _Cade Brown_, Jan 12 2016