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.

A336041 Number of refactorable divisors of n.

This page as a plain text file.
%I A336041 #31 Feb 16 2025 08:34:00
%S A336041 1,2,1,2,1,2,1,3,2,2,1,3,1,2,1,3,1,4,1,2,1,2,1,5,1,2,2,2,1,2,1,3,1,2,
%T A336041 1,6,1,2,1,4,1,2,1,2,2,2,1,5,1,2,1,2,1,4,1,4,1,2,1,4,1,2,2,3,1,2,1,2,
%U A336041 1,2,1,9,1,2,1,2,1,2,1,5,2,2,1,4,1,2,1,4,1,4,1,2
%N A336041 Number of refactorable divisors of n.
%C A336041 Inverse Möbius transform of A336040. - _Antti Karttunen_, Nov 24 2021
%H A336041 Antti Karttunen, <a href="/A336041/b336041.txt">Table of n, a(n) for n = 1..65537</a>
%H A336041 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/RefactorableNumber.html">Refactorable Number</a>
%F A336041 a(n) = Sum_{d|n} c(d), where c(n) is the refactorable characteristic of n (A336040).
%F A336041 a(n) = Sum_{d|n} (1 - ceiling(d/tau(d)) + floor(d/tau(d))), where tau(n) is the number of divisors of n (A000005).
%F A336041 a(n) = A000005(n) - A349658(n). - _Antti Karttunen_, Nov 24 2021
%F A336041 a(p) = 1 for odd primes p. - _Wesley Ivan Hurt_, Nov 28 2021
%e A336041 a(6) = 2; The divisors of 6 are {1,2,3,6}. Only two of these divisors are refactorable since d(1) = 1|1 and d(2) = 2|2, but d(3) = 2 does not divide 3 and d(6) = 4 does not divide 6.
%e A336041 a(7) = 1; The divisors of 7 are {1,7} and d(1) = 1|1, but d(7) = 2 does not divide 7, so a(7) = 1.
%e A336041 a(8) = 3; The divisors of 8 are {1,2,4,8}. 1, 2 and 8 are refactorable since d(1) = 1|1, d(2) = 2|2 and d(8) = 4|8 but d(4) = 3 does not divide 4, so a(8) = 3.
%e A336041 a(9) = 2; The divisors of 9 are {1,3,9}. 1 and 9 are refactorable since d(1) = 1|1 and d(9) = 3|9 but d(3) = 2 does not divide 3. Thus, a(9) = 2.
%p A336041 A336041 := proc(n)
%p A336041     local a ;
%p A336041     a := 0 ;
%p A336041     for d in numtheory[divisors](n) do
%p A336041         if type(d/numtheory[tau](d),integer) then
%p A336041             a := a+1 ;
%p A336041         end if;
%p A336041     end do:
%p A336041     a ;
%p A336041 end proc:
%p A336041 seq(A336041(n),n=1..30) ; # _R. J. Mathar_, Nov 24 2020
%t A336041 a[n_] := DivisorSum[n, 1 &, Divisible[#, DivisorSigma[0, #]] &]; Array[a, 100] (* _Amiram Eldar_, Jul 08 2020 *)
%o A336041 (PARI) a(n) = sumdiv(n, d, d%numdiv(d) == 0); \\ _Michel Marcus_, Jul 07 2020
%Y A336041 Cf. A000005 (tau), A033950 (refactorable numbers), A336040 (refactorable characteristic), A349658 (number of nonrefactorable divisors).
%Y A336041 Cf. also A335182, A335665.
%K A336041 nonn,easy
%O A336041 1,2
%A A336041 _Wesley Ivan Hurt_, Jul 07 2020