login
Every divisor (except 1) contains the digit 4.
18

%I #18 Sep 08 2022 08:45:03

%S 41,43,47,149,241,347,349,401,409,419,421,431,433,439,443,449,457,461,

%T 463,467,479,487,491,499,541,547,641,643,647,743,941,947,1049,1249,

%U 1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487

%N Every divisor (except 1) contains the digit 4.

%H Amiram Eldar, <a href="/A062669/b062669.txt">Table of n, a(n) for n = 1..10000</a>

%e 1849 has divisors 1, 43 and 1849, the last two of which contain the digit 4.

%t fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 1500], fQ[#, 4] &] (* _Robert G. Wilson v_, Jun 11 2014 *)

%t Select[Range[2,1500],AllTrue[Rest[Divisors[#]],DigitCount[#,10,4]>0&]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jun 05 2021 *)

%o (Magma) [k:k in [2..1500]| forall{d:d in Set(Divisors(k)) diff {1}| 4 in Intseq(d)}];// _Marius A. Burtea_, Nov 07 2019

%Y Cf. A062653, A062664, A062667, A062668, A062670, A062671, A062672, A062673, A062674, A062675, A062676, A062677, A062678, A062679, A062680.

%K base,easy,nonn

%O 1,1

%A _Erich Friedman_, Jul 04 2001

%E Offset corrected by _Amiram Eldar_, Nov 07 2019

%E Example corrected by _Harvey P. Dale_, Jun 05 2021