editing
approved
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”).
editing
approved
a:= n-> add (n mod ithprime(i), i=1..numtheory[pi] (nextprime(n-1))):
seq (a(n), n=1..60); # Alois P. Heinz, Nov 25 2010
proposed
editing
editing
proposed
editing
proposed
Sum of n mod p, for p = 2, 3, 5, ..., smallest prime >= n.
a(1) = 1 because (1 mod 2) = 1 where 2 = smallest prime >= 1.
approved
editing
Alois P. Heinz, <a href="/A173683/b173683_1.txt">Table of n, a(n) for n = 1..10000</a>
editing
approved
Alois P. Heinz, <a href="/A173683/b173683_1.txt">Table of n, a(n) for n = 1..100010000</a>
approved
editing
editing
approved