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.

A367687 a(n) is the first prime p such that n*p+1 is the product of n primes counted with multiplicity.

Original entry on oeis.org

2, 7, 17, 47, 79, 9479, 41, 5923, 199, 33461, 2141, 69173177, 11579, 7655281, 20753, 64869017, 233231, 2622816297743, 341477, 14508897313, 8138947, 24565981007, 27445337, 90698401133219401, 313566167, 2552728502809, 229909997, 23451738297083, 948780491, 20677177107714198558766009, 3390080033
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Nov 26 2023

Keywords

Examples

			a(3) = 17 because 17 is prime and 3 * 17 + 1 = 52 = 2^2 * 13 is the product of 3 primes, and no smaller prime works.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
      uses priqueue;
    local Q,t,q,i;
      initialize(Q);
      q:= 2;
      while n mod q = 0 do q:= nextprime(q) od:
      insert([-q^n,q,n],Q);
      do
        t:= extract(Q);
        if -t[1]-1 mod n = 0 and isprime((-t[1]-1)/n) then return (-t[1]-1)/n fi;
        q:= nextprime(t[2]);
        while n mod q = 0 do q:= nextprime(q) od;
        for i from 1 to t[3] do
          insert([t[1]*(q/t[2])^i,q,i],Q);
        od
      od;
    end proc:
    map(f, [$1..40]);

Formula

A001222(n*a(n)+1) = n.