%I #14 Nov 10 2017 21:14:28
%S 11,23,101,113,131,167,211,233,311,431,863,1013,1021,1031,1061,1103,
%T 1201,1217,1223,1259,1301,1601,1619,1637,1721,1823,2003,2011,2111,
%U 2687,3011,3023,3203,4111,4703,6011,6047,6101,6173,6263,6911,7013
%N Primes p such that p+1 is divisible by the digital product (of nonzero digits) of p.
%C Contains A020449 and A107612 (except 2). - _Robert Israel_, Nov 09 2017
%H Robert Israel, <a href="/A081982/b081982.txt">Table of n, a(n) for n = 1..10000</a>
%e 167 is a term as 168 is divisible by 1*6*7 = 42.
%p filter:= proc(n)
%p isprime(n) and
%p n+1 mod convert(subs(0=NULL,convert(n,base,10)),`*`) = 0
%p end proc:
%p select(filter, [seq(i,i=3..10000,2)]); # _Robert Israel_, Nov 09 2017
%o (PARI) isok(p) = isprime(p) && (d=digits(p)) && !((p+1) % prod(k=1, #d, if (d[k], d[k], 1))); \\ _Michel Marcus_, Nov 09 2017
%Y Cf. A020449, A081981, A081983, A081984, A081986, A081987, A107612, A101987.
%K base,nonn
%O 1,1
%A _Amarnath Murthy_, Apr 04 2003
%E More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 06 2003
|