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.

A083275 a(n) = smallest number not occurring earlier such that a(1)*a(2)*...*a(n) - 1 is prime.

Original entry on oeis.org

3, 1, 2, 4, 7, 5, 6, 11, 12, 10, 13, 17, 14, 16, 15, 8, 18, 23, 21, 26, 22, 27, 41, 30, 20, 57, 32, 29, 24, 65, 42, 38, 28, 63, 35, 19, 58, 31, 36, 61, 45, 37, 33, 69, 53, 67, 127, 40, 95, 25, 86, 48, 39, 72, 70, 79, 54, 74, 91, 125, 85, 94, 46, 9, 80, 60, 119, 167, 139, 90, 49
Offset: 1

Views

Author

Vladeta Jovovic, Jun 01 2003

Keywords

Crossrefs

Programs

  • Maple
    b:= proc() false end:
    m:= proc(n) option remember; a(n)*m(n-1) end: m(0):=1:
    a:= proc(n) option remember; local k; for k while b(k)
          or not isprime(k*m(n-1)-1) do od; b(k):=true; k
        end:
    seq(a(n), n=1..80); # Alois P. Heinz, Jun 17 2015
  • Mathematica
    p=1; L={}; Do[k=1; While[ MemberQ[L, k] || !PrimeQ[p*k - 1], k++]; p *= k; AppendTo[L, k], {30}]; L (* Giovanni Resta, Jun 23 2015 *)
  • PARI
    v=[3];n=1;while(n<100,s=-1+n*prod(i=1,#v,v[i]);if(isprime(s)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0);n++);v \\ Derek Orr, Jun 16 2015

Extensions

Name corrected by Derek Orr, Jun 16 2015