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.

Previous Showing 11-20 of 21685 results. Next

A008836 Liouville's function lambda(n) = (-1)^k, where k is number of primes dividing n (counted with multiplicity).

Original entry on oeis.org

1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1
Offset: 1

Views

Author

Keywords

Comments

Coons and Borwein: "We give a new proof of Fatou's theorem: if an algebraic function has a power series expansion with bounded integer coefficients, then it must be a rational function. This result is applied to show that for any non-trivial completely multiplicative function from N to {-1,1}, the series sum_{n=1..infinity} f(n)z^n is transcendental over {Z}[z]; in particular, sum_{n=1..infinity} lambda(n)z^n is transcendental, where lambda is Liouville's function. The transcendence of sum_{n=1..infinity} mu(n)z^n is also proved." - Jonathan Vos Post, Jun 11 2008
Coons proves that a(n) is not k-automatic for any k > 2. - Jonathan Vos Post, Oct 22 2008
The Riemann hypothesis is equivalent to the statement that for every fixed epsilon > 0, lim_{n -> infinity} (a(1) + a(2) + ... + a(n))/n^(1/2 + epsilon) = 0 (Borwein et al., theorem 1.2). - Arkadiusz Wesolowski, Oct 08 2013

Examples

			a(4) = 1 because since bigomega(4) = 2 (the prime divisor 2 is counted twice), then (-1)^2 = 1.
a(5) = -1 because 5 is prime and therefore bigomega(5) = 1 and (-1)^1 = -1.
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 37.
  • P. Borwein, S. Choi, B. Rooney and A. Weirathmueller, The Riemann Hypothesis: A Resource for the Aficionado and Virtuoso Alike, Springer, Berlin, 2008, pp. 1-11.
  • H. Gupta, On a table of values of L(n), Proceedings of the Indian Academy of Sciences. Section A, 12 (1940), 407-409.
  • H. Gupta, A table of values of Liouville's function L(n), Research Bulletin of East Panjab University, No. 3 (Feb. 1950), 45-55.
  • P. Ribenboim, Algebraic Numbers, p. 44.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 279.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Exercise 3.3.5 on page 99.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 112.

Crossrefs

Möbius transform of A010052.
Cf. A182448 (Dgf at s=2), A347328 (Dgf at s=3), A347329 (Dgf at s=4).

Programs

  • Haskell
    a008836 = (1 -) . (* 2) . a066829  -- Reinhard Zumkeller, Nov 19 2011
    
  • Maple
    A008836 := n -> (-1)^numtheory[bigomega](n); # Peter Luschny, Sep 15 2011
    with(numtheory): A008836 := proc(n) local i,it,s; it := ifactors(n): s := (-1)^add(it[2][i][2], i=1..nops(it[2])): RETURN(s) end:
  • Mathematica
    Table[LiouvilleLambda[n], {n, 100}] (* Enrique Pérez Herrero, Dec 28 2009 *)
    Table[If[OddQ[PrimeOmega[n]],-1,1],{n,110}] (* Harvey P. Dale, Sep 10 2014 *)
  • PARI
    {a(n) = if( n<1, 0, n=factor(n); (-1)^sum(i=1, matsize(n)[1], n[i,2]))}; /* Michael Somos, Jan 01 2006 */
    
  • PARI
    a(n)=(-1)^bigomega(n) \\ Charles R Greathouse IV, Jan 09 2013
    
  • Python
    from sympy import factorint
    def A008836(n): return -1 if sum(factorint(n).values()) % 2 else 1 # Chai Wah Wu, May 24 2022

Formula

