cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337307 a(1) = 1; a(n) = 1 + Product_{k=1..n-1} a(k) (mod n-1).

This page as a plain text file.
%I A337307 #15 Sep 08 2020 03:29:23
%S A337307 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,
%T A337307 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,
%U A337307 47,1,42,1,1,1,1,61,26,1,25,1,21,1,64,21,1,1,29,1,18
%N A337307 a(1) = 1; a(n) = 1 + Product_{k=1..n-1} a(k) (mod n-1).
%C A337307 Note that the running product for each a(n) is incrementally computed mod n-1.
%t A337307 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 *)
%o A337307 (Python)
%o A337307 def f(n):
%o A337307     if n == 1: return 1
%o A337307     a = 1
%o A337307     for k in range(1, n):
%o A337307         a = a * f(k) % (n - 1)
%o A337307     return a + 1
%o A337307 (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
%Y A337307 Inspired by A066910.
%Y A337307 Cf. A129871 (without the mod operation).
%K A337307 nonn
%O A337307 1,3
%A A337307 _Matt Donahoe_, Aug 22 2020