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.

A238760 Sum of column entries of the table with rows of prime numbers (2,3,0,0,...), (0,5,7,11,0,...), (0,0,13,17,19,23,0,...), (0,0,0,29,31,37,41,43,0,...), ...

This page as a plain text file.
%I A238760 #16 Feb 16 2018 12:36:26
%S A238760 2,8,20,57,97,186,286,447,623,914,1190,1633,2021,2642,3196,3997,4745,
%T A238760 5830,6792,8149,9345,11040,12502,14559,16323,18766,20894,23837,26313,
%U A238760 29712,32608,36539,39885,44364,48118,53227,57557,63322,68136,74585,80017,87168
%N A238760 Sum of column entries of the table with rows of prime numbers (2,3,0,0,...), (0,5,7,11,0,...), (0,0,13,17,19,23,0,...), (0,0,0,29,31,37,41,43,0,...), ...
%H A238760 Harvey P. Dale, <a href="/A238760/b238760.txt">Table of n, a(n) for n = 1..1000</a>
%F A238760 a(n) = sum(k=floor(n/2)...n+1, A000040(n+(k+1)*(k+2)/2-k) ). - _Ralf Stephan_, Mar 09 2014
%e A238760 2   3
%e A238760 0   5   7   11
%e A238760 0   0  13   17   19   23
%e A238760 0   0   0   29   31   37   41   43
%e A238760 0   0   0    0   47   53   59   61   67   71
%e A238760 0   0   0    0    0   73   79   83   89   97   101   103
%e A238760 ........................................................
%e A238760 sum of the first column = 2.
%e A238760 sum of the second column = 3 + 5 = 8.
%e A238760 sum of the third column = 7 + 13 = 20.
%e A238760 sum of the fourth column = 11 + 17 + 29 = 57.
%e A238760 sum of the fifth column = 19 + 31 + 47 = 97.
%e A238760 .............................................
%p A238760 with(numtheory):nn:=50:mm:=500:T:=array(1..nn,1..mm):for i from 1 to nn do:for j from 1 to mm do:T[i,j]:=0:od:od:m:=0:for n from 1 to nn do: for k from n to 2*n do: m:=m+1:T[n,k]:=ithprime(m):od:od:for p from 1 to nn do : s:=sum('T[q,p]', 'q'=1..nn): printf(`%d, `,s):od:
%t A238760 With[{nn=50},PadRight[#,nn]&/@(Join[Table[0,Length[#]-2],#]&/@ TakeList[ Prime[Range[((nn-1)(2+nn))/2]],Range[2,nn]])]//Total (* Requires Mathematica version 11 or later *) (* _Harvey P. Dale_, Feb 16 2018 *)
%o A238760 (Sage)
%o A238760 def a(n):
%o A238760     return sum([nth_prime((k+1)*(k+2)/2+n-k) for k in range(floor(n/2),n+1)])
%o A238760 # _Ralf Stephan_, Mar 09 2014
%Y A238760 Cf. A000040, A064694.
%K A238760 nonn
%O A238760 1,1
%A A238760 _Michel Lagneau_, Mar 05 2014