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.

A099104 Characteristic function of badly sieved numbers (A066680).

This page as a plain text file.
%I A099104 #16 Jul 02 2018 20:24:31
%S A099104 0,1,1,0,1,0,1,1,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,0,0,0,1,0,1,1,1,0,0,0,
%T A099104 0,0,1,0,0,0,1,0,1,0,1,0,1,0,0,1,0,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,
%U A099104 0,1,1,0,1,0,1,0,0,0,1,1,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,1,0,1
%N A099104 Characteristic function of badly sieved numbers (A066680).
%C A099104 a(A066680(n)) = 1;
%C A099104 A066683(n)=Sum(a(k):1<=k<=n); A066682(n)=a(n)*A066683(n).
%H A099104 Antti Karttunen, <a href="/A099104/b099104.txt">Table of n, a(n) for n = 1..65537</a>
%H A099104 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A099104 a(n) = Prod(if n>d^2 then 1 else 1-a(d): d<n and n mod d = 0); a(1)=0.
%t A099104 a[1] = 0; a[n_] := a[n] = Product[ If[ n > d^2, 1, 1-a[d]], {d, Select[ Range[n-1], Mod[n, #] == 0 &] } ]; Table[ a[n], {n, 1, 105}](* _Jean-François Alcover_, Feb 15 2012, after formula *)
%o A099104 (PARI) A099104(n) = if(1==n,0,my(m=1); fordiv(n,d,if((d<n)&&((d*d)>=n),m *= (1-A099104(d)))); (m)); \\ _Antti Karttunen_, Jul 02 2018
%Y A099104 Cf. A066680, A066682, A066683, A099042.
%K A099104 nonn
%O A099104 1,1
%A A099104 _Reinhard Zumkeller_, Sep 26 2004