login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Cf. A093463.
Cf. A000166.
Sequence in context: A260216 A182386 A000166 * A308338 A196301 A347571
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 05 2004
EXTENSIONS
More terms from Robert G. Wilson v, Apr 08 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 20 14:54 EDT 2024. Contains 373526 sequences. (Running on oeis4.)