# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a267263 Showing 1-1 of 1 %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, Table of n, a(n) for n = 0..10000 %H A267263 Index entries for sequences related to primorial base %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