Dirichlet g.f.: zeta(2s)/zeta(s); Dirichlet inverse of A008966.
Sum_{ d divides n } lambda(d) = 1 if n is a square, otherwise 0.
Completely multiplicative with a(p) = -1, p prime.
a(n) = (-1)^A001222(n) = (-1)^bigomega(n). - Jonathan Vos Post, Apr 16 2006
a(n) = A033999(A001222(n)). - Jaroslav Krizek, Sep 28 2009
Sum_{d|n} a(d) *(A000005(d))^2 = a(n) *Sum{d|n} A000005(d). - Vladimir Shevelev, May 22 2010
a(n) = 1 - 2*A066829(n). - Reinhard Zumkeller, Nov 19 2011
a(n) = i^(tau(n^2)-1) where tau(n) is A000005 and i is the imaginary unit. - Anthony Browne, May 11 2016
a(n) = A106400(A156552(n)). - Antti Karttunen, May 30 2017
Recurrence: a(1)=1, n > 1: a(n) = sign(1/2 - Sum_{dMats Granvik, Oct 11 2017
a(n) = Sum_{ d | n } A008683(d)*A010052(n/d). - Jinyuan Wang, Apr 20 2019
a(1) = 1; a(n) = -Sum_{d|n, d < n} mu(n/d)^2 * a(d). - Ilya Gutkovskiy, Mar 10 2021
a(n) = (-1)^A349905(n). - Antti Karttunen, Apr 26 2022
From Ridouane Oudra, Jun 02 2024: (Start)
a(n) = (-1)^A066829(n);
a(n) = (-1)^A063647(n);
a(n) = A101455(A048691(n));
a(n) = sin(tau(n^2)*Pi/2). (End)

A033879 Deficiency of n, or 2n - (sum of divisors of n).

Original entry on oeis.org

1, 1, 2, 1, 4, 0, 6, 1, 5, 2, 10, -4, 12, 4, 6, 1, 16, -3, 18, -2, 10, 8, 22, -12, 19, 10, 14, 0, 28, -12, 30, 1, 18, 14, 22, -19, 36, 16, 22, -10, 40, -12, 42, 4, 12, 20, 46, -28, 41, 7, 30, 6, 52, -12, 38, -8, 34, 26, 58, -48, 60, 28, 22, 1, 46, -12, 66, 10, 42, -4, 70, -51
Offset: 1

Views

Author

Keywords

Comments

Records for the sequence of the absolute values are in A075728 and the indices of these records in A074918. - R. J. Mathar, Mar 02 2007
a(n) = 1 iff n is a power of 2. a(n) = n - 1 iff n is prime. - Omar E. Pol, Jan 30 2014
If a(n) = 1 then n is called a least deficient number or an almost perfect number. All the powers of 2 are least deficient numbers but it is not known if there exists a least deficient number that is not a power of 2. See A000079. - Jianing Song, Oct 13 2019
It is not known whether there are any -1's in this sequence. See comment in A033880. - Antti Karttunen, Feb 02 2020

Examples

			For n = 10 the divisors of 10 are 1, 2, 5, 10, so the deficiency of 10 is 10 minus the sum of its proper divisors or simply 10 - 5 - 2 - 1 = 2. - _Omar E. Pol_, Dec 27 2013
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B2, pp. 74-84.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 147.

Crossrefs

Cf. A000396 (positions of zeros), A005100 (of positive terms), A005101 (of negative terms).
Cf. A141545 (positions of a(n) = -12).
For this sequence applied to various permutations of natural numbers and some other sequences, see A323174, A323244, A324055, A324185, A324546, A324574, A324575, A324654, A325379.

Programs

Formula

a(n) = -A033880(n).
a(n) = A005843(n) - A000203(n). - Omar E. Pol, Dec 14 2008
a(n) = n - A001065(n). - Omar E. Pol, Dec 27 2013
G.f.: 2*x/(1 - x)^2 - Sum_{k>=1} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Jan 24 2017
a(n) = A286385(n) - A252748(n). - Antti Karttunen, May 13 2017
From Antti Karttunen, Dec 29 2017: (Start)
a(n) = Sum_{d|n} A083254(d).
a(n) = Sum_{d|n} A008683(n/d)*A296075(d).
a(n) = A065620(A295881(n)) = A117966(A295882(n)).
a(n) = A294898(n) + A000120(n).
(End)
From Antti Karttunen, Jun 03 2019: (Start)
Sequence can be represented in arbitrarily many ways as a difference of the form (n - f(n)) - (g(n) - n), where f and g are any two sequences whose sum f(n)+g(n) = sigma(n). Here are few examples:
a(n) = A325314(n) - A325313(n) = A325814(n) - A034460(n) = A325978(n) - A325977(n).
a(n) = A325976(n) - A325826(n) = A325959(n) - A325969(n) = A003958(n) - A324044(n).
a(n) = A326049(n) - A326050(n) = A326055(n) - A326054(n) = A326044(n) - A326045(n).
a(n) = A326058(n) - A326059(n) = A326068(n) - A326067(n).
a(n) = A326128(n) - A326127(n) = A066503(n) - A326143(n).
a(n) = A318878(n) - A318879(n).
a(A228058(n)) = A325379(n). (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = 1 - Pi^2/12 = 0.177532... . - Amiram Eldar, Dec 07 2023

Extensions

Definition corrected by N. J. A. Sloane, Jul 04 2005

A003633 The sequence 2^(1-n)*a(n) is fixed (up to signs) by Stirling2 transform.

Original entry on oeis.org

1, -1, 1, 4, -38, -78, 5246, -11680, -2066056, 22308440, 1898577048, -48769559680, -3518093351728, 174500124820560, 11809059761527536, -1021558531563834368, -66133927485154902144, 9433326815405995274624, 578173001867228425792384
Offset: 1

Views

Author

Keywords

Examples

			The sequence that is fixed up to signs by STIRLING2 is 1, -1/2, 1/4, 4/8, -38/16, -78/32, 5246/64, ...
		

References

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

Formula

The e.g.f. for the latter sequence satisfies A(x) + A(e^x - 1 ) = 2.

Extensions

More terms from Vladeta Jovovic, Jul 12 2001

A023900 Dirichlet inverse of Euler totient function (A000010).

Original entry on oeis.org

1, -1, -2, -1, -4, 2, -6, -1, -2, 4, -10, 2, -12, 6, 8, -1, -16, 2, -18, 4, 12, 10, -22, 2, -4, 12, -2, 6, -28, -8, -30, -1, 20, 16, 24, 2, -36, 18, 24, 4, -40, -12, -42, 10, 8, 22, -46, 2, -6, 4, 32, 12, -52, 2, 40, 6, 36, 28, -58, -8, -60, 30, 12, -1, 48, -20, -66, 16, 44, -24, -70, 2, -72, 36, 8, 18, 60, -24, -78, 4, -2
Offset: 1

Views

Author

Keywords

Comments

Also called reciprocity balance of n.
Apart from different signs, same as Sum_{d divides n} core(d)*mu(n/d), where core(d) (A007913) is the squarefree part of d. - Benoit Cloitre, Apr 06 2002
Main diagonal of A191898. - Mats Granvik, Jun 19 2011

Examples

			x - x^2 - 2*x^3 - x^4 - 4*x^5 + 2*x^6 - 6*x^7 - x^8 - 2*x^9 + 4*x^10 - ...
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 37.
  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc. Boston, MA, 1976, p. 125.

Crossrefs

Moebius transform is A055615.
Cf. A027748, A173557 (gives the absolute values), A295876.
Cf. A253905 (Dgf at s=3).

Programs

  • Haskell
    a023900 1 = 1
    a023900 n = product $ map (1 -) $ a027748_row n
    -- Reinhard Zumkeller, Jun 01 2015
    
  • Maple
    A023900 := n -> mul(1-i,i=numtheory[factorset](n)); # Peter Luschny, Oct 26 2010
  • Mathematica
    a[ n_] := If[ n < 1, 0, Sum[ d MoebiusMu @ d, { d, Divisors[n]}]] (* Michael Somos, Jul 18 2011 *)
    Array[ Function[ n, 1/Plus @@ Map[ #*MoebiusMu[ # ]/EulerPhi[ # ]&, Divisors[ n ] ] ], 90 ]
    nmax = 81; Drop[ CoefficientList[ Series[ Sum[ MoebiusMu[k] k x^k/(1 - x^k), {k, 1, nmax} ], {x, 0, nmax} ], x ], 1 ] (* Stuart Clary, Apr 15 2006 *)
    t[n_, 1] = 1; t[1, k_] = 1; t[n_, k_] :=  t[n, k] = If[n < k, If[n > 1 && k > 1, Sum[-t[k - i, n], {i, 1, n - 1}], 0], If[n > 1 && k > 1, Sum[-t[n - i, k], {i, 1, k - 1}], 0]]; Table[t[n, n], {n, 36}] (* Mats Granvik, Robert G. Wilson v, Jun 25 2011 *)
    Table[DivisorSum[m, # MoebiusMu[#] &], {m, 90}] (* Jan Mangaldan, Mar 15 2013 *)
    f[p_, e_] := (1 - p); a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 14 2020 *)
  • PARI
    {a(n) = direuler( p=2, n, (1 - p*X) / (1 - X))[n]}
    
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, d * moebius(d)))} /* Michael Somos, Jul 18 2011 */
    
  • PARI
    a(n)=sumdivmult(n,d, d*moebius(d)) \\ Charles R Greathouse IV, Sep 09 2014
    
  • Python
    from sympy import divisors, mobius
    def a(n): return sum([d*mobius(d) for d in divisors(n)]) # Indranil Ghosh, Apr 29 2017
    
  • Python
    from math import prod
    from sympy import primefactors
    def A023900(n): return prod(1-p for p in primefactors(n)) # Chai Wah Wu, Sep 08 2023
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A023900 n) (if (= 1 n) 1 (* (- 1 (A020639 n)) (A023900 (A028234 n))))) ;; Antti Karttunen, Nov 28 2017

Formula

a(n) = Sum_{ d divides n } d*mu(d) = Product_{p|n} (1-p).
a(n) = 1 / (Sum_{ d divides n } mu(d)*d/phi(d)).
Dirichlet g.f.: zeta(s)/zeta(s-1). - Michael Somos, Jun 04 2000
a(n+1) = det(n+1)/det(n) where det(n) is the determinant of the n X n matrix M_(i, j) = i/gcd(i, j) = lcm(i, j)/j. - Benoit Cloitre, Aug 19 2003
a(n) = phi(n)*moebius(A007947(n))*A007947(n)/n. Logarithmic g.f.: Sum_{n >= 1} a(n)*x^n/n = log(F(x)) where F(x) is the g.f. of A117209 and satisfies: 1/(1-x) = Product_{n >= 1} F(x^n). - Paul D. Hanna, Mar 03 2006
G.f.: A(x) = Sum_{k >= 1} mu(k) k x^k/(1 - x^k) where mu(k) is the Moebius (Mobius) function, A008683. - Stuart Clary, Apr 15 2006
G.f.: A(x) is x times the logarithmic derivative of A117209(x). - Stuart Clary, Apr 15 2006
Row sums of triangle A134842. - Gary W. Adamson, Nov 12 2007
G.f.: x/(1-x) = Sum_{n >= 1} a(n)*x^n/(1-x^n)^2. - Paul D. Hanna, Aug 16 2008
a(n) = phi(rad(n)) *(-1)^omega(n) = A000010(A007947(n)) *(-1)^A001221(n). - Enrique Pérez Herrero, Aug 24 2010
a(n) = Product_{i = 2..n} (1-i)^( (pi(i)-pi(i-1)) * floor( (cos(n*Pi/i))^2 ) ), where pi = A000720, Pi = A000796. - Wesley Ivan Hurt, May 24 2013
a(n) = -limit of zeta(s)*(Sum_{d divides n} moebius(d)/exp(d)^(s-1)) as s->1 for n>1. - Mats Granvik, Jul 31 2013
a(n) = Sum_{d divides n} mu(d)*rad(d), where rad is A007947. - Enrique Pérez Herrero, May 29 2014
Conjecture for n>1: Let n = 2^(A007814(n))*m = 2^(ruler(n))*odd_part(n), where m = A000265(n), then a(n) = (-1)^(m=n)*(0+Sum_{i=1..m and gcd(i,m)=1} (4*min(i,m-i)-m)) = (-1)^(m1} (4*min(i,m-i)-m)). - I. V. Serov, May 02 2017
a(n) = (-1)^A001221(n) * A173557(n). - R. J. Mathar, Nov 02 2017
a(1) = 1; for n > 1, a(n) = (1-A020639(n)) * a(A028234(n)), because multiplicative with a(p^e) = (1-p). - Antti Karttunen, Nov 28 2017
a(n) = 1 - Sum_{d|n, d > 1} d*a(n/d). - Ilya Gutkovskiy, Apr 26 2019
From Richard L. Ollerton, May 07 2021: (Start)
For n>1, Sum_{k=1..n} a(gcd(n,k)) = 0.
For n>1, Sum_{k=1..n} a(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)) = 0. (End)
a(n) = rad(n)*(-1)^omega(n)*phi(n)/n = A062953(n)*A000010(n)/n. - Amrit Awasthi, Jan 30 2022
a(n) = mu(n)*phi(n) = A008683(n)*A000010(n) whenever n is squarefree. - Amrit Awasthi, Feb 03 2022
From Peter Bala, Jan 24 2024: (Start)
a(n) = Sum_{d divides n} core(d)*mu(d). Cf. Comment by Benoit Cloitre, dated Apr 06 2002.
a(n) = Sum_{d|n, e|n} n/gcd(d, e) * mu(n/d) * mu(n/e) (the sum is a multiplicative function of n by Tóth, and takes the value 1 - p for n = p^e, a prime power). (End)
From Peter Bala, Feb 01 2024: (Start)
G.f. Sum_{n >= 1} (2*n-1)*moebius(2*n-1)*x^(2*n-1)/(1 + x^(2n-1)).
a(n) = (-1)^(n+1) * Sum_{d divides n, d odd} d*moebius(d). (End)

