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-3 of 3 results.

A113486 a(n) = A113166(n) - Fibonacci(n-1), where Fibonacci(n) = A000045(n).

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 4, 2, 7, 0, 13, 0, 14, 10, 21, 0, 39, 0, 52, 22, 65, 0, 137, 12, 156, 48, 267, 0, 483, 0, 652, 120, 1003, 50, 1849, 0, 2602, 300, 4329, 0, 7295, 0, 11086, 864, 17733, 0, 30125, 48, 46536, 1990, 75349, 0, 124683, 250, 197018, 5186, 317839, 0
Offset: 1

Views

Author

Creighton Dement, Jan 09 2006; corrected Jun 20 2006

Keywords

Comments

This sequence appears to be nonnegative. However, a proof of this has not yet been found.

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[ k/(n - k)*Sum[ Binomial[(n - k)*GCD[n, k, j]/GCD[n, k],
    k*GCD[n, k, j]/GCD[n, k]], {j, 1, GCD[n, k]}], {k, 1, Floor[n/2]}];
    Table[a[n] - Fibonacci[n - 1], {n,1,50}] (* G. C. Greubel, Mar 12 2017 *)

Formula

For prime p, a(p) = 0 (see A113166 for details).

Extensions

More terms from R. J. Mathar, Feb 08 2008
More terms from Max Alekseyev, Jun 06 2009

A381936 Number of primitive binary words of length n that avoid 11, start with 1 and end with 0.

Original entry on oeis.org

0, 1, 1, 1, 3, 3, 8, 11, 20, 30, 55, 83, 144, 224, 373, 597, 987, 1572, 2584, 4146, 6756, 10890, 17711, 28557, 46365, 74880, 121372, 196184, 317811, 513818, 832040, 1345659, 2178253, 3523590, 5702876, 9225784, 14930352, 24155232, 39088024, 63241794, 102334155, 165573148, 267914296
Offset: 1

Views

Author

Aidan Diekmann, Mar 10 2025

Keywords

Comments

Here primitive means the word is not two or more repetitions of a smaller word.

Examples

			For n=5, the a(6) = 3 words are: 100000, 100010, 101000.
Notice 100100 is not included since it is repetitions of the smaller word 100 (from n=3).
		

Crossrefs

Programs

  • PARI
    a(n) = sumdiv(n,d,moebius(d)*fibonacci(n/d-1)) \\ Andrew Howroyd, Mar 10 2025
    
  • Python
    from sympy import mobius, fibonacci, divisors
    def A381936(n): return sum(mobius(n//d)*fibonacci(d-1) for d in divisors(n,generator=True)) # Chai Wah Wu, Mar 18 2025

Formula

a(n) = Sum_{d|n} mu(d) * Fibonacci(n/d-1).

A347351 Triangle read by rows: T(n,k) is the number of links of length k in a set of all necklaces A000358 of length n, 1 <= k <= n.

Original entry on oeis.org

1, 2, 1, 3, 0, 1, 4, 2, 0, 1, 5, 1, 1, 0, 1, 6, 4, 2, 1, 0, 1, 7, 3, 2, 1, 1, 0, 1, 8, 8, 3, 3, 1, 1, 0, 1, 9, 8, 7, 3, 2, 1, 1, 0, 1, 10, 18, 9, 5, 4, 2, 1, 1, 0, 1, 11, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1, 12, 40, 24, 16, 8, 6, 3, 2, 1, 1, 0, 1, 13, 55, 34, 21, 13, 8, 5, 3, 2, 1, 1, 0, 1
Offset: 0

Views

Author

Maxim Karimov and Vladislav Sulima, Aug 28 2021

Keywords

Comments

Definitions:
1. A link is any 0 in any necklace from A000358 and all 1s following this 0 in this necklace to right until another 0 is encountered.
2. Length of the link is the number of elements in the link.
Sum of all elements n-row is Fibonacci(n-1)+n iff n=1 or n=p (follows from the identity for the sum of the Fibonacci numbers and the formula for the triangle T(n,k)).

Examples

			For k > 0:
   n\k |  1   2   3   4   5   6   7   8   9  10  ...
  -----+---------------------------------------
   1   |  1
   2   |  2   1
   3   |  3   0   1
   4   |  4   2   0   1
   5   |  5   1   1   0   1
   6   |  6   4   2   1   0   1
   7   |  7   3   2   1   1   0   1
   8   |  8   8   3   3   1   1   0   1
   9   |  9   8   7   3   2   1   1   0   1
  10   | 10  18   9   5   4   2   1   1   0   1
  ...
If we continue the calculation for nonpositive k, we get a table in which each row is a Fibonacci sequence, in which term(0) = A113166, term(1) = A034748.
For k <= 0:
   n\k |  0   -1   -2   -3   -4   -5   -6   -7   -8   -9 ...
  -----+------------------------------------------------
   1   |  0    1    1    2    3    5    8   13   21   34 ... A000045
   2   |  1    2    3    5    8   13   21   34   55   89 ... A000045
   3   |  1    4    5    9   14   23   37   60   97  157 ... A000285
   4   |  3    6    9   15   24   39   63  102  165  267 ... A022086
   5   |  3    9   12   21   33   54   87  141  228  369 ... A022379
   6   |  8   14   22   36   58   94  152  246  398  644 ... A022112
   7   |  8   19   27   46   73  119  192  311  503  814 ... A206420
   8   | 17   30   47   77  124  201  325  526  851 1377 ... A022132
   9   | 23   44   67  111  178  289  467  756 1223 1979 ... A294116
  10   | 41   68  109  177  286  463  749 1212 1961 3173 ... A022103
  ...
		

Crossrefs

Programs

  • MATLAB
    function [res] = calcLinks(n,k)
    if k==1
        res=n;
    else
        d=divisors(n);
        res=0;
        for i=1:length(d)
            if d (i) >= k
                res=res+eulerPhi(n/d(i))*fiboExt(d(i)-k-1);
            end
        end
    end
    function [s] = fiboExt(m) % extended fibonacci function (including negative arguments)
    m=sym(m); % for large fibonacci numbers
    if m>=0 || mod(m,2)==1
        s=fibonacci(abs(m));
    else
        s=fibonacci(abs(m))*(-1);
    end
    
  • PARI
    T(n, k) = if (k==1, n, sumdiv(n, d, if (d>=k, eulerphi(n/d)*fibonacci(d-k-1)))); \\ Michel Marcus, Aug 29 2021

Formula

If k=1, T(n,k)=n, otherwise T(n,k) = Sum_{d>=k, d|n} Phi(n/d)*Fibonacci(d-k-1), where Phi=A000010.
Showing 1-3 of 3 results.