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

A006206 Number of aperiodic binary necklaces of length n with no subsequence 00, excluding the necklace "0".

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 5, 8, 11, 18, 25, 40, 58, 90, 135, 210, 316, 492, 750, 1164, 1791, 2786, 4305, 6710, 10420, 16264, 25350, 39650, 61967, 97108, 152145, 238818, 374955, 589520, 927200, 1459960, 2299854, 3626200, 5720274, 9030450, 14263078
Offset: 1

Views

Author

Keywords

Comments

Bau-Sen Du (1985/1989)'s Table 1 has this sequence, denoted A_{n,1}, as the second column. - Jonathan Vos Post, Jun 18 2007

Examples

			Necklaces are: 1, 10, 110, 1110; 11110, 11010, 111110, 111010, ...
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 499.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A006207 (A_{n,2}), A006208 (A_{n,3}), A006209 (A_{n,4}), A130628 (A_{n,5}), A208092 (A_{n,6}), A006210 (D_{n,2}), A006211 (D_{n,3}), A094392.
Cf. A001461 (partial sums), A000045, A008683, A027750.
Cf. A125951 and A113788 for similar sequences.

Programs

  • Haskell
    a006206 n = sum (map f $ a027750_row n) `div` n where
       f d = a008683 (n `div` d) * (a000045 (d - 1) + a000045 (d + 1))
    -- Reinhard Zumkeller, Jun 01 2013
    
  • Maple
    with(numtheory): with(combinat):
    A006206 := proc(n) local sum; sum := 0; for d in divisors(n) do sum := sum + mobius(n/d)*(fibonacci(d+1)+fibonacci(d-1)) end do; sum/n; end proc:
  • Mathematica
    a[n_] := Total[(MoebiusMu[n/#]*(Fibonacci[#+1] + Fibonacci[#-1]) & ) /@ Divisors[n]]/n;
    (* or *) a[n_] := Sum[LucasL[k]*MoebiusMu[n/k], {k, Divisors[n]}]/n; Table[a[n], {n,100}] (* Jean-François Alcover, Jul 19 2011, after given formulas *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,moebius(n/d)*(fibonacci(d-1)+fibonacci(d+1)))/n)
    
  • Sage
    z = PowerSeriesRing(ZZ, 'z').gen().O(30)
    r = (1 - (z + z**2))
    F = -z*r.derivative()/r
    [sum(moebius(n//d)*F[d] for d in divisors(n))//n for n in range(1, 24)] # F. Chapoton, Apr 24 2020

Formula

Euler transform is Fibonacci(n+1): 1/((1 - x) * (1 - x^2) * (1 - x^3) * (1 - x^4) * (1 - x^5)^2 * (1 - x^6)^2 * ...) = 1/(Product_{n >= 1} (1 - x^n)^a(n)) = 1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 8*x^5 + ...
Coefficients of power series of natural logarithm of the infinite product Product_{n>=1} (1 - x^n - x^(2*n))^(-mu(n)/n), where mu(n) is the Moebius function. This is related to Fibonacci sequence since 1/(1 - x^n - x^(2*n)) expands to a power series whose terms are Fibonacci numbers.
a(n) = (1/n) * Sum_{d|n} mu(n/d) * (Fibonacci(d-1) + Fibonacci(d+1)) = (1/n) * Sum_{d|n} mu(n/d) * Lucas(d). Hence Lucas(n) = Sum_{d|n} d*a(d).
a(n) = round((1/n) * Sum_{d|n} mu(d)*phi^(n/d)), n > 2. - David Broadhurst [Formula corrected by Jason Yuen, Dec 29 2024]
G.f.: Sum_{n >= 1} -mu(n) * log(1 - x^n - x^(2*n))/n.
a(n) = (1/n) * Sum_{d|n} mu(d) * A001610(n/d - 1), n > 1. - R. J. Mathar, Mar 07 2009
For n > 2, a(n) = A060280(n) = A031367(n)/n.

A001350 Associated Mersenne numbers.

Original entry on oeis.org

0, 1, 1, 4, 5, 11, 16, 29, 45, 76, 121, 199, 320, 521, 841, 1364, 2205, 3571, 5776, 9349, 15125, 24476, 39601, 64079, 103680, 167761, 271441, 439204, 710645, 1149851, 1860496, 3010349, 4870845, 7881196, 12752041, 20633239, 33385280, 54018521, 87403801, 141422324
Offset: 0

Views

Author

Keywords

Comments

a(n) is last term in the period of the continued fraction expansion of phi^n (phi being the golden number). E.g.: n=10, phi^10=[122,1,121,1,121,1,121,...] (and the period may only have 1 or 2 terms). Also, a(n) = floor(phi^n)-((n+1) mod 2), or a(n) = A014217(n)-((n+1) mod 2). - Thomas Baruchel, Nov 05 2002 [continued fraction value corrected by Jon E. Schoenfield, Jan 20 2019]
a(n) is the resultant of the polynomials x^2-x-1 and x^(n+1)-x^n-1 for n >= 1. - Richard Choulet, Aug 05 2007
This is a divisibility sequence; that is, if n divides m, then a(n) divides a(m). - Michael Somos, Feb 12 2012
Gives the number of arrangements of black and white beads on a necklace with a total of n beads satisfying (1) there is at least one black bead (2) between any two black beads the number of white beads is even and (3) rotations and flippings of a necklace are considered distinct (see Butler). - Peter Bala, Mar 06 2014
This is the case P1 = 1, P2 = 0, Q = -1 of the 3-parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 31 2014
The resultant of the (s_2, s_2+n) pair, where s_n(X) is X^n-X-1, is -a(n). See Rush link. - Michel Marcus, Sep 30 2019

Examples

			G.f. = x + x^2 + 4*x^3 + 5*x^4 + 11*x^5 + 16*x^6 + 29*x^7 + 45*x^8 + 76*x^9 + ...
n=1: a(9)/a(3) = 76/4 = 19; a(18)/a(6) = 5776/16 = 361 = 19^2. - _Bob Selcoe_, Jun 01 2014
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    [Floor(-(1 - ((1 + Sqrt(5))/2)^n - (-(1 + Sqrt(5))/2)^(-n) + (-1)^n)): n in [0..40]]; // Vincenzo Librandi, Aug 15 2011
    
  • Maple
    A001350 := n -> add(binomial(k-1, 2*k-n)*n/(n-k), k=0..n-1);
    seq(A001350(n), n=0..39); # Peter Luschny, Sep 26 2014
  • Mathematica
    Clear[f, n]; f[n_] = -(1 - ((1 + Sqrt[5])/2)^n - (-(1 + Sqrt[5])/2)^(-n) + (-1)^n); Table[FullSimplify[ExpandAll[f[n]]], {n, 0, 30}] (* Roger L. Bagula and Gary W. Adamson, Nov 26 2008 *)
    a[ n_] := LucasL[n] - 1 - (-1)^n; (* Michael Somos, May 18 2015 *)
    a[ n_] := SeriesCoefficient[ x D[ Log[ 1 + x / (1 - x - x^2)], x], {x, 0, n}]; (* Michael Somos, May 18 2015 *)
    LinearRecurrence[{1, 2, -1, -1}, {0, 1, 1, 4}, 40] (* Jean-François Alcover, Jan 07 2019 *)
  • PARI
    {a(n) = fibonacci(n+1) + fibonacci(n-1) - 1 - (-1)^n};
    
  • PARI
    {a(n) = my(w = quadgen(5)); simplify( -(w^n - 1) * ((-1/w)^n - 1))}; /* Michael Somos, Feb 12 2012 */
    
  • Python
    from sympy import lucas
    def A001350(n): return lucas(n)-((n&1^1)<<1) # Chai Wah Wu, Sep 23 2023

Formula

G.f.: x*(1+x^2)/((1-x^2)*(1-x-x^2)). - Simon Plouffe in his 1992 dissertation
a(n) = a(n-1) + a(n-2) + 1 -(-1)^n. a(-n) = (-1)^n * a(n).
a(n) = A050140(Fibonacci(n)). - Thomas Baruchel, Nov 05 2002
Convolution of F(n) and {1, 0, 2, 0, 2, ...}. a(n) = Sum_{k=0..n} ((1+(-1)^k)-0^k)*F(n-k) = Sum_{k=0..n} F(k)*((1+(-1)^(n-k))-0^(n-k)). - Paul Barry, Jul 19 2004
a(n) = 2*A074331(n) - A000045(n). - Paul Barry, Jul 19 2004
a(n) = Lucas_number(n) - 1 - (-1)^n = A000032(n) - 1 - (-1)^n. - Hieronymus Fischer, Feb 18 2006
a(n) = -(1 - ((1 + sqrt(5))/2)^n - (-(1 + sqrt(5))/2)^(-n) + (-1)^n). - Roger L. Bagula and Gary W. Adamson, Nov 26 2008
a(n) = n * Sum_{k=1..n} (Sum_{i=ceiling((n-k)/2)..(n-k)} (binomial(i,n-k-i)*binomial(k+i-1,k-1))/k*(-1)^(k+1)), n>0. - Vladimir Kruchinin, Sep 03 2010
a(n) = a(n-1) + 2*a(n-2) - a(n-3) - a(n-4). - Colin Barker, Apr 11 2014
a(n) = sqrt(A152152(n)). - Colin Barker, Apr 11 2014
a(n) = a(2*n)/A000032(n) when n is odd; a(n) = a(2*n)/(A000032(n+2)) when n is even. - Bob Selcoe, Jun 01 2014
a(12n+6)/a(4n+2) = (a(6n+3)/a(2n+1))^2. - Bob Selcoe, Jun 01 2014
a(n) = Sum_{k=0..n-1} binomial(k-1, 2*k-n)*n/(n-k). - Peter Luschny, Sep 26 2014
From Peter Bala, Mar 19 2015: (Start)
a(n) = -(alpha^n - 1)*(beta^n - 1), where alpha = 1/2*(1 + sqrt(5)) and beta = (1/2)*(1 - sqrt(5)).
a(n) = -det(I - M^n) where I is the 2 X 2 identity matrix and M = [ 1, 1; 1, 0 ]. Cf. A129744.
exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + Sum_{n >= 1} Fibonacci(n)*x^n. Cf. A004146. (End)
a(n) = A052952(n-1) + A052952(n-3). - R. J. Mathar, Jul 02 2018
a(n) = (L(2*n+1) - L(n+1)) mod (L(n+1)-1) for n > 0 where L(k)=A000032(k). - Art Baker, Jan 17 2019
a(n) = Sum_{j=n..2*n-1} L(j) mod Sum_{j=0..n-1} L(j) where L(j)=A000032(j). - Art Baker, Jan 20 2019
Convolution of (1, 0, 3, 0, 5, 0, 7, ...) and (1, 1, 1, 2, 3, 5, 8, 13, ...). - Gary W. Adamson, Jul 08 2019
a(n) = Sum_{d|n} d*A060280(d) = Sum_{d|n} A031367(d). [Baake, Roberts, Weiss, eq(2)]. - R. J. Mathar, Oct 19 2021

Extensions

Additional comments from Michael Somos, Aug 01 2002

A060280 Number of orbits of length n under the map whose periodic points are counted by A001350.

Original entry on oeis.org

1, 0, 1, 1, 2, 2, 4, 5, 8, 11, 18, 25, 40, 58, 90, 135, 210, 316, 492, 750, 1164, 1791, 2786, 4305, 6710, 10420, 16264, 25350, 39650, 61967, 97108, 152145, 238818, 374955, 589520, 927200, 1459960, 2299854, 3626200, 5720274, 9030450, 14263078, 22542396
Offset: 1

Views

Author

Thomas Ward, Mar 29 2001

Keywords

Comments

Euler transform is A000045. 1/((1-x)*(1-x^3)*(1-x^4)*(1-x^5)^2*(1-x^6)^2*...) = 1 + x + x^2 + 2*x^3 + 3*x^4 + 5*x^5 + 8*x^6 + ... - Michael Somos, Jan 28 2003

Examples

			a(7)=4 since the 7th term of A001350 is 29 and the 1st is 1, so there are (29-1)/7 = 4 orbits of length 7.
x + x^3 + x^4 + 2*x^5 + 2*x^6 + 4*x^7 + 5*x^8 + 8*x^9 + 11*x^10 + 18*x^11 + ...
		

Crossrefs

First column of A348422.

Programs

  • Magma
    A060280:= func< n | n le 2 select 2-n else (&+[Lucas(d)*MoebiusMu(Floor(n/d)) : d in Divisors(n)])/n >;
    [A060280(n): n in [1..50]]; // G. C. Greubel, Nov 06 2024
    
  • Maple
    A060280 := proc(n)
        add( numtheory[mobius](d)*A001350(n/d), d=numtheory[divisors](n)) ;
        %/n;
    end proc: # R. J. Mathar, Jul 15 2016
  • Mathematica
    A001350[n_] := LucasL[n] - (-1)^n - 1;
    a[n_] := (1/n)*DivisorSum[n, MoebiusMu[#]*A001350[n/#]& ];
    Array[a, 50] (* Jean-François Alcover, Nov 23 2017 *)
  • PARI
    {a(n) = if( n<3, n==1, sumdiv( n, d, moebius(n/d) * (fibonacci(d - 1) + fibonacci(d + 1))) / n)} /* Michael Somos, Jan 28 2003 */
    
  • SageMath
    A000032=BinaryRecurrenceSequence(1,1,2,1)
    def A060280(n): return sum(A000032(k)*moebius(n/k) for k in (1..n) if (k).divides(n))//n - int(n==2)
    [A060280(n) for n in range(1,41)] # G. C. Greubel, Nov 06 2024

Formula

a(n) = (1/n)* Sum_{d|n} mu(d)*A001350(n/d).
a(n) = A006206(n) except for n=2. - Michael Somos, Jan 28 2003
a(n) = A031367(n)/n. - R. J. Mathar, Jul 15 2016
G.f.: Sum_{k>=1} mu(k)*log(1 + x^k/(1 - x^k - x^(2*k)))/k. - Ilya Gutkovskiy, May 18 2019

A324488 Inflation orbit counts b^{(3)}_n for Danzer's F-type tiling and other 3D cut and project patterns with tau-inflation.

Original entry on oeis.org

1, 0, 63, 124, 1330, 4032, 24388, 91000, 438912, 1770230, 7880598, 32763780, 141420760, 594798932, 2537715150, 10720674000, 45537538410, 192699485568, 817138135548, 3460078306440, 14662949297724, 62103832718202, 263115950765038, 1114512523173000, 4721424167330750
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2019

Keywords

Crossrefs

Programs

  • PARI
    a001350(n) = fibonacci(n+1)+fibonacci(n-1)-1-(-1)^n;
    a(n) = sumdiv(n, d, moebius(n/d)*a001350(d)^3); \\ Seiichi Manyama, Apr 29 2021

Formula

a(n) = Sum_{d|n} mu(n/d) * A001350(d)^3 = Sum_{d|n} mu(n/d) * A324487(d). - Seiichi Manyama, Apr 29 2021

Extensions

More terms from Seiichi Manyama, Apr 29 2021

A250112 Number of symmetric primitive Lucas strings of length n.

Original entry on oeis.org

1, 2, 3, 4, 10, 12, 28, 40, 54, 90, 132, 180, 260, 392, 450, 752, 918, 1404, 1672, 2600, 2898, 4818, 5336, 8424, 9350, 15288, 16254, 26656, 28594, 46530, 49476, 80928, 84810, 140250, 146090, 239760, 250268, 412528, 426036, 702480, 726110, 1196244, 1232208
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2014

Keywords

Crossrefs

Extensions

More terms from Lars Blomberg, Dec 05 2016

A250113 Number of asymmetric Lucas strings of length n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 18, 20, 66, 120, 260, 420, 900, 1408, 2652, 4284, 7676, 12400, 21546, 34584, 58742, 94896, 158400, 255632, 422874, 683144, 1121256, 1812480, 2960872, 4787712, 7796184, 12608220, 20487110, 33139440, 53768252, 86981924, 140995764
Offset: 1

Views

Author

N. J. A. Sloane, Nov 19 2014

Keywords

Crossrefs

Extensions

More terms from Lars Blomberg, Dec 05 2016

A324484 Inflation orbit counts b^{(2)}_n for 2D cut and project patterns with tau-inflation.

Original entry on oeis.org

1, 0, 15, 24, 120, 240, 840, 2000, 5760, 14520, 39600, 102120, 271440, 706440, 1860360, 4860000, 12752040, 33356160, 87403800, 228750960, 599073720, 1568199600, 4106118240, 10749438000, 28143753000, 73679945040, 192900147840, 505015608720, 1322157322200, 3461443490760
Offset: 1

Views

Author

N. J. A. Sloane, Mar 12 2019

Keywords

Crossrefs

Programs

  • PARI
    a001350(n) = fibonacci(n+1)+fibonacci(n-1)-1-(-1)^n;
    a(n) = sumdiv(n, d, moebius(n/d)*a001350(d)^2); \\ Seiichi Manyama, Apr 29 2021

Formula

a(n) = Sum_{d|n} mu(n/d) * A001350(d)^2 = Sum_{d|n} mu(n/d) * A152152(d). - Seiichi Manyama, Apr 29 2021

Extensions

More terms from Seiichi Manyama, Apr 29 2021
Showing 1-7 of 7 results.