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.

Showing 1-2 of 2 results.

A283330 a(n) = (1 + Sum_{j=1..K-1} a(n-j) + a(n-1)*a(n-K+1))/a(n-K) with a(1),...,a(K)=1, where K=5.

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 16, 41, 106, 806, 2311, 6126, 16066, 122401, 351136, 931006, 2441881, 18604041, 53370241, 141506681, 371149801, 2827691726, 8111925376, 21508084401, 56412327826, 429790538206, 1232959286791, 3269087322166, 8574302679706, 65325334115481
Offset: 1

Views

Author

N. J. A. Sloane, Mar 17 2017

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[n <= 5, 1, With[{m = If[Mod[n, 4] == 2, 8, 3]}, m a[n-1] - a[n-2] - 1]];
    Array[a, 30] (* Jean-François Alcover, Nov 03 2020 *)
  • Ruby
    def A(k, n)
      a = Array.new(k, 1)
      ary = [1]
      while ary.size < n
        j = (1..k - 1).inject(1){|s, i| s + a[-i]} + a[1] * a[-1]
        break if j % a[0] > 0
        a = *a[1..-1], j / a[0]
        ary << a[0]
      end
      ary
    end
    def A283330(n)
      A(5, n)
    end # Seiichi Manyama, Mar 18 2017

Formula

From Seiichi Manyama, Mar 18 2017: (Start)
a(4*n-1) = 3*a(4*n-2) - a(4*n-3) - 1,
a(4*n) = 3*a(4*n-1) - a(4*n-2) - 1,
a(4*n+1) = 3*a(4*n) - a(4*n-1) - 1,
a(4*n+2) = 8*a(4*n+1) - a(4*n) - 1. (End)
From Colin Barker, Nov 03 2020: (Start)
G.f.: x*(1 + x + x^2 + x^3 - 152*x^4 - 147*x^5 - 137*x^6 - 112*x^7 + 106*x^8 + 41*x^9 + 16*x^10 + 6*x^11) / ((1 - x)*(1 + x)*(1 + x^2)*(1 - 152*x^4 + x^8)).
a(n) = 153*a(n-4) - 153*a(n-8) + a(n-12) for n>12.
(End)

Extensions

More terms from Seiichi Manyama, Mar 17 2017

A283958 a(n) = (Sum_{j=1..h-1} a(n-j) + a(n-1)*a(n-h+1))/a(n-h) with a(1), ..., a(h)=1, where h = 4.

Original entry on oeis.org

1, 1, 1, 1, 4, 10, 25, 139, 391, 1033, 5806, 16384, 43345, 243685, 687709, 1819441, 10228936, 28867366, 76373161, 429371599, 1211741635, 3205853305, 18023378194, 50864281276, 134569465633, 756552512521, 2135088071929, 5648711703265, 31757182147660
Offset: 1

Views

Author

Seiichi Manyama, Mar 18 2017

Keywords

Crossrefs

Cf. A283329.
Cf. A072881 (h=3), this sequence (h=4), A283959 (h=5), A283960 (h=6).

Programs

  • Mathematica
    a[n_]:= If[n<5, 1, (Sum[a[n-j] , {j, 3}] +  a[n - 1] a[n - 3])/a[n - 4]]; Table[a[n], {n, 29}] (* Indranil Ghosh, Mar 18 2017 *)
  • PARI
    a(n) = if(n<5, 1, (sum(j=1, 3, a(n - j)) + a(n - 1)*a(n - 3))/a(n - 4));
    for(n=1, 29, print1(a(n),", ")) \\ Indranil Ghosh, Mar 18 2017

Formula

a(3*k) = 3*a(3*k-1) - a(3*k-2) - 1,
a(3*k+1) = 3*a(3*k) - a(3*k-1) - 1,
a(3*k+2) = 6*a(3*k+1) - a(3*k) - 1.
G.f.: -x*(4*x^8 + 10*x^7 + 25*x^6 - 33*x^5 - 39*x^4 - 42*x^3 + x^2 + x + 1) / ((x - 1)*(x^2 + x + 1)*(x^6 - 42*x^3 + 1)). - Alois P. Heinz, Mar 20 2017
Showing 1-2 of 2 results.