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.

A070858 Smallest prime == 1 mod L, where L = LCM of 1 to n.

Original entry on oeis.org

2, 3, 7, 13, 61, 61, 421, 2521, 2521, 2521, 55441, 55441, 4324321, 4324321, 4324321, 4324321, 85765681, 85765681, 232792561, 232792561, 232792561, 232792561, 10708457761, 10708457761, 26771144401, 26771144401, 401567166001, 401567166001, 18632716502401, 18632716502401
Offset: 1

Views

Author

Amarnath Murthy, May 16 2002

Keywords

Comments

Beginning with 3, smallest prime p = a(n) such that p + k is divisible by k + 1 for each k = 1, 2, ..., n. For example: 61 --> 62, 63, 64, 65 and 66 are divisible respectively by 2, 3, 4, 5 and 6. - Robin Garcia, Jul 23 2012

Crossrefs

Programs

  • Maple
    A070858 := proc(n)
        local l,p;
        l := ilcm(seq(i,i=1..n)) ;
        for p from 1 by l do
            if isprime(p) then
                return p;
            end if;
        end do:
    end proc; # R. J. Mathar, Jun 25 2013
  • Mathematica
    a[n_] := Module[{m = 1, lcm = LCM @@ Range[n]}, While[!PrimeQ[m], m += lcm]; m]; Array[a, 30] (* Amiram Eldar, Mar 15 2025 *)
  • PARI
    a(n)=my(L=lcm(vector(n,i,i)),k=1);while(!ispseudoprime(k+=L),); k \\ Charles R Greathouse IV, Jun 25 2013

Extensions

More terms from Sascha Kurz, Feb 02 2003