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.
%I A271901 #34 Jul 22 2018 08:43:29 %S A271901 7,8,31,57,60,168,288,381,528,840,930,342,1723,1848,46,468,3541,1240, %T A271901 33,5113,2664,6240,3444,7920,3169,10303,10713,11557,11991,991,2016, %U A271901 130,6256,1610,148,22800,24807,26733,4648,172,10680,32760,36673,37443,2156,3960,481,12432,226,26220,54523,8160,9680,63000 %N A271901 Length of period of Narayana sequence A000930 modulo n-th prime. %H A271901 Chai Wah Wu, <a href="/A271901/b271901.txt">Table of n, a(n) for n = 1..10000</a> %H A271901 H. T. Engstrom, <a href="https://doi.org/10.1090/S0002-9947-1931-1501585-5">On sequences defined by linear recurrence relations</a> Trans. Am. Math. Soc. 33 (1) (1931) 210-218. %H A271901 K. Kirthi, <a href="http://arxiv.org/abs/1509.05745">Narayana Sequences for Cryptographic Applications</a>, arXiv preprint arXiv:1509.05745 [math.NT], 2015. %H A271901 M. B. Nathanson, <a href="https://doi.org/10.1090/S0002-9939-1975-0364124-5">Linear recurrences and uniform distribution</a>, Proc. Amer. Math. Soc. 48 (1975), 289-291. %H A271901 D. D. Wall, <a href="http://www.jstor.org/stable/2309169">Fibonacci series modulo m</a>, Amer. Math. Monthly, 67 (1960), 525-532. %F A271901 a(n) = A271953(prime(n)). - _Joerg Arndt_, Apr 17 2016 %t A271901 a[n_] := Module[{p = Prime[n], a = 1, b = 1, c = 2, k = 1}, While[a != 1 || b != 1 || c != 1, {a, b, c} = {b, c, Mod[a + c, p]}; k++]; k]; %t A271901 Array[a, 100] (* _Jean-François Alcover_, Jul 22 2018, after _Charles R Greathouse IV_ *) %o A271901 (Python) %o A271901 from sympy import prime %o A271901 def A271901(n): %o A271901 p = prime(n) %o A271901 i, a, b, c = 1, 1, 1, 2 % p %o A271901 while a != 1 or b != 1 or c != 1: %o A271901 i += 1 %o A271901 a, b, c = b, c, (a+c) % p %o A271901 return i # _Chai Wah Wu_, Feb 26 2017 %o A271901 (PARI) a(n,p=prime(n))=my(a=1,b=1,c=2,k=1); while(a!=1 || b!=1 || c!=1, [a,b,c]=[b,c,(a+c)%p]; k++); k \\ _Charles R Greathouse IV_, Feb 26 2017 %Y A271901 Cf. A000930, A271953. %K A271901 nonn,easy %O A271901 1,1 %A A271901 _N. J. A. Sloane_, Apr 17 2016 %E A271901 a(1) corrected by _Altug Alkan_, Apr 17 2016 %E A271901 Terms a(24) and beyond from _Joerg Arndt_, Apr 17 2016