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.

Showing 1-5 of 5 results.

A253664 Partition the sequence A073682 into groups so that the sum of each group is prime, then a(n) is the sum of terms in n-th group.

Original entry on oeis.org

8893, 14699, 365587, 57097, 364183, 247369, 2225221, 251003, 2112923, 4197343, 174019, 7407013, 5711477, 2210773, 11243371, 884669, 6686107, 10585117, 26803823, 530063, 4427051, 3682759, 19362887, 4756019, 9065123, 4953593, 27207703, 14042257, 5587723, 13678729, 16995289, 15014777, 34884601, 21561341
Offset: 1

Views

Author

Zak Seidov, Jan 07 2015

Keywords

Comments

This is to A073682 as A073682 is to A000040. It is of interest to reiterate the map "Partition of sequence s into groups with prime sums".

Examples

			5,23,101,109,263,211,251,757,1367,941,2053,1901,911 gives a(1)=8893.
2347,1861,1187,1249,1303,2273,1433,1493,1553 gives a(2)=14699.
		

Crossrefs

A077277 Duplicate of A073682.

Original entry on oeis.org

5, 23, 101, 109, 263, 211, 251, 757, 1367, 941, 2053, 1901, 911, 2347, 1861, 1187
Offset: 1

Views

Author

Keywords

A073684 Sum of next a(n) successive primes is prime.

Original entry on oeis.org

2, 3, 5, 3, 5, 3, 3, 7, 9, 5, 9, 7, 3, 7, 5, 3, 3, 3, 5, 3, 3, 3, 5, 5, 57, 25, 49, 3, 9, 5, 11, 3, 5, 5, 5, 5, 17, 25, 3, 3, 5, 3, 7, 9, 5, 3, 3, 3, 15, 3, 3, 3, 3, 3, 3, 3, 15, 3, 5, 33, 5, 3, 3, 9, 7, 3, 33, 3, 3, 5, 3, 15, 3, 5, 9, 7, 13, 5, 11, 3, 3, 11
Offset: 1

Views

Author

Amarnath Murthy, Aug 11 2002

Keywords

Comments

Group the primes such that the sum of each group is a prime. Each group from the second onwards should contain at least 3 primes: (2, 3), (5, 7, 11), (13, 17, 19, 23, 29), (31, 37, 41), (43, 47, 53, 59, 61), ... Sequence gives number of terms in each group.

Examples

			a(1)=2 because sum of first two primes 2+3 is prime; a(2)=3 because sum of next three primes 5+7+11 is prime; a(3)=5 because sum of next five primes 13+17+19+23+29 is prime.
		

Crossrefs

Cf. 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.

Programs

  • Mathematica
    f[l_List] := Block[{n = Length[Flatten[l]], k = 3, r},While[r = Table[Prime[i], {i, n + 1, n + k}]; ! PrimeQ[Plus @@r], k += 2];Append[l, r]];Length /@ Nest[f, {{2, 3}}, 100] (* Ray Chandler, May 11 2007 *)
    cnt = 0; Table[s = Prime[cnt+1] + Prime[cnt+2]; len = 2; While[! PrimeQ[s], len++; s = s + Prime[cnt+len]]; cnt = cnt + len; len, {n, 100}] (* T. D. Noe, Feb 06 2012 *)
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        s, i, p = 0, 1, 2
        while True:
            while not(isprime(s:=s+p)) or i < 2:
                i, p = i+1, nextprime(p)
            yield i
            s, i, p = 0, 1, nextprime(p)
    print(list(islice(agen(), 82))) # Michael S. Branicky, May 23 2025

Extensions

More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Apr 10 2003
Extended by Ray Chandler, May 02 2007

A073683 Group the primes such that the sum of each group is a prime. Each group from the second onwards should contain at least 3 primes: (2, 3), (5, 7, 11), (13, 17, 19, 23, 29), (31, 37, 41), (43, 47, 53, 59, 61), ... This is the sequence of the leading element in each group.

Original entry on oeis.org

2, 5, 13, 31, 43, 67, 79, 97, 131, 179, 199, 257, 293, 313, 359, 389, 409, 431, 443, 467, 491, 509, 541, 571, 601, 991, 1163, 1523, 1549, 1607, 1627, 1723, 1747, 1787, 1831, 1873, 1907, 2039, 2243, 2269, 2287, 2333, 2347, 2389, 2459, 2521, 2543, 2557, 2593
Offset: 1

Views

Author

Amarnath Murthy, Aug 11 2002

Keywords

Comments

First prime of n-th group of successive primes in A073684.

Examples

			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; a(n) is the first term in n-th group; A077279(n) is the last term in n-th group.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        s, i, p = 0, 1, 2
        while True:
            pp = p
            while not(isprime(s:=s+p)) or i < 2:
                i, p = i+1, nextprime(p)
            yield pp
            s, i, p = 0, 1, nextprime(p)
    print(list(islice(agen(), 49))) # Michael S. Branicky, May 23 2025

Extensions

More terms from Zak Seidov, Nov 02 2002

A077279 Last prime of n-th group of successive primes in A073684.

Original entry on oeis.org

3, 11, 29, 41, 61, 73, 89, 127, 173, 197, 251, 283, 311, 353, 383, 401, 421, 439, 463, 487, 503, 523, 569, 599, 983, 1153, 1511, 1543, 1601, 1621, 1721, 1741, 1783, 1823, 1871, 1901, 2029, 2239, 2267, 2281, 2311, 2341, 2383, 2447, 2503, 2539, 2551, 2591
Offset: 1

Views

Author

Zak Seidov, Nov 02 2002

Keywords

Comments

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.

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        s, i, p = 0, 1, 2
        while True:
            while not(isprime(s:=s+p)) or i < 2:
                i, p = i+1, nextprime(p)
            yield p
            s, i, p = 0, 1, nextprime(p)
    print(list(islice(agen(), 48))) # Michael S. Branicky, May 23 2025
Showing 1-5 of 5 results.