The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A337307 a(1) = 1; a(n) = 1 + Product_{k=1..n-1} a(k) (mod n-1). 0
1, 1, 2, 3, 3, 4, 1, 3, 1, 1, 7, 6, 1, 12, 1, 10, 1, 12, 1, 3, 1, 1, 21, 12, 1, 6, 21, 1, 1, 15, 1, 20, 1, 31, 15, 1, 1, 32, 13, 1, 1, 18, 1, 7, 25, 1, 17, 38, 1, 1, 1, 1, 1, 26, 1, 6, 1, 1, 29, 47, 1, 42, 1, 1, 1, 1, 61, 26, 1, 25, 1, 21, 1, 64, 21, 1, 1, 29, 1, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Note that the running product for each a(n) is incrementally computed mod n-1.
LINKS
MATHEMATICA
a[1] = 1; a[n_] := a[n] = 1 + Mod[Product[a[k], {k, 1, n - 1}], n - 1]; Array[a, 100] (* Amiram Eldar, Aug 22 2020 *)
PROG
(Python)
def f(n):
if n == 1: return 1
a = 1
for k in range(1, n):
a = a * f(k) % (n - 1)
return a + 1
(PARI) lista(nn) = {my(va = vector(nn)); va[1] = 1; for (n=2, nn, va[n] = 1 + prod(k=1, n-1, va[k]) % (n-1); ); va; } \\ Michel Marcus, Aug 23 2020
CROSSREFS
Inspired by A066910.
Cf. A129871 (without the mod operation).
Sequence in context: A285891 A060573 A279086 * A357372 A316910 A251715
KEYWORD
nonn
AUTHOR
Matt Donahoe, Aug 22 2020
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 May 15 06:57 EDT 2024. Contains 372538 sequences. (Running on oeis4.)