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.

A134181 Difference between cumulative prime and odd sums.

This page as a plain text file.
%I A134181 #15 Aug 09 2025 01:37:17
%S A134181 0,0,0,2,4,8,12,18,28,38,52,68,84,102,124,150,176,206,238,270,306,344,
%T A134181 386,434,484,534,586,638,692,758,826,898,970,1050,1130,1214,1302,1392,
%U A134181 1486,1584,1682,1788,1894,2002,2110,2228,2356,2486,2616,2748,2884,3020
%N A134181 Difference between cumulative prime and odd sums.
%C A134181 This sequence is the difference between A071148 and A005563, as seen in the following tabular example: first column is prime, 2nd is odd, 3rd is prime sum (A071148), 4th is odd sum (A005563), 5th is the difference at each summation, the prime sequence increasingly greater.
%C A134181 3 3 3 3 0
%C A134181 5 5 8 8 0
%C A134181 7 7 15 15 0
%C A134181 11 9 26 24 2
%C A134181 13 11 39 35 4
%C A134181 17 13 56 48 8
%C A134181 19 15 75 63 12
%C A134181 23 17 98 80 18
%C A134181 29 19 127 99 28
%C A134181 31 21 158 120 38
%F A134181 Beginning with 3 for both the prime and odd sequences, compute cumulative sums of both sequences and take the difference
%e A134181 a(2)=0 because for the prime sequence beginning at 3, the sum is 8 (3+5). For the odd sequence beginning at 3 the sum is also 8 (3+5) and 8-8=0.
%t A134181 lim=52;ps=Accumulate[Prime[Range[2,lim+1]]];os=Accumulate[Range[3,2lim+1,2]];ps-os (* _James C. McMahon_, Apr 05 2025 *)
%o A134181 (UBASIC)
%o A134181 10 N=1:A=2
%o A134181 20 A=nxtprm(A):B=B+A
%o A134181 30 N=N+2:D=D+N
%o A134181 40 print A;N;B;D;B-D:stop
%o A134181 50 C=C+1: if C<60 then 20
%Y A134181 Cf. A071148, A005563, A134182.
%K A134181 easy,nonn
%O A134181 1,4
%A A134181 _Enoch Haga_, Oct 13 2007