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-10 of 28 results. Next

A001461 Partial sums of A006206.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 17, 25, 36, 54, 79, 119, 177, 267, 402, 612, 928, 1420, 2170, 3334, 5125, 7911, 12216, 18926, 29346, 45610, 70960, 110610, 172577, 269685, 421830, 660648, 1035603, 1625123
Offset: 1

Views

Author

Keywords

Programs

  • Haskell
    a001461 n = a001461_list !! (n-1)
    a001461_list = scanl1 (+) a006206_list -- Reinhard Zumkeller, Jun 01 2013
    
  • Maple
    b := proc(n) local sum; sum := 0; for d in divisors(n) do sum := sum + mobius(n/d)*(fibonacci(d+1)+fibonacci(d-1)) od; RETURN(sum/n); end; A001461 := proc(n) local i; add(b(i),i=1..n); end;
  • Mathematica
    b[n_] := Sum[MoebiusMu[n/d] (Fibonacci[d + 1] + Fibonacci[d - 1]), {d, Divisors[n]}]/n; Accumulate[Table[b[n], {n, 35}]] (* Jean-François Alcover, Dec 02 2011 *)
  • Sage
    def a(n):
        return sum((fibonacci(d + 1) + fibonacci(d - 1)) * moebius(n // d) for d in divisors(n)) // n
    def b(n):
        return sum(a(i) for i in range(1, n + 1))

A113910 Integers of the form (Lucas(i+1) - 2*A006206(i+2))/(A006206(i+2) - A006206(i)), i > 2; Lucas = A000204.

Original entry on oeis.org

3, 7, 5, 9, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 521, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1481, 1487
Offset: 1

Views

Author

Creighton Dement, Jan 29 2006

Keywords

Comments

Let p and p+2 be twin primes. Then Lucas(p) = 1 + p*A006206(p) and Lucas(p+2) = 1 + (p+2)*A006206(p+2). It follows from Lucas(n) + Lucas(n+1) = Lucas(n+2) that p = (Lucas(p+1) - 2*A006206(p+2))/(A006206(p+2) - A006206(p))
For i = 3, 4, 5, 6, 7, 8, 9, 10, 11: ((Lucas(i+1) - 2*A006206(i+2))/(A006206(i+2) - A006206(i))) = (3, 7, 5, 19/3, 31/4, 9, 87/10, 149/14, 11, 135/11, 663/50, 1094/77, 1787/120, 2939/181, 17, 7849/434, 12799/672, 20894/1041, 34031/1622, 55469/2514, 45131/1962, 146921/6115, 238915/9554, 194252/7465, 631347/23386, 1025917/36617, 29, 2706059/90178, 4393211/141710, 3565643/111405, 11573003/350702). - Creighton Dement, Jan 31 2006

Crossrefs

Programs

  • Maple
    # First 63 Terms with(combinat): with(numtheory): A006206 := proc(n) local sum; sum := 0; for d in divisors(n) do sum := sum + mobius(n/d)*(fibonacci(d+1)+fibonacci(d-1)) od; RETURN(sum/n); end; A000204 := n->fibonacci(n+1)+fibonacci(n-1); T := n -> (A000204(n+1) - 2*A006206(n+2))/(A006206(n+2)-A006206(n)); A113910 := []: for i from 3 by 1 to 2000 do if is(T(i) = floor(T(i))) then A113910 := [op(A113910), T(i)]; fi: od: A113910; # Creighton Dement, Jan 15 2009

Formula

It is conjectured that a(n+4) = A001359(n+2) for all n.

Extensions

Extended and Maple definition by Creighton Dement, Jan 15 2009

A286271 a(0)=1; thereafter a(n) = Sum_{k=2..n+1} A006206(k).

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 16, 24, 35, 53, 78, 118, 176, 266, 401, 611, 927, 1419, 2169, 3333, 5124, 7910, 12215, 18925, 29345, 45609, 70959, 110609, 172576, 269684, 421829, 660647, 1035602, 1625122, 2552322, 4012282, 6312136, 9938336, 15658610, 24689060, 38952138
Offset: 0

Views

Author

N. J. A. Sloane, May 08 2017

Keywords

Crossrefs

Partial sums of A060280.

Extensions

Offset and definition corrected by N. J. A. Sloane, Jun 16 2021

A000204 Lucas numbers (beginning with 1): L(n) = L(n-1) + L(n-2) with L(1) = 1, L(2) = 3.

Original entry on oeis.org

1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778, 9349, 15127, 24476, 39603, 64079, 103682, 167761, 271443, 439204, 710647, 1149851, 1860498, 3010349, 4870847, 7881196, 12752043, 20633239, 33385282, 54018521, 87403803, 141422324
Offset: 1

Views

Author

Keywords

Comments

See A000032 for the version beginning 2, 1, 3, 4, 7, ...
Also called Schoute's accessory series (see Jean, 1984). - N. J. A. Sloane, Jun 08 2011
L(n) is the number of matchings in a cycle on n vertices: L(4)=7 because the matchings in a square with edges a, b, c, d (labeled consecutively) are the empty set, a, b, c, d, ac and bd. - Emeric Deutsch, Jun 18 2001
This comment covers a family of sequences which satisfy a recurrence of the form a(n) = a(n-1) + a(n-m), with a(n) = 1 for n = 1..m - 1, a(m) = m + 1. The generating function is (x + m*x^m)/(1 - x - x^m). Also a(n) = 1 + n*Sum_{i=1..n/m} binomial(n - 1 - (m - 1)*i, i - 1)/i. This gives the number of ways to cover (without overlapping) a ring lattice (or necklace) of n sites with molecules that are m sites wide. Special cases: m = 2: A000204, m = 3: A001609, m = 4: A014097, m = 5: A058368, m = 6: A058367, m = 7: A058366, m = 8: A058365, m = 9: A058364.
L(n) is the number of points of period n in the golden mean shift. The number of orbits of length n in the golden mean shift is given by the n-th term of the sequence A006206. - Thomas Ward, Mar 13 2001
Row sums of A029635 are 1, 1, 3, 4, 7, ... - Paul Barry, Jan 30 2005
a(n) counts circular n-bit strings with no repeated 1's. E.g., for a(5): 00000 00001 00010 00100 00101 01000 01001 01010 10000 10010 10100. Note #{0...} = fib(n+1), #{1...} = fib(n-1), #{000..., 001..., 100...} = a(n-1), #{010..., 101...} = a(n-2). - Len Smiley, Oct 14 2001
Row sums of the triangle in A182579. - Reinhard Zumkeller, May 07 2012
If p is prime then L(p) == 1 (mod p). L(2^k) == -1 (mod 2^(k+1)) for k = 0,1,2,... - Thomas Ordowski, Sep 25 2013
Satisfies Benford's law [Brown-Duncan, 1970; Berger-Hill, 2017]. - N. J. A. Sloane, Feb 08 2017

Examples

			G.f. = x + 3*x^2 + 4*x^3 + 7*x^4 + 11*x^5 + 18*x^6 + 29*x^7 + 47*x^8 + ...
		

References

  • P. Bachmann, Niedere Zahlentheorie (1902, 1910), reprinted Chelsea, NY, 1968, vol. 2, p. 69.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 46.
  • Leonhard Euler, Introductio in analysin infinitorum (1748), sections 216 and 229.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 148.
  • Silvia Heubach and Toufik Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.
  • V. E. Hoggatt, Jr., Fibonacci and Lucas Numbers. Houghton, Boston, MA, 1969.
  • R. V. Jean, Mathematical Approach to Pattern and Form in Plant Growth, Wiley, 1984. See p. 5. - N. J. A. Sloane, Jun 08 2011
  • Thomas Koshy, "Fibonacci and Lucas Numbers with Applications", John Wiley and Sons, 2001.
  • 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).
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Programs

  • Haskell
    a000204 n = a000204_list !! n
    a000204_list = 1 : 3 : zipWith (+) a000204_list (tail a000204_list)
    -- Reinhard Zumkeller, Dec 18 2011
    
  • Magma
    [Lucas(n): n in [1..30]]; // G. C. Greubel, Dec 17 2017
    
  • Maple
    A000204 := proc(n) option remember; if n <=2 then 2*n-1; else procname(n-1)+procname(n-2); fi; end;
    with(combinat): A000204 := n->fibonacci(n+1)+fibonacci(n-1);
    # alternative Maple program:
    L:= n-> (<<1|1>, <1|0>>^n. <<2, -1>>)[1, 1]:
    seq(L(n), n=1..50);  # Alois P. Heinz, Jul 25 2008
    # Alternative:
    a := n -> `if`(n=1, 1, `if`(n=2, 3, hypergeom([(1-n)/2, -n/2], [1-n], -4))):
    seq(simplify(a(n)), n=1..39); # Peter Luschny, Sep 03 2019
  • Mathematica
    c = (1 + Sqrt[5])/2; Table[Expand[c^n + (1 - c)^n], {n, 30}] (* Artur Jasinski, Oct 05 2008 *)
    Table[LucasL[n, 1], {n, 36}] (* Zerinvary Lajos, Jul 09 2009 *)
    LinearRecurrence[{1, 1},{1, 3}, 50] (* Sture Sjöstedt, Nov 28 2011 *)
    lukeNum[n_] := If[n < 1, 0, LucasL[n]]; (* Michael Somos, May 18 2015 *)
    lukeNum[n_] := SeriesCoefficient[x D[Log[1 / (1 - x - x^2)], x], {x, 0, n}]; (* Michael Somos, May 18 2015 *)
  • PARI
    A000204(n)=fibonacci(n+1)+fibonacci(n-1) \\ Michael B. Porter, Nov 05 2009
    
  • Python
    from functools import cache
    @cache
    def a(n): return [1, 3][n-1] if n < 3 else a(n-1) + a(n-2)
    print([a(n) for n in range(1, 41)]) # Michael S. Branicky, Nov 13 2022
    
  • Python
    [(i:=-1)+(j:=2)] + [(j:=i+j)+(i:=j-i) for  in range(100)] # _Jwalin Bhatt, Apr 02 2025
  • Sage
    def A000204():
        x, y = 1, 2
        while true:
           yield x
           x, y = x + y, x
    a = A000204(); print([next(a) for i in range(39)])  # Peter Luschny, Dec 17 2015
    
  • Scala
    def lucas(n: BigInt): BigInt = {
      val zero = BigInt(0)
      def fibTail(n: BigInt, a: BigInt, b: BigInt): BigInt = n match {
        case `zero` => a
        case _ => fibTail(n - 1, b, a + b)
      }
      fibTail(n, 2, 1)
    }
    (1 to 50).map(lucas()) // _Alonso del Arte, Oct 20 2019
    

Formula

Expansion of x(1 + 2x)/(1 - x - x^2). - Simon Plouffe, dissertation 1992; multiplied by x. - R. J. Mathar, Nov 14 2007
a(n) = A000045(2n)/A000045(n). - Benoit Cloitre, Jan 05 2003
For n > 1, L(n) = F(n + 2) - F(n - 2), where F(n) is the n-th Fibonacci number (A000045). - Gerald McGarvey, Jul 10 2004
a(n+1) = 4*A054886(n+3) - A022388(n) - 2*A022120(n+1) (a conjecture; note that the above sequences have different offsets). - Creighton Dement, Nov 27 2004
a(n) = Sum_{k=0..floor((n+1)/2)} (n+1)*binomial(n - k + 1, k)/(n - k + 1). - Paul Barry, Jan 30 2005
L(n) = A000045(n+3) - 2*A000045(n). - Creighton Dement, Oct 07 2005
L(n) = A000045(n+1) + A000045(n-1). - John Blythe Dobson, Sep 29 2007
a(n) = 2*Fibonacci(n-1) + Fibonacci(n), n >= 1. - Zerinvary Lajos, Oct 05 2007
L(n) is the term (1, 1) in the 1 X 2 matrix [2, -1].[1, 1; 1, 0]^n. - Alois P. Heinz, Jul 25 2008
a(n) = phi^n + (1 - phi)^n = phi^n + (-phi)^(-n) = ((1 + sqrt(5))^n + (1 - sqrt(5))^n)/(2^n) where phi is the golden ratio (A001622). - Artur Jasinski, Oct 05 2008
a(n) = A014217(n+1) - A014217(n-1). See A153263. - Paul Curtz, Dec 22 2008
a(n) = ((1 + sqrt(5))^n - (1 - sqrt(5))^n)/(2^n*sqrt(5)) + ((1 + sqrt(5))^(n - 1) - (1 - sqrt(5))^(n - 1))/(2^(n - 2)*sqrt(5)). - Al Hakanson (hawkuu(AT)gmail.com), Jan 12 2009, Jan 14 2009
From Hieronymus Fischer, Oct 20 2010 (Start)
Continued fraction for n odd: [L(n); L(n), L(n), ...] = L(n) + fract(Fib(n) * phi).
Continued fraction for n even: [L(n); -L(n), L(n), -L(n), L(n), ...] = L(n) - 1 + fract(Fib(n)*phi). Also: [L(n) - 2; 1, L(n) - 2, 1, L(n) - 2, ...] = L(n) - 2 + fract(Fib(n)*phi). (End)
INVERT transform of (1, 2, -1, -2, 1, 2, ...). - Gary W. Adamson, Mar 07 2012
L(2n - 1) = floor(phi^(2n - 1)); L(2n) = ceiling(phi^(2n)). - Thomas Ordowski, Jun 15 2012
a(n) = hypergeom([(1 - n)/2, -n/2], [1 - n], -4) for n >= 3. - Peter Luschny, Sep 03 2019
E.g.f.: 2*(exp(x/2)*cosh(sqrt(5)*x/2) - 1). - Stefano Spezia, Jul 26 2022

Extensions

Additional comments from Yong Kong (ykong(AT)curagen.com), Dec 16 2000
Plouffe Maple line edited by N. J. A. Sloane, May 13 2008

A001037 Number of degree-n irreducible polynomials over GF(2); number of n-bead necklaces with beads of 2 colors when turning over is not allowed and with primitive period n; number of binary Lyndon words of length n.

Original entry on oeis.org

1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, 630, 1161, 2182, 4080, 7710, 14532, 27594, 52377, 99858, 190557, 364722, 698870, 1342176, 2580795, 4971008, 9586395, 18512790, 35790267, 69273666, 134215680, 260300986, 505286415, 981706806, 1908866960, 3714566310, 7233615333, 14096302710, 27487764474
Offset: 0

Views

Author

Keywords

Comments

Also dimensions of free Lie algebras - see A059966, which is essentially the same sequence.
This sequence also represents the number N of cycles of length L in a digraph under x^2 seen modulo a Mersenne prime M_q=2^q-1. This number does not depend on q and L is any divisor of q-1. See Theorem 5 and Corollary 3 of the Shallit and Vasiga paper: N=sum(eulerphi(d)/order(d,2)) where d is a divisor of 2^(q-1)-1 such that order(d,2)=L. - Tony Reix, Nov 17 2005
Except for a(0) = 1, Bau-Sen Du's [1985/2007] Table 1, p. 6, has this sequence as the 7th (rightmost) column. Other columns of the table include (but are not identified as) A006206-A006208. - Jonathan Vos Post, Jun 18 2007
"Number of binary Lyndon words" means: number of binary strings inequivalent modulo rotation (cyclic permutation) of the digits and not having a period smaller than n. This provides a link to A103314, since these strings correspond to the inequivalent zero-sum subsets of U_m (m-th roots of unity) obtained by taking the union of U_n (n|m) with 0 or more U_d (n | d, d | m) multiplied by some power of exp(i 2Pi/n) to make them mutually disjoint. (But not all zero-sum subsets of U_m are of that form.) - M. F. Hasler, Jan 14 2007
Also the number of dynamical cycles of period n of a threshold Boolean automata network which is a quasi-minimal positive circuit of size a multiple of n and which is updated in parallel. - Mathilde Noual (mathilde.noual(AT)ens-lyon.fr), Feb 25 2009
Also, the number of periodic points with (minimal) period n in the iteration of the tent map f(x):=2min{x,1-x} on the unit interval. - Pietro Majer, Sep 22 2009
Number of distinct cycles of minimal period n in a shift dynamical system associated with a totally disconnected hyperbolic iterated function system (see Barnsley link). - Michel Marcus, Oct 06 2013
From Jean-Christophe Hervé, Oct 26 2014: (Start)
For n > 0, a(n) is also the number of orbits of size n of the transform associated to the Kolakoski sequence A000002 (and this is true for any map with 2^n periodic points of period n). The Kolakoski transform changes a sequence of 1's and 2's by the sequence of the lengths of its runs. The Kolakoski sequence is one of the two fixed points of this transform, the other being the same sequence without the initial term. A025142 and A025143 are the periodic points of the orbit of size 2. A027375(n) = n*a(n) gives the number of periodic points of minimal period n.
For n > 1, this sequence is equal to A059966 and to A060477, and for n = 1, a(1) = A059966(1)+1 = A060477(1)-1; this because the n-th term of all 3 sequences is equal to (1/n)*sum_{d|n} mu(n/d)*(2^d+e), with e = -1/0/1 for resp. A059966/this sequence/A060477, and sum_{d|n} mu(n/d) equals 1 for n = 1 and 0 for all n > 1. (End)
Warning: A000031 and A001037 are easily confused, since they have similar formulas.
From Petros Hadjicostas, Jul 14 2020: (Start)
Following Kam Cheong Au (2020), let d(w,N) be the dimension of the Q-span of weight w and level N of colored multiple zeta values (CMZV). Here Q are the rational numbers.
Deligne's bound says that d(w,N) <= D(w,N), where 1 + Sum_{w >= 1} D(w,N)*t^w = (1 - a*t + b*t^2)^(-1) when N >= 3, where a = phi(N)/2 + omega(N) and b = omega(N) - 1 (with omega(N) = A001221(N) being the number of distinct primes of N).
For N = 3, a = phi(3)/2 + omega(3) = 2/2 + 1 = 2 and b = omega(3) - 1 = 0. It follows that D(w, N=3) = A000079(w) = 2^w.
For some reason, Kam Cheong Au (2020) assumes Deligne's bound is tight, i.e., d(w,N) = D(w,N). He sets Sum_{w >= 1} c(w,N)*t^w = log(1 + Sum_{w >= 1} d(w,N)*t^w) = log(1 + Sum_{w >= 1} D(w,N)*t^w) = -log(1 - a*t + b*t^2) for N >= 3.
For N = 3, we get that c(w, N=3) = A000079(w)/w = 2^w/w.
He defines d*(w,N) = Sum_{k | w} (mu(k)/k)*c(w/k,N) to be the "number of primitive constants of weight w and level N". (Using the terminology of A113788, we may perhaps call d*(w,N) the number of irreducible colored multiple zeta values at weight w and level N.)
Using standard techniques of the theory of g.f.'s, we can prove that Sum_{w >= 1} d*(w,N)*t^w = Sum_{s >= 1} (mu(s)/s) Sum_{k >= 1} c(k,N)*(t^s)^k = -Sum_{s >= 1} (mu(s)/s)*log(1 - a*t^s + b*t^(2*s)).
For N = 3, we saw that a = 2 and b = 0, and hence d*(w, N=3) = a(w) = Sum_{k | w} (mu(k)/k) * 2^(w/k) / (w/k) = (1/w) * Sum_{k | w} mu(k) * 2^(w/k) for w >= 1. See Table 1 on p. 6 in Kam Cheong Au (2020). (End)

Examples

			Binary strings (Lyndon words, cf. A102659):
a(0) = 1 = #{ "" },
a(1) = 2 = #{ "0", "1" },
a(2) = 1 = #{ "01" },
a(3) = 2 = #{ "001", "011" },
a(4) = 3 = #{ "0001", "0011", "0111" },
a(5) = 6 = #{ "00001", "00011", "00101", "00111", "01011", "01111" }.
		

References

  • Michael F. Barnsley, Fractals Everywhere, Academic Press, San Diego, 1988, page 171, Lemma 3.
  • E. R. Berlekamp, Algebraic Coding Theory, McGraw-Hill, NY, 1968, p. 84.
  • E. L. Blanton, Jr., S. P. Hurd and J. S. McCranie. On the digraph defined by squaring mod m, when m has primitive roots. Congr. Numer. 82 (1991), 167-177.
  • P. J. Freyd and A. Scedrov, Categories, Allegories, North-Holland, Amsterdam, 1990. See 1.925.
  • M. Lothaire, Combinatorics on Words, Addison-Wesley, Reading, MA, 1983, pp. 65, 79.
  • Robert M. May, "Simple mathematical models with very complicated dynamics." Nature, Vol. 261, June 10, 1976, pp. 459-467; reprinted in The Theory of Chaotic Attractors, pp. 85-93. Springer, New York, NY, 2004. The sequences listed in Table 2 are A000079, A027375, A000031, A001037, A000048, A051841. - N. J. A. Sloane, Mar 17 2019
  • Guy Melançon, Factorizing infinite words using Maple, MapleTech Journal, vol. 4, no. 1, 1997, pp. 34-42, esp. p. 36.
  • M. R. Nester, (1999). Mathematical investigations of some plant interaction designs. PhD Thesis. University of Queensland, Brisbane, Australia. [See A056391 for pdf file of Chap. 2]
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence in entries N0046 and N0287).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 2 of A074650.
Row sums of A051168, which gives the number of Lyndon words with fixed number of zeros and ones.
Euler transform is A000079.
See A058943 and A102569 for initial terms. See also A058947, A011260, A059966.
Irreducible over GF(2), GF(3), GF(4), GF(5), GF(7): A058943, A058944, A058948, A058945, A058946. Primitive irreducible over GF(2), GF(3), GF(4), GF(5), GF(7): A058947, A058949, A058952, A058950, A058951.
Cf. A000031 (n-bead necklaces but may have period dividing n), A014580, A046211, A046209, A006206-A006208, A038063, A060477, A103314.
See also A102659 for the list of binary Lyndon words themselves.

