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!)
A173683 Sum of n mod p, for p=2, 3, 5, ..., smallest prime>=n. 1

%I #16 Nov 15 2012 18:53:23

%S 1,0,1,5,3,7,4,14,16,14,8,20,13,24,23,28,18,38,27,48,47,43,29,57,62,

%T 57,64,65,46,76,56,97,95,88,88,95,70,99,96,102,74,117,88,133,140,130,

%U 98,156,165,174,170,171,134,199,200,208,203,189,147,214

%N Sum of n mod p, for p=2, 3, 5, ..., smallest prime>=n.

%H Alois P. Heinz, <a href="/A173683/b173683.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 1 because (1 mod 2) = 1 where 2 = smallest prime >= 1.

%p a:= n-> add (n mod ithprime(i), i=1..numtheory[pi] (nextprime(n-1))):

%p seq (a(n), n=1..60); # _Alois P. Heinz_, Nov 25 2010

%Y Cf. A099726.

%K nonn

%O 1,4

%A _Juri-Stepan Gerasimov_, Nov 25 2010

%E More terms from _Alois P. Heinz_, Nov 25 2010

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 April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)