cp's OEIS Frontend

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.

A254621 Zerofree numbers having product of digits less than or equal to sum of digits.

This page as a plain text file.
%I A254621 #38 Jun 29 2019 11:54:30
%S A254621 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,21,22,31,41,51,61,71,81,
%T A254621 91,111,112,113,114,115,116,117,118,119,121,122,123,131,132,141,151,
%U A254621 161,171,181,191,211,212,213,221,231,311,312,321,411
%N A254621 Zerofree numbers having product of digits less than or equal to sum of digits.
%C A254621 Intersection of A052382 and A062996.
%C A254621 The repunit A002275(k), for k >= 2, appears  at position A254622(k-1) + 1. - _Wolfdieter Lang_, Feb 23 2015
%H A254621 David A. Corneth, <a href="/A254621/b254621.txt">Table of n, a(n) for n = 1..10000</a>
%p A254621 extend:= proc(t, b, d)
%p A254621   local i,j,m,s,p;
%p A254621   p:= t[2];
%p A254621   s:= t[3];
%p A254621   if s = 0  then if b=2 then j:= 3 else j:= 2 fi
%p A254621   else  for j from 0 to d-nops(t[1]) while p*b^j <= s + j*b do od
%p A254621   fi:
%p A254621   seq([[op(t[1]),b$i],p*b^i,s+i*b],i=0..j-1);
%p A254621 end proc:
%p A254621 f:= proc(d)
%p A254621    local j, b, Res;
%p A254621    Res:= [seq([[1$j],1,j],j=0..d)];
%p A254621    for b from 2 to 9 do
%p A254621      Res:= map(extend,Res,b,d)
%p A254621    od:
%p A254621    Res:= map(t -> op(combinat:-permute(t[1])),Res);
%p A254621    subs(0=NULL,sort(map(t -> add(t[i]*10^(i-1),i=1..nops(t)), Res)));
%p A254621 end proc:
%p A254621 f(5); # _Robert Israel_, May 19 2015
%t A254621 m[w_] := Flatten@Table[i, {i,9}, {w[[i]]}]; a[upd_] := Union@ Flatten@ Table[ FromDigits /@ Flatten[Permutations /@ m /@ Select[ Flatten[ Permutations /@ (IntegerPartitions[d + 9, {9}, Range[d + 1]] - 1), 1], Times @@ (Range[9]^#) <= Total[# Range[9]] &], 1], {d,  upd}]; a[12] (* terms with up to 12 digits, _Giovanni Resta_, May 19 2015 *)
%t A254621 zfnQ[n_]:=Module[{idn=IntegerDigits[n]},FreeQ[idn,0]&&Times@@idn <= Total[ idn]]; Select[Range[500],zfnQ] (* _Harvey P. Dale_, Jun 29 2019 *)
%o A254621 (PARI) is(n)={my(d=digits(n));my(p=prod(i=1,#d,d[i])); 0 < p && p<=vecsum(d) } \\ _David A. Corneth_, May 15 2015
%Y A254621 Cf. A052382, A062996, A062997, A062998, A062999, A254622, A002275.
%K A254621 nonn,base
%O A254621 1,2
%A A254621 _David A. Corneth_, Feb 03 2015