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.

A196415 Values of n such that (product of first n composite numbers) / (sum of first n composite numbers) is an integer.

This page as a plain text file.
%I A196415 #34 May 04 2019 21:51:11
%S A196415 1,4,7,10,13,15,16,21,32,33,56,57,60,70,77,80,83,84,88,92,93,97,112,
%T A196415 114,115,120,122,130,134,141,147,153,155,164,165,188,191,196,201,202,
%U A196415 213,222,225,226,229,243,245,248,252,260,264,265,268,273,274,281
%N A196415 Values of n such that (product of first n composite numbers) / (sum of first n composite numbers) is an integer.
%C A196415 A036691(a(n)) mod A053767(a(n)) = 0, A141092(n) = A036691(a(n)) / A053767(a(n)). [_Reinhard Zumkeller_, Oct 03 2011]
%H A196415 Arkadiusz Wesolowski, <a href="/A196415/b196415.txt">Table of n, a(n) for n = 1..10000</a>
%p A196415 # First define list of composite numbers:
%p A196415 tc:=[4,6,8,9,10,12,14,15,16,18,20,21,22,24,25,26,27,
%p A196415 28,30,32,33,34,35,36,38,39,40,42,44,45,46,48,49,
%p A196415 50,51,52,54,55,56,57,58,60,62,63,64,65,66,68,69,
%p A196415 70,72,74,75,76,77,78,80,81,82,84,85,86,87,88];
%p A196415 a1:=n->mul(tc[i],i=1..n);
%p A196415 a2:=n->add(tc[i],i=1..n);
%p A196415 sn:=[];
%p A196415 s0:=[];
%p A196415 s1:=[];
%p A196415 s2:=[];
%p A196415 for n from 1 to 40 do
%p A196415   t1:=a1(n)/a2(n);
%p A196415   if whattype(t1) = integer then
%p A196415    sn:= [op(sn),n];
%p A196415    s0:= [op(s0),t1];
%p A196415    s1:= [op(s1),a1(n)];
%p A196415    s2:= [op(s2),a2(n)];
%p A196415 fi;
%p A196415 od:
%p A196415 sn; s0; s1; s2;
%p A196415 # alternatively
%p A196415 for n from 1 to 1000 do
%p A196415         if type(A036691(n)/A053767(n),'integer') then
%p A196415                 printf("%d,",n);
%p A196415         end if;
%p A196415 end do: # _R. J. Mathar_, Oct 03 2011
%t A196415 c = Select[Range[2,355], ! PrimeQ@# &]; p = 1; s = 0; Select[Range@ Length@c, Mod[p *= c[[#]], s += c[[#]]] == 0 &] (* _Giovanni Resta_, Apr 03 2013 *)
%o A196415 (Haskell)
%o A196415 import Data.List (elemIndices)
%o A196415 a196415 n = a196415_list !! (n-1)
%o A196415 a196415_list =
%o A196415    map (+ 1) $ elemIndices 0 $ zipWith mod a036691_list a053767_list
%o A196415 -- _Reinhard Zumkeller_, Oct 03 2011
%Y A196415 Cf. A051838, A141090, A141091, A141092.
%K A196415 nonn
%O A196415 1,2
%A A196415 _N. J. A. Sloane_, Oct 02 2011
%E A196415 More terms from _Arkadiusz Wesolowski_, Oct 03 2011