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.

A242108 a(n) = abs(A242107(n)).

This page as a plain text file.
%I A242108 #16 Mar 19 2025 20:31:08
%S A242108 0,1,1,1,1,1,2,3,1,5,7,13,16,11,57,131,113,389,670,2311,3983,9,23647,
%T A242108 81511,140576,484247,833503,5751815,14871471,17124617,147165662,
%U A242108 710017141,2273917871,9644648819,11396432249,204006839259,808162720720,2405317965859
%N A242108 a(n) = abs(A242107(n)).
%C A242108 This sequence is similar to Somos-5 (A006721).
%H A242108 Chai Wah Wu, <a href="/A242108/b242108.txt">Table of n, a(n) for n = 0..320</a>
%F A242108 a(-n) = a(n) for all n in Z.
%o A242108 (PARI) {a(n) = my(v, m); n=abs(n); if( n<6, n>0, v = vector(n, k, 1); for(k=6, n, m = (k+1)%21 - 10; v[k] = ( (-1)^( m%4==0 ) * v[k-1] * v[k-4] + (-1)^( abs((m+4)%8-4)==1 ) * v[k-2] * v[k-3]) / v[k-5]); v[n])};
%o A242108 (PARI) {a(n) = if( n, sqrtint( denominator( ellmul( ellinit( [1, -1,0, -1, 1]), [0, 1], n)[1])))}; /* _Michael Somos_, Aug 22 2014 */
%o A242108 (Python)
%o A242108 from gmpy2 import divexact
%o A242108 A242107 = [0,1,1,1,1,-1]
%o A242108 for n in range(6,321):
%o A242108     A242107.append(divexact(-A242107[n-1]*A242107[n-4]+
%o A242108         A242107[n-2]*A242107[n-3],A242107[n-5]))
%o A242108 A242108 = [int(abs(x)) for x in A242107] # _Chai Wah Wu_, Aug 15 2014
%Y A242108 Cf. A006721, A242107.
%K A242108 nonn
%O A242108 0,7
%A A242108 _Michael Somos_, Aug 15 2014