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.

A227510 Numbers such that product of digits of n is positive and a substring of n.

This page as a plain text file.
%I A227510 #33 Dec 10 2024 14:29:38
%S A227510 1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,21,31,41,51,61,71,81,91,
%T A227510 111,112,113,114,115,116,117,118,119,121,126,131,141,151,153,161,171,
%U A227510 181,191,211,236,243,311,315,324,362,411,511,611,612
%N A227510 Numbers such that product of digits of n is positive and a substring of n.
%C A227510 All numbers with at least one zero digit have a product of digits which is a substring; these have been kept out by the restriction on positivity.
%C A227510 The sequence is infinite: if n is a term 10n+1 is also a term. Are there any other patterns (except for prepending 1 to any term)? - _Zak Seidov_, Jul 24 2013
%C A227510 You can also insert 1 in any position outside the substring that gives the product of digits. - _Robert Israel_, Aug 26 2014
%C A227510 See also A203566 for a nontrivial subsequence of A203565. The zeroless members of the latter differ from this sequence from 212 on which is there but not here, while 236 is the first here but not there. - _M. F. Hasler_, Oct 14 2014
%H A227510 Zak Seidov, <a href="/A227510/b227510.txt">Table of n, a(n) for n = 1..10000</a>
%e A227510 The product of the digits of 236 is 36, a substring of 236, and hence 236 is a member.
%p A227510 filter:= proc(n)
%p A227510   local L;
%p A227510   L:= convert(n,base,10);
%p A227510   if has(L,0) then return false fi;
%p A227510   verify(convert(convert(L,`*`),base,10),L,'sublist');
%p A227510 end proc:
%p A227510 select(filter, [$1..1000]); # _Robert Israel_, Aug 26 2014
%t A227510 Select[Range[650], FreeQ[x = IntegerDigits[#], 0] && MemberQ[FromDigits /@ Partition[x, IntegerLength[y = Times @@ x], 1], y] &]
%o A227510 (Python)
%o A227510 from operator import mul
%o A227510 from functools import reduce
%o A227510 A227510 = [int(n) for n in (str(x) for x in range(1, 10**5)) if not n.count('0') and str(reduce(mul, (int(d) for d in n))) in n]
%o A227510 # _Chai Wah Wu_, Aug 26 2014
%o A227510 (PARI) {isok(n)=d=digits(n);p=prod(i=1,#d,d[i]);k=1;while(p&&k<=(#d-#digits(p)+1),v=[];for(j=k,k+#digits(p)-1,v=concat(v,d[j]));if(v==digits(p),return(1));k++);return(0);}
%o A227510 n=1;while(n<10^4,if(isok(n),print1(n,", "));n++) \\ _Derek Orr_, Aug 26 2014
%o A227510 (PARI) is_A227510(n)={(t=digits(prod(i=1,#n=digits(n),n[i])))&&for(i=0,#n-#t,vecextract(n,2^(i+#t)-2^i)==t&&return(1))} \\ _M. F. Hasler_, Oct 14 2014
%Y A227510 Cf. A052018, A203565, A203566, A203569, A198298, A236402, A236403, A236404.
%K A227510 nonn,base
%O A227510 1,2
%A A227510 _Jayanta Basu_, Jul 14 2013
%E A227510 Edited by _M. F. Hasler_, Oct 14 2014