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!)
A175459 a(1)=4. a(n) = a(n-1) + n, if a(n-1)+n is composite. Otherwise a(n) = a(n-1)*n. 1
4, 6, 9, 36, 180, 186, 1302, 1310, 11790, 11800, 11811, 11823, 11836, 11850, 11865, 11881, 11898, 11916, 11935, 11955, 11976, 11998, 12021, 12045, 12070, 12096, 12123, 12151, 12180, 12210, 378510, 378542, 378575, 378609, 378644, 378680 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Each term is composite.
LINKS
MAPLE
A175459 := proc(n) option remember; if n =1 then 4; else if isprime( procname(n-1)+n) then procname(n-1)*n; else procname(n-1)+n ; end if; end if; end proc:
seq(A175459(n), n=1..120) ; # R. J. Mathar, May 28 2010
MATHEMATICA
nxt[{n_, a_}]:={n+1, If[CompositeQ[a+n+1], a+n+1, a(n+1)]}; NestList[nxt, {1, 4}, 40][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 11 2019 *)
CROSSREFS
Sequence in context: A291717 A303699 A292153 * A257652 A107665 A085733
KEYWORD
nonn
AUTHOR
Leroy Quet, May 20 2010
EXTENSIONS
More terms from R. J. Mathar, May 28 2010
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.)