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.

A283839 Row sums of A283838.

Original entry on oeis.org

1, 3, 6, 12, 24, 42, 76, 136, 240, 424, 753, 1337, 2388, 4280, 7706, 13940, 25332, 46224, 84696, 155786, 287574, 532624, 989554, 1843744, 3444389, 6450369, 12107004, 22771642, 42913116, 81014528, 153199818, 290152952, 550332614, 1045234672, 1987731140
Offset: 8

Views

Author

N. J. A. Sloane, Mar 25 2017

Keywords

Comments

a(n) is odd for n >= 8 and n in { A247375 }. - Alois P. Heinz, Mar 26 2017

Crossrefs

Programs

  • Maple
    b:= proc(n, l, c, k) option remember; `if`(n=0, l,
          b(n-1, 1-l, 1, k)+`if`(c=k-1, 0, b(n-1, l, c+1, k)))
        end:
    a:= proc(n) option remember; `if`(n<8, 0, a(n-1)+
          add(b(n-2*k-1, 0, 1, k), k=3..floor(n/2)-1))
        end:
    seq(a(n), n=8..60);  # Alois P. Heinz, Mar 26 2017
  • Mathematica
    nMax = 60; gf[k_] := gf[k] = x^(2k)(x-x^k)^2 / ((1-x)(1-x^k)(1-2x+x^k)) + O[x]^(nMax+1); a[n_] := Sum[SeriesCoefficient[gf[k], n], {k, 3, Floor[ n/2] - 1}]; Table[a[n], {n, 8, nMax}] (* Jean-François Alcover, Apr 05 2017 *)

Extensions

More terms from Alois P. Heinz, Mar 26 2017

A283834 Number of length-n binary vectors beginning with 0, ending with 1, and avoiding 4 consecutive 0's and 4 consecutive 1's.

Original entry on oeis.org

1, 0, 1, 2, 4, 6, 12, 22, 41, 74, 137, 252, 464, 852, 1568, 2884, 5305, 9756, 17945, 33006, 60708, 111658, 205372, 377738, 694769, 1277878, 2350385, 4323032, 7951296, 14624712, 26899040, 49475048, 90998801, 167372888, 307846737, 566218426, 1041438052
Offset: 0

Views

Author

N. J. A. Sloane, Mar 25 2017

Keywords

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1/((1+x)*(1+x^2)*(1-x-x^2-x^3)) )); // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    CoefficientList[Series[1/((1+x)*(1+x^2)*(1-x-x^2-x^3)), {x,0,50}], x] (* Indranil Ghosh, Mar 26 2017 *)
  • PARI
    Vec(1/((1+x)*(1+x^2)*(1-x-x^2-x^3)) + O(x^50)) \\ Indranil Ghosh, Mar 26 2017
    
  • SageMath
    @CachedFunction
    def b(n): # b = A000073
        if (n<3): return (0,0,1)[n]
        else: return b(n-1) + b(n-2) + b(n-3)
    def A283834(n): return (1/4)*((-1)^n +i^n*((n+1)%2) -i^(n+3)*(n%2) +2*b(n+2))
    [A283834(n) for n in range(41)] # G. C. Greubel, Feb 09 2023

Formula

G.f.: 1/((1+x)*(1+x^2)*(1-x-x^2-x^3)). - Alois P. Heinz, Mar 25 2017
a(n) = (1/4)*((-1)^n + i^n*(n+1 mod 2) - i^(n+3)*(n mod 2) + 2*A000073(n+2)). - G. C. Greubel, Feb 09 2023

Extensions

More terms from Alois P. Heinz, Mar 25 2017
Showing 1-2 of 2 results.