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

A086124 Primes generated by linear recursion: f(n) = prime(n) * f(n-1) + 2, f(1) = 1.

Original entry on oeis.org

5, 191, 8831183, 559832762721564181, 3655022053493602810873312808337814473758207442937
Offset: 1

Views

Author

Labos Elemer, Jul 23 2003

Keywords

Comments

f(n) = 1, 5, 27, 191, 2103, 27341, 464799, 8831183, 203117211, ... .
a(6) has 298 decimal digits.

Crossrefs

Programs

  • Mathematica
    f[x_] := Prime[x]*f[x-1]+2; f[1]=1; Do[s=f[n]; If[PrimeQ[s], Print[n]], {n, 1, 1000}]

Formula

a(n) = f(A086125(n)).

A086125 Values of k such that f(k) is a prime, where f(1) = 1, f(i) = prime(i)*f(i-1) + 2.

Original entry on oeis.org

2, 4, 8, 15, 31, 128, 163, 12284
Offset: 1

Views

Author

Labos Elemer, Jul 23 2003

Keywords

Comments

No additional terms up to k = 1000. - Harvey P. Dale, Feb 02 2019
No additional terms up to k = 20000. - Michael S. Branicky, May 31 2025

Crossrefs

The primes are in A086124.

Programs

  • Mathematica
    f[1]=1; f[x_] := f[x] = Prime[x]*f[x - 1] + 2; Do[ If[ PrimeQ[ f[n]], Print[n]], {n, 1, 1900}]
    nxt[{n_,a_}]:={n+1,a*Prime[n+1]+2}; Select[NestList[nxt,{1,1},200], PrimeQ[ #[[2]]]&][[All,1]] (* Harvey P. Dale, Feb 02 2019 *)

Extensions

Edited by Robert G. Wilson v, Jul 25 2003
a(8) from Michael S. Branicky, May 29 2025
Showing 1-2 of 2 results.