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

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120365 a(1) = 3, a(2) = 4. a(n) = (largest composite which occurs earlier in sequence) + (largest prime which occurs earlier in sequence). 1
3, 4, 7, 11, 15, 26, 37, 63, 100, 137, 237, 374, 511, 648, 785, 922, 1059, 1196, 1333, 1470, 1607, 3077, 4684, 6291, 7898, 9505, 11112, 12719, 14326, 15933, 17540, 19147, 20754, 22361, 23968, 25575, 27182, 28789, 55971, 84760, 113549, 142338, 171127 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MAPLE
A120365 := proc(nmax) local a, lcomp, lpr, anew ; a := [3, 4] ; lcomp := 4 ; lpr := 3 ; while nops(a) < nmax do anew := lcomp+lpr ; a := [op(a), anew] ; if isprime(anew) then lpr := max(lpr, anew) ; else lcomp := max(lcomp, anew) ; fi ; od ; RETURN(a) ; end ; print(A120365(80) ) ; # R. J. Mathar, Dec 16 2006
MATHEMATICA
lclp[{c_, p_, a_}]:=Module[{x=c+p, c1, p1}, If[PrimeQ[x], {p1=x, c1=c}, {p1=p, c1=x}]; {c1, p1, p+c}]; Join[{3, 4}, NestList[lclp, {4, 7, 7}, 50][[;; , 3]]] (* Harvey P. Dale, Jul 29 2023 *)
CROSSREFS
Sequence in context: A039010 A127208 A027022 * A166375 A177041 A357680
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 26 2006
EXTENSIONS
More terms from R. J. Mathar, Dec 16 2006
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | 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 April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)