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.

A214684 a(1)=1, a(2)=1, and, for n>2, a(n)=(a(n-1)+a(n-2))/5^k, where 5^k is the highest power of 5 dividing a(n-1)+a(n-2).

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1
Offset: 1

Views

Author

John W. Layman, Jul 25 2012

Keywords

Comments

This sequence is periodic with period 1,1,2,3,1,4 of length 6.
It appears that for most choices of a(1), a(2), and divisor b^k (replacing 5^k), the resulting sequence is not periodic.

Crossrefs

Programs

  • Magma
    I:=[1,1,2,3,1,4]; [n le 6 select I[n] else Self(n-6): n in [1..100]]; // G. C. Greubel, Mar 08 2024
    
  • Mathematica
    CoefficientList[Series[(4*x^5 + x^4 + 3*x^3 + 2*x^2 + x + 1)/((1 - x)*(x + 1)*(x^2 - x + 1)*(x^2 + x + 1)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Jul 08 2014 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 1},{1, 1, 2, 3, 1, 4},80] (* Ray Chandler, Aug 25 2015 *)
  • PARI
    lista(nn) = {va = vector(nn); va[1] = 1; va[2] = 1; for (n=3, nn, sump = va[n-1] + va[n-2]; va[n] = sump/5^(valuation(sump, 5));); va;} \\ Michel Marcus, Jul 08 2014
    
  • PARI
    Vec(-x*(4*x^5+x^4+3*x^3+2*x^2+x+1)/((x-1)*(x+1)*(x^2-x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Jul 08 2014
    
  • SageMath
    def A214684_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x+2*x^2+3*x^3+x^4+4*x^5)/(1-x^6) ).list()
    a=A214684_list(100); a[1:] # G. C. Greubel, Mar 08 2024

Formula

a(n) = A132739(a(n-1) + a(n-2)), for n>2, and a(1)=1, a(2)=1. - Michel Marcus, Jul 08 2014
G.f.: x*(1+x+2*x^2+3*x^3+x^4+4*x^5)/((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)) . - Colin Barker, Jul 08 2014
a(n) = -4*[n=0] + (1/3)*(2 + 2*(-1)^n + A010892(n) - 2*A010892(n-1) + 3*A049347(n) + 3*A049347(n-1)). - G. C. Greubel, Mar 08 2024