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!)
A254315 Number of distinct digits in the prime factorization of n (counting terms of the form p^1 as p). 3

%I #40 Mar 09 2015 06:07:43

%S 1,1,1,1,2,1,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,1,2,2,3,2,2,2,3,2,

%T 2,2,3,2,3,2,3,2,2,3,2,2,3,2,2,3,3,2,2,2,3,3,2,2,3,2,3,3,2,3,3,2,3,2,

%U 3,2,2,2,3,3,3,2,3,2,3,2,3,2,3,3,3,3,3

%N Number of distinct digits in the prime factorization of n (counting terms of the form p^1 as p).

%C Write n as product of primes raised to powers; then a(n) is the total number of distinct digits in product representation (number of distinct digits in all the primes and number of distinct digits in all the exponents that are greater than 1).

%C a(n)<=10. The least n such that a(n)=10 is n = 41701690 = 2*5*47*83*1069.

%C Property: a(p) = A043537(p), for p prime.

%C From _Michel Marcus_, Feb 21 2015: (Start)

%C For p in A038604, a(p^2) = A043537(p) + 1.

%C For p in A038611, a(p^3) = A043537(p) + 1.

%C For p in A038612, a(p^4) = A043537(p) + 1.

%C For p in A038613, a(p^5) = A043537(p) + 1.

%C For p in A038614, a(p^6) = A043537(p) + 1.

%C For p in A038615, a(p^7) = A043537(p) + 1.

%C For p in A038616, a(p^8) = A043537(p) + 1.

%C For p in A038617, a(p^9) = A043537(p) + 1.

%C (End)

%H Michel Lagneau, <a href="/A254315/b254315.txt">Table of n, a(n) for n = 2..10000</a>

%e a(36)=2 because 36 = 2^2 * 3^2 => 2 distinct digits.

%e a(414)=2 because 414 = 2 * 3^2 * 23 => 2 distinct digits.

%p with(ListTools):

%p nn:=100:

%p for n from 2 to nn do:

%p n0:=length(n):lst:={}:x0:=ifactors(n):

%p y:=Flatten(x0[2]):z:=convert(y,set):

%p z1:=z minus {1}:nn0:=nops(z1):

%p for k from 1 to nn0 do :

%p t1:=convert(z1[k],base,10):z2:=convert(t1,set):

%p lst:=lst union z2:

%p od:

%p nn1:=nops(lst):printf(`%d, `,nn1):

%p od :

%t f[n_] := Block[{pf = FactorInteger@ n, i}, Length@ DeleteDuplicates@ Flatten@ IntegerDigits@ Rest@ Flatten@ Reap@ Do[If[Last[pf[[i]]] == 1, Sow@ First@ pf[[i]], Sow@ FromDigits@ Flatten[IntegerDigits /@ pf[[i]]]], {i, Length@ pf}]]; Array[f,100] (* _Michael De Vlieger_, Jan 29 2015 *)

%o (PARI) print1(1,", ");for(k=2,100,s=[];F=factor(k);for(i=1,#F[,1],s=concat(s,digits(F[i,1]));if(F[i,2]>1,s=concat(s,digits(F[i,2]))));print1(#vecsort(s,,8),", ")) \\ _Derek Orr_, Jan 30 2015

%o (Python)

%o from sympy import factorint

%o def A254315(n):

%o ....return len(set([x for l in [[d for d in str(p)]+[d for d in str(e) if d != '1'] for p,e in factorint(n).items()] for x in l]))

%o # _Chai Wah Wu_, Feb 24 2015

%Y Cf. A027748, A043537, A050252, A254317.

%K nonn,base,easy

%O 2,5

%A _Michel Lagneau_, Jan 28 2015

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 10:43 EDT 2024. Contains 371967 sequences. (Running on oeis4.)