login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A175854 Number of anagrams of n that are divisible by exactly 3 primes (counted with multiplicity). 2

%I #43 Jan 15 2024 15:15:38

%S 0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,1,0,0,1,1,0,1,1,1,1,0,0,0,0,

%T 0,1,0,0,0,0,0,1,0,1,1,0,0,0,0,1,0,1,0,1,0,0,1,0,0,0,0,0,1,0,0,1,1,1,

%U 0,1,0,1,0,0,1,1,0,1,0,0,1,1,0,0,0,1,1,0,1,0,0,1,0,0,0,0,0,1,1,0

%N Number of anagrams of n that are divisible by exactly 3 primes (counted with multiplicity).

%C An anagram of a k-digit number is a permutation of the digits that does not begin with 0.

%C This is to A014612, as A131371 is to semiprimes A001358, and as A046810 is to primes A000040.

%C The first term > 1 is a(103)=2.

%H Robert Israel, <a href="/A175854/b175854.txt">Table of n, a(n) for n = 1..10000</a>

%e a(125) = 1 because 125 = 5^3 is divisible by exactly 3 primes (counted with multiplicity); 152 = 2^3 * 19 is in A014613 (quadruprimes); 215 = 5 * 43 is a semiprime; 251 is prime; 512 = 2^9; and 521 is prime.

%p N:= 10^3:

%p TP:= select(t -> numtheory:-bigomega(t)=3, {$1..N}):

%p f:= proc(n) local L,d,w,x,i;

%p L:= convert(n,base,10); d:= nops(L);

%p L:= select(t -> t[-1] <> 0, combinat:-permute(L));

%p L:= map(t-> add(t[i]*10^(i-1),i=1..d), L);

%p nops(convert(L,set) intersect TP)

%p end proc:

%p map(f, [$1..N]); # _Robert Israel_, Jan 15 2024

%o (Sage)

%o concat = lambda x: Integer(''.join(map(str, x)))

%o def A175854(n):

%o d3 = lambda x: sum(m for p,m in factor(x)) == 3

%o return sum(1 for p in Permutations(n.digits()) if p[0] != 0 and d3(concat(p))) # _D. S. McNeil_, Jan 25 2011

%Y Cf. A000040, A000142, A001358, A014612, A046810, A131371.

%K nonn,easy,base

%O 1

%A _Jonathan Vos Post_, Jan 24 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)