A000918 a(n) = 2^n - 2.

Original entry on oeis.org

-1, 0, 2, 6, 14, 30, 62, 126, 254, 510, 1022, 2046, 4094, 8190, 16382, 32766, 65534, 131070, 262142, 524286, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 67108862, 134217726, 268435454, 536870910, 1073741822, 2147483646, 4294967294, 8589934590, 17179869182, 34359738366, 68719476734, 137438953470
Offset: 0

Views

Author

Keywords

Comments

For n > 1, a(n) is the expected number of tosses of a fair coin to get n-1 consecutive heads. - Pratik Poddar, Feb 04 2011
For n > 2, Sum_{k=1..a(n)} (-1)^binomial(n, k) = A064405(a(n)) + 1 = 0. - Benoit Cloitre, Oct 18 2002
For n > 0, the number of nonempty proper subsets of an n-element set. - Ross La Haye, Feb 07 2004
Numbers j such that abs( Sum_{k=0..j} (-1)^binomial(j, k)*binomial(j + k, j - k) ) = 1. - Benoit Cloitre, Jul 03 2004
For n > 2 this formula also counts edge-rooted forests in a cycle of length n. - Woong Kook (andrewk(AT)math.uri.edu), Sep 08 2004
For n >= 1, conjectured to be the number of integers from 0 to (10^n)-1 that lack 0, 1, 2, 3, 4, 5, 6 and 7 as a digit. - Alexandre Wajnberg, Apr 25 2005
Beginning with a(2) = 2, these are the partial sums of the subsequence of A000079 = 2^n beginning with A000079(1) = 2. Hence for n >= 2 a(n) is the smallest possible sum of exactly one prime, one semiprime, one triprime, ... and one product of exactly n-1 primes. A060389 (partial sums of the primorials, A002110, beginning with A002110(1)=2) is the analog when all the almost primes must also be squarefree. - Rick L. Shepherd, May 20 2005
From the second term on (n >= 1), the binary representation of these numbers is a 0 preceded by (n - 1) 1's. This pattern (0)111...1110 is the "opposite" of the binary 2^n+1: 1000...0001 (cf. A000051). - Alexandre Wajnberg, May 31 2005
The numbers 2^n - 2 (n >= 2) give the positions of 0's in A110146. Also numbers k such that k^(k + 1) = 0 mod (k + 2). - Zak Seidov, Feb 20 2006
Partial sums of A155559. - Zerinvary Lajos, Oct 03 2007
Number of surjections from an n-element set onto a two-element set, with n >= 2. - Mohamed Bouhamida, Dec 15 2007
It appears that these are the numbers n such that 3*A135013(n) = n*(n + 1), thus answering Problem 2 on the Mathematical Olympiad Foundation of Japan, Final Round Problems, Feb 11 1993 (see link Japanese Mathematical Olympiad).
Let P(A) be the power set of an n-element set A and R be a relation on P(A) such that for all x, y of P(A), xRy if x is a proper subset of y or y is a proper subset of x and x and y are disjoint. Then a(n+1) = |R|. - Ross La Haye, Mar 19 2009
The permutohedron Pi_n has 2^n - 2 facets [Pashkovich]. - Jonathan Vos Post, Dec 17 2009
First differences of A005803. - Reinhard Zumkeller, Oct 12 2011
For n >= 1, a(n + 1) is the smallest even number with bit sum n. Cf. A069532. - Jason Kimberley, Nov 01 2011
a(n) is the number of branches of a complete binary tree of n levels. - Denis Lorrain, Dec 16 2011
For n>=1, a(n) is the number of length-n words on alphabet {1,2,3} such that the gap(w)=1. For a word w the gap g(w) is the number of parts missing between the minimal and maximal elements of w. Generally for words on alphabet {1,2,...,m} with g(w)=g>0 the e.g.f. is Sum_{k=g+2..m} (m - k + 1)*binomial((k - 2),g)*(exp(x) - 1)^(k - g). a(3)=6 because we have: 113, 131, 133, 311, 313, 331. Cf. A240506. See the Heubach/Mansour reference. - Geoffrey Critzer, Apr 13 2014
For n > 0, a(n) is the minimal number of internal nodes of a red-black tree of height 2*n-2. See the Oct 02 2015 comment under A027383. - Herbert Eberle, Oct 02 2015
Conjecture: For n>0, a(n) is the least m such that A007814(A000108(m)) = n-1. - L. Edson Jeffery, Nov 27 2015
Actually this follows from the procedure for determining the multiplicity of prime p in C(n) given in A000108 by Franklin T. Adams-Watters: For p=2, the multiplicity is the number of 1 digits minus 1 in the binary representation of n+1. Obviously, the smallest k achieving "number of 1 digits" = k is 2^k-1. Therefore C(2^k-2) is divisible by 2^(k-1) for k > 0 and there is no smaller m for which 2^(k-1) divides C(m) proving the conjecture. - Peter Schorn, Feb 16 2020
For n >= 0, a(n) is the largest number you can write in bijective base-2 (a.k.a. the dyadic system, A007931) with n digits. - Harald Korneliussen, May 18 2019
The terms of this sequence are also the sum of the terms in each row of Pascal's triangle other than the ones. - Harvey P. Dale, Apr 19 2020
For n > 1, binomial(a(n),k) is odd if and only if k is even. - Charlie Marion, Dec 22 2020
For n >= 2, a(n+1) is the number of n X n arrays of 0's and 1's with every 2 X 2 square having density exactly 2. - David desJardins, Oct 27 2022
For n >= 1, a(n+1) is the number of roots of unity in the unique degree-n unramified extension of the 2-adic field Q_2. Note that for each p, the unique degree-n unramified extension of Q_p is the splitting field of x^(p^n) - x, hence containing p^n - 1 roots of unity for p > 2 and 2*(2^n - 1) for p = 2. - Jianing Song, Nov 08 2022

