|
|
A093464
|
|
a(1) = 1; for n>1, a(n) = n*a(n-1) - 1 if n is a prime else a(n) = n*a(n-1) + 1.
|
|
1
|
|
|
1, 1, 2, 9, 44, 265, 1854, 14833, 133498, 1334981, 14684790, 176217481, 2290827252, 32071581529, 481073722936, 7697179566977, 130852052638608, 2355336947494945, 44751402002403954, 895028040048079081
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
MATHEMATICA
|
a[1] = 1; a[n_] := a[n] = (p = n*a[n - 1] - 1; If[ PrimeQ[n], p, p + 2]); Table[ a[n], {n, 20}] (* Robert G. Wilson v, Apr 08 2004 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|