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.

A119751 a(1) = 1; a(n) = first odd number greater than a(n-1) such that a(n) + a(i) + 1 is prime for all i=1,2,...,n.

Original entry on oeis.org

1, 3, 9, 69, 429, 4089, 86529, 513099, 913569, 7914339, 6593621379, 9366241599, 456246278469, 4565283812559
Offset: 1

Views

Author

Walter Kehowski, Jun 17 2006

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[n == 1, a[1] = 1, j = a[n - 1] + 2; While[a[n] = j; !
        AllTrue[Table[a[i] + a[n] + 1, {i, 1, n}], PrimeQ], j += 2]; j]
    , {n, 1, 7}] (* Robert Price, Apr 03 2019 *)
  • PARI
    isok(va, k, n) = if (isprime(2*k+1), for (i=1, n-1, if (! isprime(va[i]+k+1), return(0))); return(1));
    lista(nn) = my(va=vector(nn)); va[1]=1; for (n=2, nn, my(k=va[n-1]+2); while (!isok(va, k, n), k+=2); va[n] = k); va; \\ Michel Marcus, Mar 07 2023

Formula

2*a(n)+1 = A113875(n). - Don Reble, Aug 17 2021

Extensions

a(13)-a(14) from Donovan Johnson, Mar 23 2008
Corrected and edited by Walter Kehowski, Oct 18 2008