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.

A381149 a(1) = 2, a(2) = 3; thereafter, a(n) = a(n-1) + sum of prior prime terms.

This page as a plain text file.
%I A381149 #21 Feb 25 2025 14:54:42
%S A381149 2,3,8,13,31,80,129,178,227,503,1282,2061,2840,3619,4398,5177,5956,
%T A381149 6735,7514,8293,17365,26437,61946,97455,132964,168473,203982,239491,
%U A381149 275000,310509,346018,381527,798563,1215599,1632635,2049671,2466707,5350450,8234193,11117936
%N A381149 a(1) = 2, a(2) = 3; thereafter, a(n) = a(n-1) + sum of prior prime terms.
%H A381149 James C. McMahon, <a href="/A381149/b381149.txt">Table of n, a(n) for n = 1..10000</a>
%e A381149 For n=5, a(5) = a(4) + sum of prior primes = 13 + (2 + 3 + 13) = 31, so that 13 is counted twice.
%t A381149 Nest[Append[#,#[[-1]]+Total[Select[#,PrimeQ]]]&,{2,3},38]
%o A381149 (Python)
%o A381149 from sympy import isprime
%o A381149 from itertools import count, islice
%o A381149 def agen(): # generator of terms
%o A381149     yield from [2, 3]
%o A381149     primesum, an = 5, 3
%o A381149     while True:
%o A381149         an += primesum
%o A381149         if isprime(an): primesum += an
%o A381149         yield an
%o A381149 print(list(islice(agen(), 40))) # _Michael S. Branicky_, Feb 19 2025
%Y A381149 Cf. A101135, A119746, A131093, A381150.
%K A381149 nonn
%O A381149 1,1
%A A381149 _James C. McMahon_, Feb 15 2025