Programs

  • Haskell
    a001037 0 = 1
    a001037 n = (sum $ map (\d -> (a000079 d) * a008683 (n `div` d)) $
                           a027750_row n) `div` n
    -- Reinhard Zumkeller, Feb 01 2013
    
  • Maple
    with(numtheory): A001037 := proc(n) local a,d; if n = 0 then RETURN(1); else a := 0: for d in divisors(n) do a := a+mobius(n/d)*2^d; od: RETURN(a/n); fi; end;
  • Mathematica
    f[n_] := Block[{d = Divisors@ n}, Plus @@ (MoebiusMu[n/d]*2^d/n)]; Array[f, 32]
  • PARI
    A001037(n)=if(n>1,sumdiv(n,d,moebius(d)*2^(n/d))/n,n+1) \\ Edited by M. F. Hasler, Jan 11 2016
    
  • PARI
    {a(n)=polcoeff(1-sum(k=1,n,moebius(k)/k*log(1-2*x^k+x*O(x^n))),n)} \\ Paul D. Hanna, Oct 13 2010
    
  • PARI
    a(n)=if(n>1,my(s);forstep(i=2^n+1,2^(n+1),2,s+=polisirreducible(Mod(1,2) * Pol(binary(i))));s,n+1) \\ Charles R Greathouse IV, Jan 26 2012
    
  • Python
    from sympy import divisors, mobius
    def a(n): return sum(mobius(d) * 2**(n//d) for d in divisors(n))/n if n>1 else n + 1 # Indranil Ghosh, Apr 26 2017

Formula

For n >= 1:
a(n) = (1/n)*Sum_{d | n} mu(n/d)*2^d.
A000031(n) = Sum_{d | n} a(d).
2^n = Sum_{d | n} d*a(d).
a(n) = A027375(n)/n.
a(n) = A000048(n) + A051841(n).
For n > 1, a(n) = A059966(n) = A060477(n).
G.f.: 1 - Sum_{n >= 1} moebius(n)*log(1 - 2*x^n)/n, where moebius(n) = A008683(n). - Paul D. Hanna, Oct 13 2010
From Richard L. Ollerton, May 10 2021: (Start)
For n >= 1:
a(n) = (1/n)*Sum_{k=1..n} mu(gcd(n,k))*2^(n/gcd(n,k))/phi(n/gcd(n,k)).
a(n) = (1/n)*Sum_{k=1..n} mu(n/gcd(n,k))*2^gcd(n,k)/phi(n/gcd(n,k)). (End)
a(n) ~ 2^n / n. - Vaclav Kotesovec, Aug 11 2021

Extensions

Revised by N. J. A. Sloane, Jun 10 2012

A005596 Decimal expansion of Artin's constant Product_{p=prime} (1-1/(p^2-p)).

Original entry on oeis.org

3, 7, 3, 9, 5, 5, 8, 1, 3, 6, 1, 9, 2, 0, 2, 2, 8, 8, 0, 5, 4, 7, 2, 8, 0, 5, 4, 3, 4, 6, 4, 1, 6, 4, 1, 5, 1, 1, 1, 6, 2, 9, 2, 4, 8, 6, 0, 6, 1, 5, 0, 0, 4, 2, 0, 9, 4, 7, 4, 2, 8, 0, 2, 4, 1, 7, 3, 5, 0, 1, 8, 2, 0, 4, 0, 0, 2, 8, 0, 8, 2, 3, 4, 4, 3, 0, 4, 3, 1, 7, 0, 8, 7, 2, 5, 0, 5, 6, 8, 9, 8, 1, 6, 0, 3
Offset: 0

Views

Author

Keywords

Comments

On Simon Plouffe's web page (and in the book freely available at Gutenberg project) the value is given with an error of +1e-31, as "...651641..." instead of "...641641...". In the reference [Wrench, 1961] cited there, these digits are correct. They are also correct on the Plouffe's Inverter page, as computed by Oliveira e Silva, who comments it took 1 hour at 200 MHz with Mathematica. Using Amiram Eldar's PARI program, the same 500 digits are computed instantly (less than 0.1 sec). - M. F. Hasler, Apr 20 2021
Named after the Austrian mathematician Emil Artin (1898-1962). - Amiram Eldar, Jun 20 2021

Examples

			0.37395581361920228805472805434641641511162924860615...
		

References

  • Henri Cohen, Number Theory, Volume II: Analytic and Modern Tools, GTM Vol. 240, Springer, 2007; see pp. 208-209.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 169.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a = Exp[-NSum[ (LucasL[n] - 1)/n PrimeZetaP[n], {n, 2, Infinity}, PrecisionGoal -> 500, WorkingPrecision -> 500, NSumTerms -> 100000]]; RealDigits[a, 10, 111][[1]] (* Robert G. Wilson v, Sep 03 2014 taken from Mathematica's Help file on PrimeZetaP *)
  • PARI
    prodinf(n=2,1/zeta(n)^(sumdiv(n, d, moebius(n/d)*(fibonacci(d-1)+fibonacci(d+1)))/n)) \\ Charles R Greathouse IV, Aug 27 2014
    
  • PARI
    prodeulerrat(1-1/(p^2-p)) \\ Amiram Eldar, Mar 12 2021

Formula

Equals Product_{j>=2} 1/Zeta(j)^A006206(j), where Zeta = A013661, A002117 etc. is Riemann's zeta function. - R. J. Mathar, Feb 14 2009
Equals Sum_{k>=1} mu(k)/(k*phi(k)), where mu is the Moebius function (A008683) and phi is the Euler totient function (A000010). - Amiram Eldar, Mar 11 2020
Equals 1/A065488. - Vaclav Kotesovec, Jul 17 2021

Extensions

More terms from Tomás Oliveira e Silva (http://www.ieeta.pt/~tos)

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

Original entry on oeis.org

1, 2, 2, 3, 3, 5, 5, 8, 10, 15, 19, 31, 41, 64, 94, 143, 211, 329, 493, 766, 1170, 1811, 2787, 4341, 6713, 10462, 16274, 25415, 39651, 62075, 97109, 152288, 238838, 375167, 589527, 927555, 1459961, 2300348, 3626242, 5721045, 9030451, 14264309, 22542397, 35646312, 56393862, 89264835, 141358275
Offset: 1

Views

Author

Keywords

Comments

a(n) is also the number of inequivalent compositions of n into parts 1 and 2 where two compositions are considered to be equivalent if one is a cyclic rotation of the other. a(6)=5 because we have: 2+2+2, 2+2+1+1, 2+1+2+1, 2+1+1+1+1, 1+1+1+1+1+1. - Geoffrey Critzer, Feb 01 2014
Moebius transform is A006206. - Michael Somos, Jun 02 2019

Examples

			G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + 5*x^6 + 5*x^7 + 8*x^8 + 10*x^9 + ... - _Michael Somos_, Jun 02 2019
Binary necklaces are: 1; 01, 11; 011, 111; 0101, 0111, 1111; 01010, 01011, 01111. - _Michael Somos_, Jun 02 2019
		

References

  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 499.
  • T. Helleseth and A. Kholosha, Bent functions and their connections to combinatorics, in Surveys in Combinatorics 2013, edited by Simon R. Blackburn, Stefanie Gerke, Mark Wildon, Camb. Univ. Press, 2013.

Crossrefs

Column k=0 of A320341.

Programs

  • Maple
    A000358 := proc(n) local sum; sum := 0; for d in divisors(n) do sum := sum + phi(n/d)*(fibonacci(d+1)+fibonacci(d-1)) od; RETURN(sum/n); end;
    with(combstruct); spec := {A=Union(zero,Cycle(one),Cycle(Prod(zero,Sequence(one,card>0)))),one=Atom,zero=Atom}; seq(count([A,spec,unlabeled],size=i),i=1..30);
  • Mathematica
    nn=48;Drop[Map[Total,Transpose[Map[PadRight[#,nn]&,Table[ CoefficientList[ Series[CycleIndex[CyclicGroup[n],s]/.Table[s[i]->x^i+x^(2i),{i,1,n}],{x,0,nn}],x],{n,0,nn}]]]],1] (* Geoffrey Critzer, Feb 01 2014 *)
    max = 50; B[x_] := x*(1+x); A = Sum[EulerPhi[k]/k*Log[1/(1-B[x^k])], {k, 1, max}]/x + O[x]^max; CoefficientList[A, x] (* Jean-François Alcover, Feb 08 2016, after Joerg Arndt *)
    Table[1/n * Sum[EulerPhi[n/d] Total@ Map[Fibonacci, d + # & /@ {-1, 1}], {d, Divisors@ n}], {n, 47}] (* Michael De Vlieger, Dec 28 2016 *)
    a[ n_] := If[ n < 1, 0, DivisorSum[n, EulerPhi[n/#] LucasL[#] &]/n]; (* Michael Somos, Jun 02 2019 *)
  • PARI
    N=66;  x='x+O('x^N);
    B(x)=x*(1+x);
    A=sum(k=1, N, eulerphi(k)/k*log(1/(1-B(x^k))));
    Vec(A)
    /* Joerg Arndt, Aug 06 2012 */
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv(n, d, eulerphi(n/d) * (fibonacci(d+1) + fibonacci(d-1)))/n)}; /* Michael Somos, Jun 02 2019 */
    
  • Python
    from sympy import totient, lucas, divisors
    def A000358(n): return (n&1^1)+sum(totient(n//k)*(lucas(k)-((k&1^1)<<1)) for k in divisors(n,generator=True))//n # Chai Wah Wu, Sep 23 2023

Formula

a(n) = (1/n) * Sum_{ d divides n } totient(n/d) [ Fib(d-1)+Fib(d+1) ].
G.f.: Sum_{k>=1} phi(k)/k * log( 1/(1-B(x^k)) ) where B(x)=x*(1+x). - Joerg Arndt, Aug 06 2012
a(n) ~ ((1+sqrt(5))/2)^n / n. - Vaclav Kotesovec, Sep 12 2014
a(n) = Sum_{0 <= i <= ceiling((n-1)/2)} [ (1/(n - i)) * Sum_{d|gcd(i, n-i)} phi(d) * binomial((n - i)/d, i/d) ]. (This is DeFord's formula for the number of distinct Lucas tilings of a 1 X n bracelet up to symmetry, even though in the paper he refers to sequence A032192(n) = a(n) - 1.) - Petros Hadjicostas, Jun 07 2019

A002571 From a definite integral.

Original entry on oeis.org

1, 5, 10, 30, 74, 199, 515, 1355, 3540, 9276, 24276, 63565, 166405, 435665, 1140574, 2986074, 7817630, 20466835, 53582855, 140281751, 367262376, 961505400, 2517253800, 6590256025, 17253514249, 45170286749, 118257345970
Offset: 1

Views

Author

Keywords

Comments

a(n) are the row sums of the elements of the Golden Triangle (A180662) with alternating signs. - Alexander Adamchuk, Oct 18 2010
Limit_{n->oo} A002570(n)/A002571(n) = 1/sqrt(5). - Sean A. Irvine, Apr 09 2014

Examples

			From _Paul D. Hanna_, Feb 20 2009: (Start)
G.f.: A(x) = x + 5*x^2 + 10*x^3 + 30*x^4 + 74*x^5 + 199*x^6 + ...
log(1+A(x)) = x + 3^2*x^2/2 + 4^2*x^3/3 + 7^2*x^4/4 + 11^2*x^5/5 + ... (End)
G.f.: A(x) = -1 + 1/((1-x-x^2) * (1-3*x^2+x^4) * (1-4*x^3-x^6) * (1-7*x^4+x^8) * (1-11*x^5-x^10)^2 * (1-18*x^6+x^12)^2 * (1-29*x^7-x^14)^4 * (1-47*x^8+x^16)^5 * (1-76*x^9-x^18)^8 * ...* (1 - Lucas(n)*x^n + (-1)^n*x^(2*n))^A006206(n) * ...). - _Paul D. Hanna_, Jan 07 2012
		

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

Cf. A001654, A180662 - The Golden Triangle. - Alexander Adamchuk, Oct 18 2010

Programs

  • Maple
    A002571:=-(-1-4*z-z**2+z**3)/(z**2-3*z+1)/(1+z)**2; # conjectured (probably correctly) by Simon Plouffe in his 1992 dissertation
  • PARI
    {a(n)=polcoeff(exp(sum(m=1,n,(fibonacci(m+1)+fibonacci(m-1))^2*x^m/m)+x*O(x^n)),n)} \\ Paul D. Hanna, Feb 20 2009

Formula

Appears to have g.f. x/((1-3x+x^2)*(1+x)^2). - Ralf Stephan, Apr 14 2004
a(n) = (-1)^n*Sum_{i=1..n+1} (-1)^(i+1)*Fibonacci(i)*Fibonacci(i+1). - Alexander Adamchuk, Jun 16 2006
From Paul D. Hanna, Feb 20 2009: (Start)
Given g.f. A(x), then log(1+A(x)) = Sum_{n>=1} A000204(n)^2 * x^n/n where A000204 is the Lucas numbers.
a(n) = (1/n)*(A000204(n)^2 + Sum_{k=1..n-1} A000204(k)^2*a(n-k)) for n>1, with a(1) = 1. (End)
G.f.: -1 + 1/Product_{n>=1} (1 - Lucas(n)*x^n + (-1)^n*x^(2*n))^A006206(n), where A006206(n) is the number of aperiodic binary necklaces of length n with no subsequence 00. - Paul D. Hanna, Jan 07 2012
a(n) = 8*a(n-2) - 8*a(n-4) + a(n-6) + 2(-1)^n, n>6. - Sean A. Irvine, Apr 09 2014
a(n) - a(n-2) = Fibonacci(n+1)^2. - Peter Bala, Aug 30 2015

Extensions

More terms from Max Alekseyev and Alexander Adamchuk, Oct 18 2010

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

A203853 a(n) = (1/n) * Sum_{d|n} moebius(n/d) * Lucas(d)^2, where Lucas(n) = A000204(n).

Original entry on oeis.org

1, 4, 5, 10, 24, 50, 120, 270, 640, 1500, 3600, 8610, 20880, 50700, 124024, 304290, 750120, 1854400, 4600200, 11440548, 28527320, 71289000, 178526880, 447910470, 1125750120, 2833885800, 7144449920, 18036373140, 45591631800, 115381697740, 292329067800, 741410800830
Offset: 1

Views

Author

Paul D. Hanna, Jan 07 2012

Keywords

Comments

Apparently the same as A032170, if n > 2. - R. J. Mathar, Jan 11 2012

Examples

			G.f.: F(x) = 1/((1-x-x^2) * (1-3*x^2+x^4)^4 * (1-4*x^3-x^6)^5 * (1-7*x^4+x^8)^10 * (1-11*x^5-x^10)^24 * (1-18*x^6+x^12)^50 * (1-29*x^7-x^14)^120 * ... * (1 - Lucas(n)*x^n + (-1)^n*x^(2*n))^a(n) * ...)
where F(x) = exp( Sum_{n>=1} Lucas(n)^3 * x^n/n ) = g.f. of A203803:
F(x) = 1 + x + 14*x^2 + 35*x^3 + 205*x^4 + 744*x^5 + 3414*x^6 + ...
where
log(F(x)) = x + 3^3*x^2/2 + 4^3*x^3/3 + 7^3*x^4/4 + 11^3*x^5/5 + 18^3*x^6/6 + 29^3*x^7/7 + 47^3*x^8/8 + ... + Lucas(n)^3*x^n/n + ...
		

Crossrefs

Programs

  • Mathematica
    a[n_]:= 1/n DivisorSum[n, MoebiusMu[n/#] LucasL[#]^2 &]; Array[a, 30] (* G. C. Greubel, Dec 25 2017 *)
  • PARI
    {a(n)=if(n<1, 0, sumdiv(n, d, moebius(n/d)*(fibonacci(d-1)+fibonacci(d+1))^2)/n)}
    
  • PARI
    {Lucas(n)=fibonacci(n-1)+fibonacci(n+1)}
    {a(n)=local(F=exp(sum(m=1, n, Lucas(m)^3*x^m/m)+x*O(x^n)));if(n==1,1,polcoeff(F*prod(k=1,n-1,(1 - Lucas(k)*x^k + (-1)^k*x^(2*k) +x*O(x^n))^a(k)),n)/Lucas(n))}

Formula

G.f.: 1/Product_{n>=1} (1 - Lucas(n)*x^n + (-1)^n*x^(2*n))^a(n) = exp(Sum_{n>=1} Lucas(n)^3 * x^n/n), which is the g.f. of A203803.
a(n) ~ phi^(2*n) / n, where phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Sep 02 2017
Showing 1-10 of 28 results. Next