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”).

A073700
a(1) = 1, a(n) = Floor[(Sum of composite numbers up to n)/(Sum of primes up to n)].
0
1, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 2, 2, 3, 3, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3
OFFSET
1,10
COMMENTS
Though the sequence is not monotonically increasing the average value increases and a derived sequence could be the smallest value of k for which a(k) = n.
Note 1 is neither composite nor prime.
FORMULA
a(n) = floor(A101256(n)/A034387(n)). - Jason Yuen, Aug 20 2024
EXAMPLE
a(10) = floor((4+6+8+9+10)/(2+3+5+7)) = floor(37/17) = 2.
MAPLE
a := 0:b := 0:for i from 2 to 300 do if isprime(i) then a := a+i: else b := b+i:fi: c[i] := floor(b/a):od:c[1] := 1:seq(c[j], j=1..300);
MATHEMATICA
Module[{nn=110, pr, comp}, pr=Prime[Range[PrimePi[nn]]]; comp=Complement[Range[ 2, nn], pr]; Join[{1}, Table[Floor[Total[Select[comp, #<=n&]]/Total[Select[pr, #<=n&]]], {n, 2, nn}]]] (* Harvey P. Dale, Feb 22 2013 *)
Join[{1}, Table[t1 = Select[x = Range[n], PrimeQ]; Floor[Divide @@ Plus @@@ {Rest[Complement[x, t1]], t1}], {n, 2, 105}]] (* Jayanta Basu, Jul 07 2013 *)
CROSSREFS
Sequence in context: A262618 A347447 A107577 * A226957 A108775 A300826
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 12 2002
EXTENSIONS
More terms from Sascha Kurz, Aug 15 2002
STATUS
approved