login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


A120762
a(1) = 2. a(n) = a(n-1)*(largest prime occurring earlier in the sequence) + 1.
2
2, 5, 26, 131, 17162, 2248223, 5054506657730, 11363658121561713791, 25548037553031840864343394, 57437685631589904363556698288863, 129132725903709949557948530897082440450
OFFSET
1,1
LINKS
EXAMPLE
Among the first 3 terms of the sequence, 5 is the largest prime. So a(4) = a(3)*5 +1 = 26*5 + 1 = 131.
MATHEMATICA
nxt[{lp_, a_}]:=Module[{c=a lp+1}, {If[PrimeQ[c]&&c>lp, c, lp], c}]; NestList[nxt, {2, 2}, 12][[;; , 2]] (* Harvey P. Dale, Apr 14 2023 *)
PROG
(PARI) {m=11; print1(a=2, ", "); v=[a]; for(n=2, m, b=a; v=vecsort(v); j=#v; a=0; while(a<1, k=v[j]; if(isprime(k), print1(a=b*k+1, ", "); v=concat(v, a), j--)))} - (Klaus Brockhaus, Aug 17 2006)
CROSSREFS
Cf. A120763.
Sequence in context: A090878 A214951 A333004 * A226170 A371614 A334639
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 03 2006
EXTENSIONS
More terms from Klaus Brockhaus, Aug 17 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 04:19 EDT 2024. Contains 376016 sequences. (Running on oeis4.)