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.

A178536 First column of A178535.

Original entry on oeis.org

1, -2, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 0, 1, 1, -1, 0, 0, 1, 0, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, 0, -1, -1, -1, 0, 0, 1, -1, 0, 0, 0, 1, 0, -1, 0, 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1, -1, -1, 0, 0, 1, -1, 0, 1, 1, 1, 0, -1, 0, 1, 0
Offset: 1

Views

Author

Mats Granvik, May 29 2010

Keywords

Comments

Except for the second term, a(n) seems to be equal to the Mobius function mu(n) = A008683(n) (verified for the first 53 terms).
a(n) = A008683(n) has now been verified for 3 <= n <= 800. - R. J. Mathar, Sep 14 2017

Crossrefs

Cf. also A181434, A181435.

Programs

  • Maple
    A178536 := proc(n) A178535(n,1) ; end proc;
    seq(A178536(n),n=1..80) ; # R. J. Mathar, Oct 28 2010
  • Mathematica
    Clear[t, n, k, nn, a, A]; nn=92; a = Fibonacci[Range[nn] + 1]; t[n_, 1] = If[n >= 1, a[[n]], 0]; t[n_, k_] := t[n, k] = If[n >= k, Sum[t[n - i, k - 1], {i, 1, k - 1}] - Sum[t[n - i, k], {i, 1, k - 1}], 0]; MatrixForm[A = Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}]]; Inverse[A][[All, 1]] (* Mats Granvik, Sep 15 2017 *)

Formula

a(n) = A178535(n,1).
a(n) = Sum_{k|n} A008683(n/k)*([k = 1] - [2|k]) (conjecture). - Mats Granvik, Jan 24 2021

Extensions

More terms from R. J. Mathar, Oct 28 2010

A178534 Triangle T(n,k) read by rows. T(n,1) = A000045(n+1), k > 1: T(n,k) = (Sum_{i=1..k-1} T(n-i,k-1)) - (Sum_{i=1..k-1} T(n-i,k)).

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 5, 2, 1, 1, 8, 3, 1, 1, 1, 13, 5, 3, 1, 1, 1, 21, 8, 4, 2, 1, 1, 1, 34, 13, 6, 4, 2, 1, 1, 1, 55, 21, 11, 6, 3, 2, 1, 1, 1, 89, 34, 17, 9, 6, 3, 2, 1, 1, 1, 144, 55, 27, 15, 9, 5, 3, 2, 1, 1, 1, 233, 89, 45, 25, 14, 9, 5, 3, 2, 1, 1, 1, 377, 144, 72, 40, 23, 14, 8, 5, 3, 2, 1, 1, 1
Offset: 1

Views

Author

Mats Granvik, May 29 2010

Keywords

Examples

			Table begins:
   1;
   2,  1;
   3,  1,  1;
   5,  2,  1,  1;
   8,  3,  1,  1,  1;
  13,  5,  3,  1,  1,  1;
  21,  8,  4,  2,  1,  1,  1;
  34, 13,  6,  4,  2,  1,  1,  1;
  55, 21, 11,  6,  3,  2,  1,  1,  1;
  89, 34, 17,  9,  6,  3,  2,  1,  1,  1;
		

Crossrefs

Cf. 1st column=A000045(n+1), 2nd=A000045, 3rd=A093040, 4th=A006498. Matrix inverse of A178535.

Programs

  • Maple
    A178534 := proc(n, k)
        option remember;
        if k= 1 then
            combinat[fibonacci](n+1) ;
        elif k > n then
            0 ;
        else
            add(procname(n-i, k-1), i=1..k-1)-add(procname(n-i, k), i=1..k-1) ;
        end if;
    end proc:
    seq(seq(A178534(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Oct 28 2010
  • Mathematica
    T[n_, 1] := Fibonacci[n+1];
    T[n_, k_] := T[n, k] = If[k > n, 0, Sum[T[n-i, k-1], {i, 1, k-1}] - Sum[T[n-i, k], {i, 1, k-1}]];
    Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Feb 23 2024 *)
  • PARI
    T(n,k)=(n % k==0) + sum(j=1,n\k,fibonacci(n-j*k)) \\ Andrew Howroyd, Feb 23 2024
  • Python
    from sympy.core.cache import cacheit
    from sympy import fibonacci
    @cacheit
    def A(n, k): return fibonacci(n + 1) if k==1 else 0 if k>n else sum([A(n - i, k - 1) for i in range(1, k)]) - sum([A(n - i, k) for i in range(1, k)])
    for n in range(1, 13): print([A(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, Sep 15 2017
    

Formula

T(n,1) = A000045(n+1), k>1: T(n,k) = Sum_{i=1..k-1} T(n-i,k-1) - Sum_{i=1..k-1} T(n-i,k).
T(n,k) = A129713*A051731. - Mats Granvik, Oct 22 2010
From R. J. Mathar, Sep 16 2017: (Start)
G.f. 3rd column: x^3*(1+x)/((1-x-x^2)*(1+x+x^2)).
G.f. 4th column: x^4/((1-x-x^2)*(1+x^2)) =x^4*(1+x)/((1-x-x^2)*(1+x+x^2+x^3)).
G.f. 5th column: x^5*(1+x)/((1-x-x^2)*(1+x+x^2+x^3+x^4)).
G.f. 6th column: x^6/((1-x-x^2)*(1+x+x^2)*(1-x+x^2)) = x^6*(1+x)/((1-x-x^2)*(1+x+x^2+x^3+x^4+x^5)).
G.f. 7th column: x^7*(1+x)/((1-x-x^2)*(1+x+x^2+x^3+x^4+x^5+x^6)).
G.f. 8th column: x^8/((1-x-x^2)*(1+x^2)*(1+x^4)) = x^8*(1+x)/((1-x-x^2)*(1+x+x^2+x^3+x^4+x^5+x^6+x^7)).
Conjecture (by extrapolating): G.f. k-th column: x^k*(1-x^2)/((1-x-x^2)*(1-x^k)).
G.f.: (1-x^2)/(1-x-x^2)*Sum_{i>=1} (x*y)^i/(1-x^i) = (1-x^2)/(1-x-x^2)*A051731(x,y). (End)
T(n,k) = A051731(n,k) + Sum_{j=1..floor(n/k)} Fibonacci(n-j*k). - Andrew Howroyd, Feb 23 2024
Showing 1-2 of 2 results.