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.

A185846 Primes in A002049.

Original entry on oeis.org

3, 7, 59, 197, 373, 701, 1009, 1571, 2749, 3581, 5701, 5881, 6247, 8269, 9397, 14369, 15881, 31019, 32707, 41801, 47269, 53633, 70177, 81931, 84701, 93239, 118369, 131213, 133873, 138373, 147661, 149561, 161159, 191929, 194069, 203857, 221813, 252823, 290161, 298201
Offset: 1

Views

Author

Jonathan Vos Post, Feb 06 2011

Keywords

Examples

			a(3) = A002049(8) = 59 = the 17th prime.
		

Crossrefs

Cf. A002049.

Programs

  • Python
    from itertools import count, accumulate, islice
    from collections import deque
    from sympy import isprime
    def A185846_gen(): # generator of terms
        aset, alist, c = set(), deque(), 0
        for k in count(1):
            if k in aset:
                aset.remove(k)
            else:
                c += k
                if isprime(c): yield c
                aset |= set(k+d for d in accumulate(alist))
                alist.appendleft(k)
    A185846_list = list(islice(A185846_gen(),40)) # Chai Wah Wu, Sep 01 2025

Extensions

More terms from Nathaniel Johnston, Feb 09 2011