|
Search: id:A083525
|
|
|
| A083525 |
|
a(1) = 1, a(n) = a(n-1) *n if n is composite, a(n) = a(n-1)+n if n is a prime. |
|
+0 2
|
|
| 1, 3, 6, 24, 29, 174, 181, 1448, 13032, 130320, 130331, 1563972, 1563985, 21895790, 328436850, 5254989600, 5254989617, 94589813106, 94589813125, 1891796262500, 39727721512500, 874009873275000, 874009873275023, 20976236958600552
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
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:
|
|
CROSSREFS
|
Cf. A083524.
Adjacent sequences: A083522 A083523 A083524 this_sequence A083526 A083527 A083528
Sequence in context: A013212 A013218 A101738 this_sequence A106213 A129520 A047167
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Amarnath Murthy (amarnath_murthy(AT)yahoo.com), May 05 2003
|
|
EXTENSIONS
|
More terms and Maple code from James A. Sellers (sellersj(AT)math.psu.edu), May 19, 2003
|
|
|
Search completed in 0.002 seconds
|