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.

A099850 Partial sums of A004648.

This page as a plain text file.
%I A099850 #16 Jun 14 2023 13:53:13
%S A099850 0,1,3,6,7,8,11,14,19,28,37,38,40,41,43,48,56,63,73,84,94,107,121,138,
%T A099850 160,183,205,228,250,273,276,279,284,287,296,303,312,323,334,347,362,
%U A099850 375,394,411,428,443,466,497,528,557,586,617,646,681,718,757,798,837
%N A099850 Partial sums of A004648.
%H A099850 T. D. Noe, <a href="/A099850/b099850.txt">Table of n, a(n) for n = 1..10000</a>
%F A099850 a(n) = Sum_{k=1..n} A004648(k).
%e A099850 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, ...
%t A099850 Table[Sum[Mod[Prime[j], j], {j,n}], {n,100}] (* _G. C. Greubel_, Apr 20 2023 *)
%t A099850 Accumulate[Table[Mod[Prime[n],n],{n,100}]] (* _Harvey P. Dale_, Jun 14 2023 *)
%o A099850 (PARI) s=vector(100):s[1]=prime(1)%1:for(n=2,100,s[n]=s[n-1]+prime(n)%n)
%o A099850 (Magma) [(&+[(NthPrime(k) mod k): k in [1..n]]): n in [1..100]]; // _G. C. Greubel_, Apr 20 2023
%o A099850 (SageMath)
%o A099850 def A004648(n): return (nth_prime(n)%n)
%o A099850 def A099850(n): return sum(A004648(k) for k in range(1,n+1))
%o A099850 [A099850(n) for n in range(1,101)] # _G. C. Greubel_, Apr 20 2023
%Y A099850 Cf. A004648.
%K A099850 easy,nonn
%O A099850 1,3
%A A099850 Mark Hudson (mrmarkhudson(AT)hotmail.com), Oct 27 2004