The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A103502 Floor of Sum_{p prime <= n} (fractional part of n/p). 1

%I #9 Feb 06 2014 11:37:21

%S 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 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 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 Floor of Sum_{p prime <= n} (fractional part of n/p).

%e a(5) = [{5/2}+{5/3}+{5/5}] = [1/2 + 2/3 + 0] = 1.

%e a(6) = [{6/2}+{6/3}+{6/5}] = [0 + 0 + 1/5] = 0.

%t f[n_] := Floor[Plus @@ FractionalPart[n / Table[Prime[i], {i, PrimePi[ n]}]]]; Table[ f[n], {n, 103}]

%o (PARI) a(n) = {s = 0; forprime(p = 2, n, s+= frac(n/p);); floor(s);} \\ _Michel Marcus_, Feb 05 2014

%K nonn

%O 1,13

%A _Carlos Alves_, Feb 08 2005

%E More terms from _Robert G. Wilson v_, Feb 11 2005

%E Offset corrected by _Michel Marcus_, Feb 05 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 17 03:50 EDT 2024. Contains 373432 sequences. (Running on oeis4.)