login
Nonprimes whose prime factors contain only odd digits.
0

%I #17 Oct 13 2019 02:32:45

%S 1,9,15,21,25,27,33,35,39,45,49,51,55,57,63,65,75,77,81,85,91,93,95,

%T 99,105,111,117,119,121,125,133,135,143,147,153,155,159,165,169,171,

%U 175,177,185,187,189,195,209,213,217,219,221,225,231,237,243,245,247,255

%N Nonprimes whose prime factors contain only odd digits.

%e 247 = 13 * 19; 1, 3 and 9 are odd digits.

%p isA046446 := proc(n)

%p if not isprime(n) then

%p fset := numtheory[factorset](n) ;

%p for f in fset do

%p convert(convert(f,base,10),set) ;

%p if % intersect {0,2,4,6,8} <> {} then

%p return false;

%p end if;

%p end do:

%p true ;

%p else

%p false;

%p end if;

%p end proc:

%p for n from 1 to 260 do

%p if isA046446(n) then

%p printf("%d,",n) ;

%p end if;

%p end do: # _R. J. Mathar_, Oct 02 2018

%t Select[Range[255], ! PrimeQ[#] && And @@ OddQ[Union[Flatten[IntegerDigits[First /@ FactorInteger[#]]]]] &] (* _Jayanta Basu_, Jun 24 2013 *)

%Y Subsequence of A014076.

%K nonn,easy,base

%O 1,2

%A _Patrick De Geest_, Jul 15 1998

%E Definition clarified by _Harvey P. Dale_, Jul 07 2018