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.

A103502 Floor of Sum_{p prime <= n} (fractional part of n/p).

This page as a plain text file.
%I A103502 #9 Feb 06 2014 11:37:21
%S A103502 0,0,0,0,1,0,1,1,1,0,1,1,2,1,1,1,2,2,3,3,2,2,3,2,3,2,3,2,4,3,4,5,4,4,
%T A103502 3,3,4,4,4,3,5,3,5,5,4,4,6,5,6,6,5,5,7,6,6,6,5,5,7,5,7,7,6,7,7,6,7,7,
%U A103502 7,6,7,7,9,8,8,8,8,7,8,8,9,9,10,9,9,9,8,8,10,9,9,8,8,8,8,8,9,9,9,9,11,9,11
%N A103502 Floor of Sum_{p prime <= n} (fractional part of n/p).
%e A103502 a(5) = [{5/2}+{5/3}+{5/5}] = [1/2 + 2/3 + 0] = 1.
%e A103502 a(6) = [{6/2}+{6/3}+{6/5}] = [0 + 0 + 1/5] = 0.
%t A103502 f[n_] := Floor[Plus @@ FractionalPart[n / Table[Prime[i], {i, PrimePi[ n]}]]]; Table[ f[n], {n, 103}]
%o A103502 (PARI) a(n) = {s = 0; forprime(p = 2, n, s+= frac(n/p);); floor(s);} \\ _Michel Marcus_, Feb 05 2014
%K A103502 nonn
%O A103502 1,13
%A A103502 _Carlos Alves_, Feb 08 2005
%E A103502 More terms from _Robert G. Wilson v_, Feb 11 2005
%E A103502 Offset corrected by _Michel Marcus_, Feb 05 2014