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)).

Original entry on oeis.org

0, 1, 1, 1, 1, 1, 2, 3, 1, 5, 7, 13, 16, 11, 57, 131, 113, 389, 670, 2311, 3983, 9, 23647, 81511, 140576, 484247, 833503, 5751815, 14871471, 17124617, 147165662, 710017141, 2273917871, 9644648819, 11396432249, 204006839259, 808162720720, 2405317965859
Offset: 0

Views

Author

Michael Somos, Aug 15 2014

Keywords

Comments

This sequence is similar to Somos-5 (A006721).

Crossrefs

Programs

  • 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])};
    
  • PARI
    {a(n) = if( n, sqrtint( denominator( ellmul( ellinit( [1, -1,0, -1, 1]), [0, 1], n)[1])))}; /* Michael Somos, Aug 22 2014 */
    
  • Python
    from gmpy2 import divexact
    A242107 = [0,1,1,1,1,-1]
    for n in range(6,321):
        A242107.append(divexact(-A242107[n-1]*A242107[n-4]+
            A242107[n-2]*A242107[n-3],A242107[n-5]))
    A242108 = [int(abs(x)) for x in A242107] # Chai Wah Wu, Aug 15 2014

Formula

a(-n) = a(n) for all n in Z.