login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Multiplicative persistence of Woodall numbers.
1

%I #7 Apr 16 2014 00:23:19

%S 0,0,1,2,3,3,2,1,1,1,2,2,1,2,2,1,5,2,2,1,1,8,3,1,1,1,2,2,2,2,1,2,2,2,

%T 1,1,1,1,1,1,1,2,2,1,2,2,1,1,2,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,

%U 1,1,1,1,1,1,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

%N Multiplicative persistence of Woodall numbers.

%C After the 111th term, all the numbers have some digits equal to zero, thus the persistence is equal to 1.

%e Woodall number 159 --> 1*5*9=45 --> 4*5=20 --> 2*0=0 thus persistence is 3.

%p P:=proc(n) local i,k,w,ok,cont; for i from 1 by 1 to n do w:=1; k:=i*2^i-1; ok:=1; if k<10 then print(0); else cont:=1; while ok=1 do while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w<10 then ok:=0; print(cont); else cont:=cont+1; k:=w; w:=1; fi; od; fi; od; end: P(120);

%Y Cf. A003261, A131841.

%K easy,nonn,base

%O 1,4

%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 20 2007