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.

This page as a plain text file.
%I A185846 #29 Sep 02 2025 21:57:14
%S A185846 3,7,59,197,373,701,1009,1571,2749,3581,5701,5881,6247,8269,9397,
%T A185846 14369,15881,31019,32707,41801,47269,53633,70177,81931,84701,93239,
%U A185846 118369,131213,133873,138373,147661,149561,161159,191929,194069,203857,221813,252823,290161,298201
%N A185846 Primes in A002049.
%H A185846 Chai Wah Wu, <a href="/A185846/b185846.txt">Table of n, a(n) for n = 1..8849</a>
%e A185846 a(3) = A002049(8) = 59 = the 17th prime.
%o A185846 (Python)
%o A185846 from itertools import count, accumulate, islice
%o A185846 from collections import deque
%o A185846 from sympy import isprime
%o A185846 def A185846_gen(): # generator of terms
%o A185846     aset, alist, c = set(), deque(), 0
%o A185846     for k in count(1):
%o A185846         if k in aset:
%o A185846             aset.remove(k)
%o A185846         else:
%o A185846             c += k
%o A185846             if isprime(c): yield c
%o A185846             aset |= set(k+d for d in accumulate(alist))
%o A185846             alist.appendleft(k)
%o A185846 A185846_list = list(islice(A185846_gen(),40)) # _Chai Wah Wu_, Sep 01 2025
%Y A185846 Cf. A002049.
%K A185846 nonn,changed
%O A185846 1,1
%A A185846 _Jonathan Vos Post_, Feb 06 2011
%E A185846 More terms from _Nathaniel Johnston_, Feb 09 2011