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.

A099042 Number of badly sieved (A066680) divisors of n.

This page as a plain text file.
%I A099042 #12 Dec 06 2021 10:12:50
%S A099042 0,1,1,1,1,2,1,2,1,2,1,3,1,2,2,2,1,3,1,2,2,2,1,4,1,2,2,2,1,4,1,2,2,2,
%T A099042 2,4,1,2,2,3,1,3,1,2,3,2,1,4,1,3,2,2,1,4,2,3,2,2,1,5,1,2,3,2,2,3,1,2,
%U A099042 2,4,1,5,1,2,3,2,2,3,1,4,2,2,1,4,2,2,2,3,1,6,2,2,2,2,2,4,1,3,2,3,1,3,1,3,4
%N A099042 Number of badly sieved (A066680) divisors of n.
%C A099042 A001221(n) <= a(n) <= A000005(n).
%H A099042 Antti Karttunen, <a href="/A099042/b099042.txt">Table of n, a(n) for n = 1..65537</a>
%F A099042 a(n) = Sum_{d|n} A099104(d). - _Antti Karttunen_, Jul 02 2018
%e A099042 a(24) = #{2,3,8,12} = 4; A099043(24) = 2+3+8+12 = 25;
%e A099042 a(25) = #{5} = 1; A099043(25) = 5;
%e A099042 a(26) = #{2,13} = 2; A099043(26) = 2+13 = 15.
%t A099042 b[n_] := b[n] = If[n == 1, 0, Product[If[n > d^2, 1, 1 - b[d]], {d, Select[Range[n - 1], Mod[n, #] == 0&]}]]; (* b is A099104 *)
%t A099042 a[n_] := Sum[b[d], {d, Divisors[n]}];
%t A099042 Array[a, 105] (* _Jean-François Alcover_, Dec 06 2021 *)
%o A099042 (PARI)
%o A099042 A099104(n) = if(1==n,0,my(m=1); fordiv(n,d,if((d<n)&&((d*d)>=n),m *= (1-A099104(d)))); (m));
%o A099042 A099042(n) = sumdiv(n,d,A099104(d)); \\ _Antti Karttunen_, Jul 02 2018
%Y A099042 Cf. A066680, A099104.
%K A099042 nonn
%O A099042 1,6
%A A099042 _Reinhard Zumkeller_, Sep 23 2004