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.

A344581 Numbers k such that A034387(k) and A101203(k) are both prime.

Original entry on oeis.org

4, 7, 8, 15, 44, 311, 503, 507, 744, 843, 851, 955, 1164, 1256, 1287, 1307, 1312, 2163, 2171, 2244, 2247, 2368, 2412, 3143, 3160, 3872, 3875, 3952, 4584, 5088, 5236, 5355, 5364, 5380, 6211, 6303, 6307, 6587, 7243, 7244, 7436, 7439, 7860, 8220, 8268, 9167, 9283, 9515, 9519, 9632, 9692, 9915, 9919
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 24 2021

Keywords

Comments

Numbers k such that the sums of primes <= k and of nonprimes <= k are both prime (not necessarily distinct).
All terms == 0 or 3 (mod 4).

Examples

			a(3) = 8 is a term because A034387(8) = 2+3+5+7 = 17 and A101203(8) = 1+4+6+8 = 19 are prime.
		

Crossrefs

Cf. A034387, A101203. Intersection of A228102 and A344580.

Programs

  • Maple
    sp:= proc(n) option remember; if isprime(n) then procname(n-1)+[0,n] else procname(n-1)+[n,0] fi end proc:
    sp(1):= [1,0]:
    filter:= proc(n) andmap(isprime, sp(n)) end proc:
    select(filter, [$1..10000]);