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.
%I A357251 #21 Sep 29 2023 20:53:11 %S A357251 4,19,69,188,496,1029,2015,3478,5778,9519,14479,21768,31526,43609, %T A357251 59025,79218,105178,135739,173795,219164,271140,333629,406171,491878, %U A357251 594698,711959,842151,988848,1150168,1330177,1548617,1791098,2063454,2359107,2698231,3064708,3470396,3918157,4404795,4938846 %N A357251 a(n) = Sum_{1<=i<=j<=n} prime(i)*prime(j). %C A357251 a(n) is the sum of products of unordered pairs of (not necessarily distinct) elements from the first n primes. %C A357251 It appears that 4 is the only square in the sequence. %H A357251 Robert Israel, <a href="/A357251/b357251.txt">Table of n, a(n) for n = 1..10000</a> %F A357251 a(n) = (A007504(n)^2 + A024450(n))/2. %F A357251 a(n) = A024447(n) + A024450(n). %F A357251 a(n) = A065762(n)/2. - _Hugo Pfoertner_, Sep 24 2022 %e A357251 a(3) = 2*2 + 2*3 + 2*5 + 3*3 + 3*5 + 5*5 = 69. %p A357251 P:= [seq(ithprime(i),i=1..100)]: %p A357251 S:= ListTools:-PartialSums(P): %p A357251 ListTools:-PartialSums(zip(`*`,P,S)); %t A357251 Accumulate[(p = Prime[Range[40]]) * Accumulate[p]] (* _Amiram Eldar_, Sep 20 2022 *) %o A357251 (Python) %o A357251 from itertools import accumulate %o A357251 from sympy import prime, primerange %o A357251 def aupton(nn): %o A357251 p = list(primerange(2, prime(nn)+1)) %o A357251 return list(accumulate(c*d for c, d in zip(p, accumulate(p)))) %o A357251 print(aupton(40)) # _Michael S. Branicky_, Sep 24 2022 after _Amiram Eldar_ %Y A357251 Cf. A007504, A024447, A024450, A065762, A357252. %Y A357251 Partial sums of A143215. %Y A357251 Row n=2 of A343751. %K A357251 nonn %O A357251 1,1 %A A357251 _J. M. Bergot_ and _Robert Israel_, Sep 20 2022