login
This site is supported by donations to The OEIS Foundation.
Logo

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). 1
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; 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.

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]

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: A163595 A088090 A075326 * A032415 A190745 A075318

Adjacent sequences:  A095231 A095232 A095233 * A095235 A095236 A095237

KEYWORD

easy,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jun 13 2004

EXTENSIONS

Edited and extended by Johan Claes (Johan.Claes(AT)luc.ac.be), Klaus Brockhaus (klaus-brockhaus(AT)t-online.de) and Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 18 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 06:13 EST 2012. Contains 205991 sequences.