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.

A073682 Prime sum of n-th group of successive primes in A073684.

This page as a plain text file.
%I A073682 #16 May 23 2025 14:38:16
%S A073682 5,23,101,109,263,211,251,757,1367,941,2053,1901,911,2347,1861,1187,
%T A073682 1249,1303,2273,1433,1493,1553,2777,2927,44843,26699,65713,4597,14159,
%U A073682 8069,18439,5197,8819,9011,9277,9419,33599,53381,6761,6823,11497,7013
%N A073682 Prime sum of n-th group of successive primes in A073684.
%C A073682 Partition the sequence of primes into groups so that the sum of the terms in each group is prime: {2, 3}, {5, 7, 11}, {13, 17, 19, 23, 29}, {31, 37, 41}, {43, 47, 53, 59, 61}, {67, 71, 73}, {79, 83, 89}, {97, 101, 103, 107, 109, 113, 127}, {131, 137, 139, 149, 151, 157, 163, 167, 173}, {179, 181, 191, 193, 197}, ...; A073684(n) is the number of terms in n-th group; A073682(n) is the sum of terms in n-th group; A073683(n) is the first term in n-th group; A077279(n) is the last term in n-th group.
%H A073682 Zak Seidov, <a href="/A073682/b073682.txt">Table of n,a(n) for n = 1..3000</a>
%H A073682 Zak Seidov, <a href="/A073682/a073682.txt">Table of n, A073682(n), A073683(n), A073684(n), A077279(n) for n = 1..3000</a>
%e A073682 a(1)=5 because sum of first two primes 2+3 = 5 is prime;
%e A073682 a(2)=23 because sum of next three primes 5+7+11 = 23 is prime;
%e A073682 a(3)=101 because sum of next five primes 13+17+19+23+29 = 101 is prime.
%o A073682 (Python)
%o A073682 from itertools import count, islice
%o A073682 from sympy import isprime, nextprime
%o A073682 def agen(): # generator of terms
%o A073682     s, i, p = 0, 1, 2
%o A073682     while True:
%o A073682         while not(isprime(s:=s+p)) or i < 2:
%o A073682             i, p = i+1, nextprime(p)
%o A073682         yield s
%o A073682         s, i, p = 0, 1, nextprime(p)
%o A073682 print(list(islice(agen(), 42))) # _Michael S. Branicky_, May 23 2025
%Y A073682 Cf. A073683, A073684, A077279.
%K A073682 nonn
%O A073682 1,1
%A A073682 _Amarnath Murthy_, Aug 11 2002
%E A073682 More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Apr 10 2003