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!)
A099850 Partial sums of A004648. 4
0, 1, 3, 6, 7, 8, 11, 14, 19, 28, 37, 38, 40, 41, 43, 48, 56, 63, 73, 84, 94, 107, 121, 138, 160, 183, 205, 228, 250, 273, 276, 279, 284, 287, 296, 303, 312, 323, 334, 347, 362, 375, 394, 411, 428, 443, 466, 497, 528, 557, 586, 617, 646, 681, 718, 757, 798, 837 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = Sum_{k=1..n} A004648(k).
EXAMPLE
A004648 begins: 0, 1, 2, 3, 1, 1, 3, 3, 5, 9, 9, ... so the partial sums are 0, 1, 3, 6, 7, 8, 11, 14, 19, 28, 37, ...
MATHEMATICA
Table[Sum[Mod[Prime[j], j], {j, n}], {n, 100}] (* G. C. Greubel, Apr 20 2023 *)
Accumulate[Table[Mod[Prime[n], n], {n, 100}]] (* Harvey P. Dale, Jun 14 2023 *)
PROG
(PARI) s=vector(100):s[1]=prime(1)%1:for(n=2, 100, s[n]=s[n-1]+prime(n)%n)
(Magma) [(&+[(NthPrime(k) mod k): k in [1..n]]): n in [1..100]]; // G. C. Greubel, Apr 20 2023
(SageMath)
def A004648(n): return (nth_prime(n)%n)
def A099850(n): return sum(A004648(k) for k in range(1, n+1))
[A099850(n) for n in range(1, 101)] # G. C. Greubel, Apr 20 2023
CROSSREFS
Cf. A004648.
Sequence in context: A047557 A342736 A284390 * A310132 A189659 A157041
KEYWORD
easy,nonn
AUTHOR
Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 27 2004
STATUS
approved

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 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)