login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Denominator of Sum_{i = 1..n} (if(isprime(i), 0, 1/i)).
2

%I #20 Feb 21 2017 20:17:29

%S 1,1,1,4,4,12,12,24,72,360,360,360,360,2520,504,1008,1008,336,336,

%T 1680,1680,18480,18480,18480,92400,1201200,10810800,10810800,10810800,

%U 10810800,10810800,21621600,21621600,367567200,52509600,52509600,52509600,997682400,997682400

%N Denominator of Sum_{i = 1..n} (if(isprime(i), 0, 1/i)).

%H Robert Israel, <a href="/A282503/b282503.txt">Table of n, a(n) for n = 1..4573</a>

%e See examples in A282501.

%p S:= 0:

%p for n from 1 to 100 do

%p if not isprime(n) then S:= S+1/n fi;

%p A[n]:= denom(S);

%p od:

%p seq(A[i],i=1..100); # _Robert Israel_, Feb 21 2017

%t a[n_]=Sum[If[Element[k, Primes], 0, 1/k], {k, 1, n}]; Denominator /@ a /@ Range[1, 10]

%o (PARI) lista(nn) = {sr = 0; for (n=1, nn, if (!isprime(n), sr += 1/n); print1(denominator(sr), ", "););} \\ _Michel Marcus_, Feb 18 2017

%Y Cf. A018252 (nonprime numbers), A282501 (numerators).

%K nonn,frac

%O 1,4

%A _Ralf Steiner_, Feb 16 2017

%E More terms from _Michel Marcus_, Feb 18 2017