Examples

			a(4) = 14 because the 14 = 6 + 4 + 4 rationals (in lowest terms) for n = 3 are (see the Jun 14 2017 formula above): 1/2, 1, 3/2, 2, 5/2, 3; 1/4, 3/4, 5/4, 7/4; 1/8, 3/8, 5/8, 7/8. - _Wolfdieter Lang_, Jun 14 2017
		

References

  • H. T. Davis, Tables of the Mathematical Functions. Vols. 1 and 2, 2nd ed., 1963, Vol. 3 (with V. J. Fisher), 1962; Principia Press of Trinity Univ., San Antonio, TX, Vol. 2, p. 212.
  • Ralph P. Grimaldi, Discrete and Combinatorial Mathematics: An Applied Introduction, Fifth Edition, Addison-Wesley, 2004, p. 134. - Mohammad K. Azarian, Oct 27 2011
  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, Chapman and Hall, 2009 page 86, Exercise 3.16.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 33.
  • 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).
  • A. H. Voigt, Theorie der Zahlenreihen und der Reihengleichungen, Goschen, Leipzig, 1911, p. 31.

Crossrefs

Row sums of triangle A026998.
Cf. A058809 (3^n-3, n>0).

Programs

  • Haskell
    a000918 = (subtract 2) . (2 ^)
    a000918_list = iterate ((subtract 2) . (* 2) . (+ 2)) (- 1)
    -- Reinhard Zumkeller, Apr 23 2013
    
  • Magma
    [2^n - 2: n in [0..40]]; // Vincenzo Librandi, Jun 23 2011
    
  • Maple
    seq(2^n-2,n=0..20) ;
  • Mathematica
    Table[2^n - 2, {n, 0, 29}] (* Alonso del Arte, Dec 01 2012 *)
  • PARI
    a(n)=2^n-2 \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    def A000918(n): return (1<Chai Wah Wu, Jun 10 2025

Formula

a(n) = 2*A000225(n-1).
G.f.: 1/(1 - 2*x) - 2/(1 - x), e.g.f.: (e^x - 1)^2 - 1. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001
For n >= 1, a(n) = A008970(n + 1, 2). - Philippe Deléham, Feb 21 2004
G.f.: (3*x - 1)/((2*x - 1)*(x - 1)). - Simon Plouffe in his 1992 dissertation for the sequence without the leading -1
a(n) = 2*a(n - 1) + 2. - Alexandre Wajnberg, Apr 25 2005
a(n) = A000079(n) - 2. - Omar E. Pol, Dec 16 2008
a(n) = A058896(n)/A052548(n). - Reinhard Zumkeller, Feb 14 2009
a(n) = A164874(n - 1, n - 1) for n > 1. - Reinhard Zumkeller, Aug 29 2009
a(n) = A173787(n,1); a(n) = A028399(2*n)/A052548(n), n > 0. - Reinhard Zumkeller, Feb 28 2010
a(n + 1) = A027383(2*n - 1). - Jason Kimberley, Nov 02 2011
G.f.: U(0) - 1, where U(k) = 1 + x/(2^k + 2^k/(x - 1 - x^2*2^(k + 1)/(x*2^(k + 1) - (k + 1)/U(k + 1) ))); (continued fraction, 3rd kind, 4-step). - Sergei N. Gladkovskii, Dec 01 2012
a(n+1) is the sum of row n in triangle A051601. - Reinhard Zumkeller, Aug 05 2013
a(n+1) = A127330(n,0). - Reinhard Zumkeller, Nov 16 2013
a(n) = Sum_{k=1..n-1} binomial(n, k) for n > 0. - Dan McCandless, Nov 14 2015
From Miquel Cerda, Aug 16 2016: (Start)
a(n) = A000225(n) - 1.
a(n) = A125128(n-1) - A000325(n).
a(n) = A095151(n) - A125128(n) - 1. (End)
a(n+1) = 2*(n + Sum_{j=1..n-1} (n-j)*2^(j-1)), n >= 1. This is the number of the rationals k/2, k = 1..2*n for n >= 1 and (2*k+1)/2^j for j = 2..n, n >= 2, and 2*k+1 < n-(j-1). See the example for n = 3 below. Motivated by the proposal A287012 by Mark Rickert. - Wolfdieter Lang, Jun 14 2017

Extensions

Maple programs fixed by Vaclav Kotesovec, Dec 13 2014

A010892 Inverse of 6th cyclotomic polynomial. A period 6 sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Any sequence b(n) satisfying the recurrence b(n) = b(n-1) - b(n-2) can be written as b(n) = b(0)*a(n) + (b(1)-b(0))*a(n-1).
a(n) is the determinant of the n X n matrix M with m(i,j)=1 if |i-j| <= 1 and 0 otherwise. - Mario Catalani (mario.catalani(AT)unito.it), Jan 25 2003
Also row sums of triangle in A108299; a(n)=L(n-1,1), where L is also defined as in A108299; see A061347 for L(n,-1). - Reinhard Zumkeller, Jun 01 2005
Pisano period lengths: 1, 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, ... - R. J. Mathar, Aug 10 2012
Periodic sequences of this type can also be calculated as a(n) = c + floor(q/(p^m-1)*p^n) mod p, where c is a constant, q is the number representing the periodic digit pattern and m is the period. c, p and q can be calculated as follows: Let D be the array representing the number pattern to be repeated, m = size of D, max = maximum value of elements in D, min = minimum value of elements in D. Then c := min, p := max - min + 1 and q := p^m*Sum_{i=1..m} (D(i)-min)/p^i. Example: D = (1, 1, 0, -1, -1, 0), c = -1, m = 6, p = 3 and q = 676 for this sequence. - Hieronymus Fischer, Jan 04 2013
B(n) = a(n+5) = S(n-1, 1) appears, together with a(n) = A057079(n+1), in the formula 2*exp(Pi*n*i/3) = A(n) + B(n)*sqrt(3)*i with i = sqrt(-1). For S(n, x) see A049310. See also a Feb 27 2014 comment on A099837. - Wolfdieter Lang, Feb 27 2014
a(n) (for n>=1) is the difference between numbers of even and odd permutations p of 1,2,...,n such that |p(i)-i|<=1 for i=1,2,...,n. - Dmitry Efimov, Jan 08 2016
From Tom Copeland, Jan 31 2016: (Start)
Specialization of the o.g.f. 1 / ((x - w1)(x-w2)) = (1/(w1-w2)) ((w1-w2) + (w1^2 - w2^2) x + (w1^3-w2^3) x^2 + ...) with w1*w2 = (1/w1) + (1/w2) = 1. Then w1 = q = e^(i*Pi/3) and w2 = 1/q = e^(-i*Pi/3), giving the o.g.f. 1 /(1-x+x^2) for this entry with a(n) = (2/sqrt(3)) sin((n+1)Pi/3). See the Copeland link for more relations.
a(n) = (q^(n+1) - q^(-(n+1))) / (q - q^(-1)), so this entry gives the o.g.f. for an instance of the quantum integers denoted by [m]_q in Morrison et al. and Tingley. (End)

Examples

			G.f. = 1 + x - x^3 - x^4 + x^6 + x^7 - x^9 - x^10 + x^12 + x^13 - x^15 + ...
		

Crossrefs

a(n) = row sums of signed triangle A049310.
Differs only by a shift from A128834.
a(n+1) = row sums of triangle A130777: repeat(1,0,-1,-1,0,1).

Programs

  • Magma
    &cat[[1,1,0,-1,-1,0]: n in [0..20]]; // Vincenzo Librandi, Apr 03 2014
  • Maple
    a:=n->coeftayl(1/(x^2-x+1), x=0, n);
    a:=n->2*sin(Pi*(n+1)/3)/sqrt(3);
    A010892:=n->[1,1,0,-1,-1,0][irem(n,6)+1];
    A010892:=n->Array(0..5,[1,1,0,-1,-1,0])[irem(n,6)];
    A010892:=n->table([0=1,1=1,2=0,3=-1,4=-1,5=0])[irem(n,6)];
    with(numtheory,cyclotomic); c := series(1/cyclotomic(6,x),x,102): seq(coeff(c,x,n),n=0..101); # Rainer Rosenthal, Jan 01 2007
  • Mathematica
    a[n_] := {1, 1, 0, -1, -1, 0}[[Mod[n, 6] + 1]]; Table[a[n], {n, 0, 101}] (* Jean-François Alcover, Jul 19 2013 *)
    CoefficientList[Series[1/Cyclotomic[6, x], {x, 0, 100}], x] (* Vincenzo Librandi, Apr 03 2014 *)
    PadRight[{},120,{1,1,0,-1,-1,0}] (* Harvey P. Dale, Jul 07 2020 *)
  • PARI
    {a(n) = (-1)^(n\3) * sign((n + 1)%3)}; /* Michael Somos, Sep 23 2005 */
    
  • PARI
    {a(n) = subst( poltchebi(n) + poltchebi(n-1), 'x, 1/2) * 2/3}; /* Michael Somos, Sep 23 2005 */
    
  • PARI
    {a(n) = [1, 1, 0, -1, -1, 0][n%6 + 1]}; /* Michael Somos, Feb 14 2006 */
    
  • PARI
    {a(n) = my(A, p, e); if( n<0, 0, n++; A = factor(n); prod( k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, -(-1)^e, p==3, 0, p%6 == 1, 1, (-1)^e)))}; /* Michael Somos, Oct 29 2006 */
    
  • Python
    def A010892(n): return [1,1,0,-1,-1,0][n%6] # Alec Mihailovs, Jan 01 2007
    
  • Sage
    [lucas_number1(n,1,+1) for n in range(-5, 97)] # Zerinvary Lajos, Apr 22 2009
    
  • Sage
    def A010892():
        x, y = -1, -1
        while True:
            yield -x
            x, y = y, -x + y
    a = A010892()
    [next(a) for i in range(40)]  # Peter Luschny, Jul 11 2013
    

Formula

G.f.: 1 / (1 - x + x^2).
a(n) = a(n-1) - a(n-2), a(0)=1, a(1)=1.
a(n) = ((-1)^floor(n/3) + (-1)^floor((n+1)/3))/2.
a(n) = 0 if n mod 6 = 2 or 5, a(n) = +1 if n mod 6 = 0 or 1, a(n) = -1 otherwise. a(n) = S(n, 1) = U(n, 1/2) (Chebyshev U(n, x) polynomials).
a(n) = sqrt(4/3)*Im((1/2 + i*sqrt(3/4))^(n+1)). - Henry Bottomley, Apr 12 2000
Binomial transform of A057078. a(n) = Sum_{k=0..n} C(k, n-k)*(-1)^(n-k). - Paul Barry, Sep 13 2003
a(n) = 2*sin(Pi*n/3 + Pi/3)/sqrt(3). - Paul Barry, Jan 28 2004
a(n) = Sum_{k=0..floor(n/2)} C(n-k, k)*(-1)^k. - Paul Barry, Jul 28 2004
Euler transform of length 6 sequence [1, -1, -1, 0, 0, 1]. - Michael Somos, Sep 23 2005
a(n) = a(1 - n) = -a(-2 - n) for all n in Z. - Michael Somos, Feb 14 2006
a(n) = Sum_{k=0..n} (-2)^(n-k) * A085838(n,k). - Philippe Deléham, Oct 26 2006
a(n) = b(n+1) where b(n) is multiplicative with b(2^e) = -(-1)^e if e>0, b(3^e) = 0^e, b(p^e) = 1 if p == 1 (mod 6), b(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Oct 29 2006
Given g.f. A(x), then, B(x) = x * A(x) satisfies 0 = f(B(x), B(x^2)) where f(u, v) = u^2 - v - 2*u*v * (1 - u). - Michael Somos, Oct 29 2006
a(2*n) = A057078(n), a(2*n+1) = A049347(n).
a(n) = Sum_{k=0..n} A109466(n,k). - Philippe Deléham, Nov 14 2006
a(n) = Sum_{k=0..n} A133607(n,k). - Philippe Deléham, Dec 30 2007
a(n) = A128834(n+1). - Jaume Oliver Lafont, Dec 05 2008
a(n) = Sum_{k=0..n} C(n+k+1,2k+1) * (-1)^k. - Paul Barry, Jun 03 2009
a(n) = A101950(n,0) = (-1)^n * A049347(n). - Philippe Deléham, Feb 10 2012
a(n) = Product_{k=1..floor(n/2)} 1 - 4*(cos(k*Pi/(n+1)))^2. - Mircea Merca, Apr 01 2012
G.f.: 1 / (1 - x / (1 + x / (1 - x))). - Michael Somos, Apr 02 2012
a(n) = -1 + floor(181/819*10^(n+1)) mod 10. - Hieronymus Fischer, Jan 03 2013
a(n) = -1 + floor(13/14*3^(n+1)) mod 3. - Hieronymus Fischer, Jan 04 2013
a(n) = 1/(1+r2)*(1/r1)^n + 1/(1+r1)*(1/r2)^n, with r1=(1-i*sqrt(3))/2 and r2=(1+i*sqrt(3))/2. - Ralf Stephan, Jul 19 2013
a(n) = ((n+1)^2 mod 3) * (-1)^floor((n+1)/3). - Wesley Ivan Hurt, Mar 15 2015
a(n-1) = n - Sum_{i=1..n-1} i*a(n-i). - Derek Orr, Apr 28 2015
a(n) = S(2*n+1, sqrt(3))/sqrt(3) = S(n, 1) with S(n, x) coefficients given in A049310. The S(n, 1) formula appeared already above. S(2*n, sqrt(3)) = A057079(n). See also a Feb 27 2014 comment above. - Wolfdieter Lang, Jan 16 2018
E.g.f.: sqrt(exp(x)*4/3) * cos(x*sqrt(3/4) - Pi/6). - Michael Somos, Jul 05 2018
a(n) = Determinant(Tri(n)), for n >= 1, with Tri(n) the n X n tridiagonal matrix with entries 1 (a special Toeplitz matrix). - Wolfdieter Lang, Sep 20 2019
a(n) = Product_{k=1..n}(1 + 2*cos(k*Pi/(n+1))). - Peter Luschny, Nov 28 2019

Extensions

Entry revised by N. J. A. Sloane, Jul 16 2004

A033999 a(n) = (-1)^n.

Original entry on oeis.org

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

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

Keywords

Comments

(-1)^(n+1) = signed area of parallelogram with vertices (0,0), U=(F(n),F(n+1)), V=(F(n+1),F(n+2)), where F = A000045 (Fibonacci numbers). The area of every such parallelogram is 1. The signed area is -1 if and only if F(n+1)^2 > F(n)*F(n+2), or, equivalently, n is even, or, equivalently, the vector U is "above" V, indicating that U and V "cross" as n -> n+1. - Clark Kimberling, Sep 09 2013
Periodic with period length 2. - Ray Chandler, Apr 03 2017
From Bernard Schott, May 11 2022: (Start)
Cesàro mean theorem: When a(n) has a limit (finite or infinite) in the usual sense, then c(n) = (a(1)+...+a(n))/n has the same Cesàro limit, but the converse is false. This sequence is a counterexample in the case of a finite Cesàro limit (see A237420 for counterexample with an infinite Cesàro limit).
This sequence is not convergent in the usual sense because a(2n) = 1 while a(2n+1) = -1; the successive arithmetic means c(n) of the first n terms of the sequence are 1/1, 0/2, 1/3, 0/4, 1/5, 0/6, ... so c(2n) = 1/(2n+1) and c(2n+1) = 0, hence the Cesàro limit is 0 because c(n) -> 0 when n -> oo.
In fact, when sequence a(n) is "Period k: [a1, a2, ..., ak]", then the Cesàro limit c of this sequence is (a1+a2+...+ak)/k.
Note that the converse of the theorem is true iff a(n) is monotonic (End).

Examples

			G.f. = 1 - x + x^2 - x^3 + x^4 - x^5 + x^6 - x^7 + x^8 - x^9 + x^10 - x^11 + x^12 + ...
		

References

  • J. M. Arnaudiès, P. Delezoide et H. Fraysse, Exercices résolus d'Analyse du cours de mathématiques - 2, Dunod, Exercice 10, pp. 14-16.

Crossrefs

About Cesàro mean theorem: A114112, A237420.
Cf. A072691 (abs. val. Dgf at s=2), A197070 (abs. val. Dgf at s=3), A267315 (abs. val. Dgf at s=4).

Programs

Formula

G.f.: 1/(1+x).
E.g.f.: exp(-x).
Linear recurrence: a(0)=1, a(n)=-a(n-1) for n>0. - Jaume Oliver Lafont, Mar 20 2009
Sum_{k=0..n} a(k) = A059841(n). - Jaume Oliver Lafont, Nov 21 2009
Sum_{k>=0} a(k)/(k+1) = log(2). - Jaume Oliver Lafont, Mar 30 2010
Euler transform of length 2 sequence [ -1, 1]. - Michael Somos, Mar 21 2011
Moebius transform is length 2 sequence [ -1, 2]. - Michael Somos, Mar 21 2011
a(n) = -b(n) where b(n) = multiplicative with b(2^e) = -1 if e>0, b(p^e) = 1 if p>2. - Michael Somos, Mar 21 2011
a(n) = a(-n) = a(n + 2) = cos(n * Pi). a(n) = c_2(n) if n>1 where c_k(n) is Ramanujan's sum. - Michael Somos, Mar 21 2011
a(n) = (1/2)*Product_{k=0..2*n-1} 2*cos((2*k+1)*Pi/(4*n)), n >= 1. See the product given in the Oct 21 2013 formula comment in A056594, and replace there n -> 2*n. - Wolfdieter Lang, Oct 23 2013
D.g.f.: (2^(1-s)-1)*zeta(s) = -eta(s) (the Dirichlet eta function). - Ralf Stephan, Mar 27 2015
From Ilya Gutkovskiy, Aug 17 2016: (Start)
a(n) = T_n(-1), where T_n(x) are the Chebyshev polynomials of the first kind.
Binomial transform of A122803. (End)
a(n) = exp(i*Pi*n) = exp(-i*Pi*n). - Carauleanu Marc, Sep 15 2016
a(n) = Sum_{k=0..n} (-1)^k*A063007(n, k), n >= 0. - Wolfdieter Lang, Sep 13 2016

A013973 Expansion of Eisenstein series E_6(q) (alternate convention E_3(q)).

Original entry on oeis.org

1, -504, -16632, -122976, -532728, -1575504, -4058208, -8471232, -17047800, -29883672, -51991632, -81170208, -129985632, -187132176, -279550656, -384422976, -545530104, -715608432, -986161176, -1247954400, -1665307728, -2066980608, -2678616864, -3243917376, -4159663200
Offset: 0

Views

Author

Keywords

Comments

Ramanujan Lambert series: P(q) (see A006352), Q(q) (A004009), R(q) (A013973).

Examples

			G.f. = 1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 + ...
		

References

  • W. Ebeling, Lattices and Codes, Vieweg; 2nd ed., 2002, see p. 53.
  • R. C. Gunning, Lectures on Modular Forms. Princeton Univ. Press, Princeton, NJ, 1962, p. 53.
  • M. Kaneko and D. Zagier, Supersingular j-invariants, hypergeometric series and Atkin's orthogonal polynomials, pp. 97-126 of D. A. Buell and J. T. Teitelbaum, eds., Computational Perspectives on Number Theory, Amer. Math. Soc., 1998.
  • N. Koblitz, Introduction to Elliptic Curves and Modular Forms, Springer-Verlag, 1984, see p. 111.
  • Jean-Pierre Serre, "A Course in Arithmetic", Springer, 1978
  • Joseph H. Silverman, "Advanced Topics in the Arithmetic of Elliptic Curves", Springer, 1994

Crossrefs

Cf. A006352 (E_2), A004009 (E_4), A013973 (E_6), A008410 (E_8), A013974 (E_10), A029828 (E_12), A058550 (E_14), A029829 (E_16), A029830 (E_20), A029831 (E_24).
Cf. A001160, A286346 (eta(q)^24 / eta(q^2)^12), A286399 (eta(q^2)^12 * eta(q^4)^8 / eta(q)^8).

Programs

  • Magma
    Basis( ModularForms( Gamma1(1), 6), 25); /* Michael Somos, Apr 01 2015 */
  • Maple
    E := proc(k) local n,t1; t1 := 1-(2*k/bernoulli(k))*add(sigma[k-1](n)*q^n,n=1..60); series(t1,q,60); end; E(6);
    # alternative
    A013973 := proc(n)
        if n = 0 then
            1;
        else
            -504*numtheory[sigma][5](n) ;
        end if;
    end proc:
    seq(A013973(n),n=0..10) ; # R. J. Mathar, Feb 22 2021
  • Mathematica
    a[ n_] := If[ n < 1, Boole[n == 0], -504 DivisorSigma[ 5, n]]; (* Michael Somos, Apr 21 2013 *)
    a[ n_] := SeriesCoefficient[ With[ {t2 = EllipticTheta[ 2, 0, q]^4, t3 = EllipticTheta[ 3, 0, q]^4}, t2^3 - 33 (t2 + t3) t2 t3 + t3^3], {q, 0, n}]; (* Michael Somos, Apr 21 2013 *)
    a[ n_] := SeriesCoefficient[ With[ {t3 = EllipticTheta[ 3, 0, q]^4, t4 = EllipticTheta[ 4, 0, q]^4}, (t3^3 - 3 (t3 - t4)^2 (t3 + t4) + t4^3) / 2], {q, 0, 2 n}]; (* Michael Somos, Jun 04 2014 *)
    a[ n_] := SeriesCoefficient[ With[ {e1 = QPochhammer[ q]^8, e4 = 32 q QPochhammer[ q^4]^8}, (e1 + e4) (e1^2 - 16 e1 e4 - 8 e4^2) / QPochhammer[ q^2]^12], {q, 0, n}]; (* Michael Somos, Apr 01 2015 *)
    a[ n_] := SeriesCoefficient[ With[ {t2 = EllipticTheta[ 2, 0, q]^4, t3 = EllipticTheta[ 3, 0, q]^4}, t2^3 - 3/2 (t2 + t3) t2 t3 + t3^3], {q, 0, 2 n}]; (* Michael Somos, Jul 31 2016 *)
    terms = 25; E6[x_] = 1-(12/BernoulliB[6])*Sum[k^5*x^k/(1-x^k), {k, terms}]; CoefficientList[E6[x] + O[x]^terms, x] (* Jean-François Alcover, Feb 28 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, -504 * sigma( n, 5))};
    
  • PARI
    {a(n) = my(A, A1, A4); if( n<0, 0, A = x * O(x^n); A1 = eta(x + A)^8; A4 = 32 * x * eta(x^4 + A)^8; polcoeff( (A1 + A4) * (A1^2 - 16 * A1 * A4 - 8 * A4^2) / eta(x^2 + A)^12, n))}; /* Michael Somos, Dec 30 2008 */
    
  • Sage
    ModularForms( Gamma1(1), 6, prec=25).0; # Michael Somos, Jun 04 2013
    

Formula

E6(q) = 1 - 504*Sum_{i>=1} sigma_5(i)q^i where sigma_5(n) is A001160, the sum of fifth powers of the divisors of n. It can also be expressed as E6(q) = 1 - 504*Sum_{i>=1} i^5*q^i/(1-q^i). - Gene Ward Smith, Aug 22 2006
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2*v - 8*u^2*w - 66*u*v^2 + 592*u*v*w - 512*u*w^2 + 121*v^3 - 4224*v^2*w + 4096*v*w^2. - Michael Somos, Apr 10 2005
Expansion of Ramanujan's function R(q) = 216*g3 (Weierstrass invariant).
Expansion of (eta(q)^8 + 32 * eta(q^4)^8) * (eta(q)^16 - 512 * eta(q)^8 * eta(q^4)^8 - 8192 * eta(q^4)^16) / eta(q^2)^12 in powers of q. - Michael Somos, Dec 30 2008
G.f. is a period 1 Fourier series which satisfies f(-1 / t) = - (t/i)^6 * f(t) where q = exp(2 Pi i t). - Michael Somos, Dec 30 2008
E6(q) = eta(q)^24 / eta(q^2)^12 - 480 * eta(q^2)^12 - 16896 * eta(q^2)^12 * eta(q^4)^8 / eta(q)^8 + 8192 * eta(q^4)^24 / eta(q^2)^12. - Seiichi Manyama, May 08 2017

A002321 Mertens's function: Sum_{k=1..n} mu(k), where mu is the Moebius function A008683.

Original entry on oeis.org

1, 0, -1, -1, -2, -1, -2, -2, -2, -1, -2, -2, -3, -2, -1, -1, -2, -2, -3, -3, -2, -1, -2, -2, -2, -1, -1, -1, -2, -3, -4, -4, -3, -2, -1, -1, -2, -1, 0, 0, -1, -2, -3, -3, -3, -2, -3, -3, -3, -3, -2, -2, -3, -3, -2, -2, -1, 0, -1, -1, -2, -1, -1, -1, 0, -1, -2, -2, -1, -2, -3, -3, -4, -3, -3, -3, -2, -3, -4, -4, -4
Offset: 1

Views

Author

Keywords

Comments

Partial sums of the Moebius function A008683.
Also determinant of n X n (0,1) matrix defined by A(i,j)=1 if j=1 or i divides j.
The first positive value of Mertens's function for n > 1 is for n = 94. The graph seems to show a negative bias for the Mertens function which is eerily similar to the Chebyshev bias (described in A156749 and A156709). The purported bias seems to be empirically approximated to - (6 / Pi^2) * (sqrt(n) / 4) (by looking at the graph) (see MathOverflow link, May 28 2012) where 6 / Pi^2 = 1 / zeta(2) is the asymptotic density of squarefree numbers (the squareful numbers having Moebius mu of 0). This would be a growth pattern akin to the Chebyshev bias. - Daniel Forgues, Jan 23 2011
All integers appear infinitely often in this sequence. - Charles R Greathouse IV, Aug 06 2012
Soundararajan proves that, on the Riemann Hypothesis, a(n) << sqrt(n) exp(sqrt(log n)*(log log n)^14), sharpening the well-known equivalence. - Charles R Greathouse IV, Jul 17 2015
Balazard & De Roton improve this (on the Riemann Hypothesis) to a(n) << sqrt(n) exp(sqrt(log n)*(log log n)^k) for any k > 5/2, where the implied constant in the Vinogradov symbol depends on k. Saha & Sankaranarayanan reduce the exponent to 5/4 on additional hypotheses. - Charles R Greathouse IV, Feb 02 2023

Examples

			G.f. = x - x^3 - x^4 - 2*x^5 - x^6 - 2*x^7 - 2*x^8 - 2*x^9 - x^10 - 2*x^11 - 2*x^12 - ...
		

References

  • E. Landau, Vorlesungen über Zahlentheorie, Chelsea, NY, Vol. 2, p. 157.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, pp. 7-10.
  • F. Mertens, "Über eine zahlentheoretische Funktion", Akademie Wissenschaftlicher Wien Mathematik-Naturlich Kleine Sitzungsber, IIa 106, (1897), p. 761-830.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section VI.1.
  • Biswajyoti Saha and Ayyadurai Sankaranarayanan, On estimates of the Mertens function, International Journal of Number Theory, Vol. 15, No. 02 (2019), pp. 327-337.
  • 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).
  • J. von zur Gathen and J. Gerhard, Modern Computer Algebra, Cambridge, 1999, see p. 482.

Crossrefs

First column of A134541.
First column of A179287.

Programs

  • Haskell
    import Data.List (genericIndex)
    a002321 n = genericIndex a002321_list (n-1)
    a002321_list = scanl1 (+) a008683_list
    -- Reinhard Zumkeller, Jul 14 2014, Dec 26 2012
    
  • Magma
    [&+[MoebiusMu(k): k in [1..n]]: n in [1..81]]; // Bruno Berselli, Jul 12 2021
  • Maple
    with(numtheory); A002321 := n->add(mobius(k),k=1..n);
  • Mathematica
    Rest[ FoldList[ #1+#2&, 0, Array[ MoebiusMu, 100 ] ] ]
    Accumulate[Array[MoebiusMu,100]] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    a(n) = sum( k=1, n, moebius(k))
    
  • PARI
    a(n) = if( n<1, 0, matdet( matrix(n, n, i, j, j==1 || 0==j%i)))
    
  • PARI
    a(n)=my(s); forsquarefree(k=1,n, s+=moebius(k)); s \\ Charles R Greathouse IV, Jan 08 2018
    
  • Python
    from sympy import mobius
    def M(n): return sum(mobius(k) for k in range(1,n + 1))
    print([M(n) for n in range(1, 151)]) # Indranil Ghosh, Mar 18 2017
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A002321(n):
        if n == 0:
            return 0
        c, j = n, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*A002321(k1)
            j, k1 = j2, n//j2
        return j-c # Chai Wah Wu, Mar 30 2021
    

Formula

Assuming the Riemann hypothesis, a(n) = O(x^(1/2 + eps)) for every eps > 0 (Littlewood - see Landau p. 161).
Lambert series: Sum_{n >= 1} a(n)*(x^n/(1-x^n)-x^(n+1)/(1-x^(n+1))) = x and -1/x. - Mats Granvik, Sep 09 2010 and Sep 23 2010
a(n)+2 = A192763(n,1) for n>1, and A192763(1,k) for k>1 (conjecture). - Mats Granvik, Jul 10 2011
Sum_{k = 1..n} a(floor(n/k)) = 1. - David W. Wilson, Feb 27 2012
a(n) = Sum_{k = 1..n} tau_{-2}(k) * floor(n/k), where tau_{-2} is A007427. - Enrique Pérez Herrero, Jan 23 2013
a(n) = Sum_{k=1..A002088(n)} exp(2*Pi*i*A038566(k)/A038567(k-1)) where i is the imaginary unit. - Eric Desbiaux, Jul 31 2014
Schoenfeld proves that |a(n)| < 5.3*n/(log n)^(10/9) for n > 1. - Charles R Greathouse IV, Jan 17 2018
G.f. A(x) satisfies: A(x) = (1/(1 - x)) * (x - Sum_{k>=2} (1 - x^k) * A(x^k)). - Ilya Gutkovskiy, Aug 11 2021

A000367 Numerators of Bernoulli numbers B_2n.

Original entry on oeis.org

1, 1, -1, 1, -1, 5, -691, 7, -3617, 43867, -174611, 854513, -236364091, 8553103, -23749461029, 8615841276005, -7709321041217, 2577687858367, -26315271553053477373, 2929993913841559, -261082718496449122051
Offset: 0

Views

Author

Keywords

Examples

			B_{2n} = [ 1, 1/6, -1/30, 1/42, -1/30, 5/66, -691/2730, 7/6, -3617/510, ... ].
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 810.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 932.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 49.
  • H. T. Davis, Tables of the Mathematical Functions. Vols. 1 and 2, 2nd ed., 1963, Vol. 3 (with V. J. Fisher), 1962; Principia Press of Trinity Univ., San Antonio, TX, Vol. 2, p. 230.
  • G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
  • H. H. Goldstine, A History of Numerical Analysis, Springer-Verlag, 1977; Section 2.6.
  • F. Lemmermeyer, Reciprocity Laws From Euler to Eisenstein, Springer-Verlag, 2000, p. 330.
  • H. Rademacher, Topics in Analytic Number Theory, Springer, 1973, Chap. 1.
  • 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

B_n gives A027641/A027642. See A027641 for full list of references, links, formulas, etc.
See A002445 for denominators.

Programs

  • Maple
    A000367 := n -> numer(bernoulli(2*n)):
    # Illustrating an algorithmic approach:
    S := proc(n,k) option remember; if k=0 then `if`(n=0,1,0) else S(n, k-1) + S(n-1, n-k) fi end: Bernoulli2n := n -> `if`(n = 0,1,(-1)^n * S(2*n-1,2*n-1)*n/(2^(2*n-1)*(1-4^n))); A000367 := n -> numer(Bernoulli2n(n)); seq(A000367(n),n=0..20); # Peter Luschny, Jul 08 2012
  • Mathematica
    Numerator[ BernoulliB[ 2*Range[0, 20]]] (* Jean-François Alcover, Oct 16 2012 *)
    Table[Numerator[(-1)^(n+1) 2 Gamma[2 n + 1] Zeta[2 n]/(2 Pi)^(2 n)], {n, 0, 20}] (* Artur Jasinski, Dec 29 2020 *)
  • Maxima
    B(n):=if n=0 then 1 else 2*n*sum((2*n+k-2)!*sum(((-1)^(j+1)*stirling1(2*n+j,j))/ ((k-j)!*(2*n+j)!),j,1,k),k,0,2*n);
    makelist(num(B(n)),n,0,10); /* Vladimir Kruchinin, Mar 15 2013, fixed by Vaclav Kotesovec, Oct 22 2014 */
  • PARI
    a(n)=numerator(bernfrac(2*n))
    
  • Python
    # The objective of this implementation is efficiency.
    # n -> [a(0), a(1), ..., a(n)] for n > 0.
    from fractions import Fraction
    def A000367_list(n):  # Bernoulli numerators
        T = [0 for i in range(1, n+2)]
        T[0] = 1; T[1] = 1
        for k in range(2, n+1):
            T[k] = (k-1)*T[k-1]
        for k in range(2, n+1):
            for j in range(k, n+1):
                T[j] = (j-k)*T[j-1]+(j-k+2)*T[j]
        a = 0; b = 6; s = 1
        for k in range(1, n+1):
            T[k] = s*Fraction(T[k]*k, b).numerator
            h = b; b = 20*b - 64*a; a = h; s = -s
        return T
    print(A000367_list(100)) # Peter Luschny, Aug 09 2011
    

Formula

E.g.f: x/(exp(x) - 1); take numerators of even powers.
B_{2n}/(2n)! = 2*(-1)^(n-1)*(2*Pi)^(-2n) Sum_{k>=1} 1/k^(2n) (gives asymptotics) - Rademacher, p. 16, Eq. (9.1). In particular, B_{2*n} ~ (-1)^(n-1)*2*(2*n)!/(2*Pi)^(2*n).
If n >= 3 is prime, then 12*|a((n+1)/2)| == (-1)^((n-1)/2)*A002445((n+1)/2) (mod n). - Vladimir Shevelev, Sep 04 2010
a(n) = numerator(-i*(2*n)!/(Pi*(1-2*n))*Integral_{t=0..1} log(1-1/t)^(1-2*n) dt). - Gerry Martens, May 17 2011, corrected by Vaclav Kotesovec, Oct 22 2014
a(n) = numerator((-1)^(n+1)*(2*Pi)^(-2*n)*(2*n)!*Li_{2*n}(1)) for n > 0. - Peter Luschny, Jun 29 2012
E.g.f.: G(0) where G(k) = 2*k + 1 - x*(2*k+1)/(x + (2*k+2)/(1 + x/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Feb 13 2013
a(n) = numerator(2*n*Sum_{k=0..2*n} (2*n+k-2)! * Sum_{j=1..k} ((-1)^(j+1) * Stirling1(2*n+j,j)) / ((k-j)!*(2*n+j)!)), n > 0. - Vladimir Kruchinin, Mar 15 2013
E.g.f.: E(0) where E(k) = 2*k+1 - x/(2 + x/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Mar 16 2013
E.g.f.: E(0) - x, where E(k) = x + k + 1 - x*(k+1)/E(k+1); (continued fraction). - Sergei N. Gladkovskii, Jul 14 2013
a(n) = numerator((-1)^(n+1)*2*Gamma(2*n + 1)*zeta(2*n)/(2*Pi)^(2*n)). - Artur Jasinski, Dec 29 2020
a(n) = numerator(-2*n*zeta(1 - 2*n)) for n > 0. - Artur Jasinski, Jan 01 2021
Previous Showing 11-20 of 21685 results. Next