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.

A306345 Absolute difference between the number of prime divisors and the number of composite divisors of n.

This page as a plain text file.
%I A306345 #31 Feb 21 2019 09:22:53
%S A306345 0,1,1,0,1,1,1,1,0,1,1,1,1,1,1,2,1,1,1,1,1,1,1,3,0,1,1,1,1,1,1,3,1,1,
%T A306345 1,4,1,1,1,3,1,1,1,1,1,1,1,5,0,1,1,1,1,3,1,3,1,1,1,5,1,1,1,4,1,1,1,1,
%U A306345 1,1,1,7,1,1,1,1,1,1,1,5,2,1,1,5,1,1,1,3
%N A306345 Absolute difference between the number of prime divisors and the number of composite divisors of n.
%C A306345 Conjecture: a(n) = 0 iff n is a term of A280076 = union of A001248 and {1}.
%C A306345 Conjecture is true, since having an n with k distinct prime factors such that a(n) = 0 requires that 2k+1 can be factored into k parts > 1, and 1 is the only positive k for which this is possible. - _Charlie Neder_, Feb 12 2019
%H A306345 David A. Corneth, <a href="/A306345/b306345.txt">Table of n, a(n) for n = 1..10000</a>
%F A306345 a(n) = abs(A001221(n) - A055212(n)).
%F A306345 a(n) = abs(2*A001221(n) - A000005(n) + 1). - _Michel Marcus_, Feb 12 2019
%e A306345 For n = 24: The set of divisors of 24 is {1, 2, 3, 4, 6, 8, 12, 24}. The prime divisors are {2, 3} and the composite divisors are {4, 6, 8, 12, 24}. The cardinalities of the sets are 2 and 5, respectively, and abs(2-5) = 3, so a(24) = 3.
%t A306345 Array[Abs[2 PrimeNu@ # - DivisorSigma[0, #] + 1] &, 105] (* _Michael De Vlieger_, Feb 17 2019 *)
%o A306345 (PARI) a(n) = my(d=divisors(n), p=0, c=0); for(k=2, #d, if(ispseudoprime(d[k]), p++, c++)); abs(p-c)
%o A306345 (PARI) a(n) = abs(2*omega(n) - numdiv(n) + 1); \\ _Michel Marcus_, Feb 12 2019
%Y A306345 Cf. A000005, A001221, A001248, A055212, A280076.
%K A306345 nonn
%O A306345 1,16
%A A306345 _Felix Fröhlich_, Feb 08 2019
%E A306345 a(1)=0 prepended by _David A. Corneth_, Feb 12 2019