login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A095234 a(1) = 1, a(n) = n+a(n-1) if n does not divide a(n-1), else a(n) = n*a(n-1). 2
1, 3, 9, 13, 18, 108, 115, 123, 132, 142, 153, 165, 178, 192, 207, 223, 240, 258, 277, 297, 318, 340, 363, 387, 412, 438, 465, 493, 14297, 14327, 14358, 14390, 14423, 14457, 14492, 14528, 14565, 14603, 14642, 14682, 14723, 14765, 14808, 14852 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Where a(n) <> a(n-1)+n: 3, 6, 29, 116 and 348 and no others < 2*10^6. - Robert G. Wilson v, Jun 18 2004

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

EXAMPLE

a(29) = a(28)*29 = 493*29 = 14297 since 29 divides a(28) = 493 = 17*29.

MATHEMATICA

a[1] = 1; a[n_] := a[n] = If[Mod[a[n - 1], n] == 0, n*a[n - 1], a[n - 1] + n]

nxt[{n_, a_}]:={n+1, If[Divisible[a, n+1], a(n+1), a+n+1]}; NestList[nxt, {1, 1}, 50][[All, 2]] (* Harvey P. Dale, Jan 14 2017 *)

PROG

(PARI) m=44; print1(a=1, ", "); for(n=2, m, print1(a=if(a%n>0, n+a, n*a), ", ")) \\ Klaus Brockhaus, Jun 18 2004

CROSSREFS

Cf. A096155 for those n that divide a(n-1).

Sequence in context: A088090 A075326 A298870 * A240240 A032415 A268044

Adjacent sequences:  A095231 A095232 A095233 * A095235 A095236 A095237

KEYWORD

easy,nonn

AUTHOR

Amarnath Murthy, Jun 13 2004

EXTENSIONS

Edited and extended by Johan Claes, Klaus Brockhaus and Robert G. Wilson v, Jun 18 2004

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 2 20:25 EST 2021. Contains 349445 sequences. (Running on oeis4.)