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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A083524 a(1) = 1, a(n) = a(n-1)*n if n is a prime, a(n) = a(n-1)+ n if n is composite. 3
1, 2, 6, 10, 50, 56, 392, 400, 409, 419, 4609, 4621, 60073, 60087, 60102, 60118, 1022006, 1022024, 19418456, 19418476, 19418497, 19418519, 446625937, 446625961, 446625986, 446626012, 446626039, 446626067, 12952155943 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Michael De Vlieger, Table of n, a(n) for n = 1..2356

MAPLE

a := proc(n) option remember: if n=1 then RETURN(1) fi: if isprime(n) then RETURN(a(n-1)*n) else RETURN(a(n-1)+n) fi: end: for n from 1 to 50 do printf(`%d, `, a(n)) od: # James A. Sellers, May 19 2003

MATHEMATICA

a083524[n_] := Block[{i, t = Table[1, {n}]},

  For[i = 1, i < n,

   If[PrimeQ[i], t[[i]] = t[[i - 1]]*i, t[[i]] = t[[i - 1]] + i],

i++]; t]; a083524[29] (* Michael De Vlieger, Dec 24 2014 *)

CROSSREFS

Cf. A083525.

Sequence in context: A067868 A298760 A153803 * A222559 A095107 A115113

Adjacent sequences:  A083521 A083522 A083523 * A083525 A083526 A083527

KEYWORD

easy,nonn

AUTHOR

Amarnath Murthy, May 05 2003

EXTENSIONS

More terms from James A. Sellers, May 19 2003

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 October 18 20:12 EDT 2019. Contains 328197 sequences. (Running on oeis4.)