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-1 of 1 results.

A178899 Numbers which are both primes and problimes (third definition).

Original entry on oeis.org

2, 7, 11, 19, 23, 43, 53, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 1873, 1999, 2017, 2053, 2089, 2143, 2161, 2179, 2251, 2269, 2287, 2341, 2377, 2467, 2503, 2521, 2539, 2557, 2593, 2647, 2683, 2719, 2791, 2917, 2953, 2971, 3061, 3079
Offset: 1

Views

Author

Jonathan Vos Post, Dec 29 2010

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; local k;
          if n=1 then c(2):= 1; 2
                 else k:= ceil(b(n-1) +1/mul((1-1/b(j)), j=1..n-1));
                      c(k):= n; k
          fi
        end:
    a:= proc(n) option remember; local k;
          if n=1 then b(1)
                 else for k from c(a(n-1))+1 while not isprime(b(k))
                      do od; b(k)
          fi
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Dec 29 2010
  • Mathematica
    nmax = 400;
    b[n_] := b[n] = If[n==1, 2, Ceiling[b[n-1]+1/Product[1-1/b[j], {j, 1, n-1}]]];
    Intersection[Array[b, nmax], Prime[Range[PrimePi[b[nmax]]]]] (* Jean-François Alcover, Nov 20 2020 *)

Formula

A000040 INTERSECTION A003068.

Extensions

More terms from Alois P. Heinz, Dec 29 2010
Showing 1-1 of 1 results.