cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A331591 a(n) is the number of distinct prime factors of A225546(n), or equally, number of distinct prime factors of A293442(n).

This page as a plain text file.
%I A331591 #47 Dec 23 2023 09:33:53
%S A331591 0,1,1,1,1,1,1,2,1,1,1,2,1,1,1,1,1,2,1,2,1,1,1,2,1,1,2,2,1,1,1,2,1,1,
%T A331591 1,1,1,1,1,2,1,1,1,2,2,1,1,2,1,2,1,2,1,2,1,2,1,1,1,2,1,1,2,2,1,1,1,2,
%U A331591 1,1,1,2,1,1,2,2,1,1,1,2,1,1,1,2,1,1,1,2,1,2,1,2,1,1,1,2,1,2,2,1,1,1,1,2,1
%N A331591 a(n) is the number of distinct prime factors of A225546(n), or equally, number of distinct prime factors of A293442(n).
%C A331591 a(n) is the number of terms in the unique factorization of n into powers of squarefree numbers with distinct exponents that are powers of 2. See A329332 for a description of the relationship between this factorization, canonical (prime power) factorization and A225546.
%C A331591 The result depends only on the prime signature of n.
%C A331591 a(n) is the number of distinct bit-positions where there is a 1-bit in the binary representation of an exponent in the prime factorization of n. - _Antti Karttunen_, Feb 05 2020
%C A331591 The first 3 is a(128) = a(2^1 * 2^2 * 2^4) = 3 and in general each m occurs first at position 2^(2^m-1) = A058891(m+1). - _Peter Munn_, Mar 07 2022
%H A331591 Antti Karttunen, <a href="/A331591/b331591.txt">Table of n, a(n) for n = 1..65537</a>
%H A331591 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%F A331591 a(n) = A001221(A293442(n)) = A001221(A225546(n)).
%F A331591 From _Peter Munn_, Jan 28 2020: (Start)
%F A331591 a(n) = A000120(A267116(n)).
%F A331591 a(n) = a(A007913(n)) + a(A008833(n)).
%F A331591 For m >= 2, a(A005117(m)) = 1.
%F A331591 a(n^2) = a(n).
%F A331591 (End)
%F A331591 a(n) <= A331740(n) <= A048675(n) <= A293447(n). - _Antti Karttunen_, Feb 05 2020
%F A331591 From _Peter Munn_, Mar 07 2022: (Start)
%F A331591 a(n) <= A299090(n).
%F A331591 a(A337533(n)) = A299090(A337533(n)).
%F A331591 a(A337534(n)) < A299090(A337534(n)).
%F A331591 max(a(n), a(k)) <= a(A059796(n, k)) = a(A331590(n, k)) <= a(n) + a(k).
%F A331591 (End)
%e A331591 From _Peter Munn_, Jan 28 2020: (Start)
%e A331591 The factorization of 6 into powers of squarefree numbers with distinct exponents that are powers of 2 is 6 = 6^(2^0) = 6^1, which has 1 term. So a(6) = 1.
%e A331591 Similarly, 40 = 10^(2^0) * 2^(2^1) = 10^1 * 2^2 = 10 * 4, which has 2 terms. So a(40) = 2.
%e A331591 Similarly, 320 = 5^(2^0) * 2^(2^1) * 2^(2^2) = 5^1 * 2^2 * 2^4 = 5 * 4 * 16, which has 3 terms. So a(320) = 3.
%e A331591 10^100 (a googol) factorizes in this way as 10^4 * 10^32 * 10^64. So a(10^100) = 3.
%e A331591 (End)
%t A331591 Array[PrimeNu@ If[# == 1, 1, Times @@ Flatten@ Map[Function[{p, e}, Map[Prime[Log2@ # + 1]^(2^(PrimePi@ p - 1)) &, DeleteCases[NumberExpand[e, 2], 0]]] @@ # &, FactorInteger[#]]] &, 105] (* _Michael De Vlieger_, Jan 24 2020 *)
%t A331591 f[e_] := Position[Reverse[IntegerDigits[e, 2]], 1] // Flatten; a[n_] := CountDistinct[Flatten[f /@ FactorInteger[n][[;; , 2]]]]; a[1] = 0; Array[a, 100] (* _Amiram Eldar_, Dec 23 2023 *)
%o A331591 (PARI) A331591(n) = if(1==n,0,my(f=factor(n),u=#binary(vecmax(f[, 2])),xs=vector(u),m=1,e); for(i=1,u,for(k=1,#f~, if(bitand(f[k,2],m),xs[i]++)); m<<=1); #select(x -> (x>0),xs));
%o A331591 (PARI) A331591(n) = if(1==n, 0, hammingweight(fold(bitor, factor(n)[, 2]))); \\ _Antti Karttunen_, Feb 05 2020
%o A331591 (PARI) A331591(n) = if(n==1, 0, (core(n)>1) + A331591(core(n,1)[2])) \\ _Peter Munn_, Mar 08 2022
%Y A331591 Cf. A000120, A005117, A048675, A225546, A267116, A293442, A293447, A299090, A329332, A337533, A337534.
%Y A331591 Sequences with related definitions: A001221, A331309, A331592, A331593, A331740.
%Y A331591 Positions of records: A058891.
%Y A331591 Positions of 1's: A340682.
%Y A331591 Sequences used to express relationships between the terms: A007913, A008833, A059796, A331590.
%K A331591 nonn
%O A331591 1,8
%A A331591 _Antti Karttunen_ and _Peter Munn_, Jan 21 2020