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 18 results. Next

A318314 Denominators of the sequence whose Dirichlet convolution with itself yields A068068, number of odd unitary divisors of n.

Original entry on oeis.org

1, 2, 1, 8, 1, 2, 1, 16, 2, 2, 1, 8, 1, 2, 1, 128, 1, 4, 1, 8, 1, 2, 1, 16, 2, 2, 2, 8, 1, 2, 1, 256, 1, 2, 1, 16, 1, 2, 1, 16, 1, 2, 1, 8, 2, 2, 1, 128, 2, 4, 1, 8, 1, 4, 1, 16, 1, 2, 1, 8, 1, 2, 2, 1024, 1, 2, 1, 8, 1, 2, 1, 32, 1, 2, 2, 8, 1, 2, 1, 128, 8, 2, 1, 8, 1, 2, 1, 16, 1, 4, 1, 8, 1, 2, 1, 256, 1, 4, 2, 16, 1, 2, 1, 16, 1
Offset: 1

Views

Author

Antti Karttunen and Andrew Howroyd, Aug 29 2018

Keywords

Comments

The sequence seems to give the denominators of several other similarly constructed "Dirichlet Square Roots".
Note that A318314 differs from A318454 at exactly those n where A001227 differs from A068068, the numbers in A038838. - Antti Karttunen, Sep 07 2018

Crossrefs

Programs

  • Mathematica
    a35[n_] := (1 - (-1)^n)/2;
    a120[n_] := DigitCount[n, 2, 1];
    a[n_] := Product[{p, e} = pe; 2^(((2 - a35[p])*e) - a120[e]), {pe, FactorInteger[n]}];
    a /@ Range[100] (* Jean-François Alcover, Sep 19 2019 *)
  • PARI
    up_to = 16384;
    A068068(n) = (2^omega(n>>valuation(n, 2))); \\ From A068068
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v318313_15 = DirSqrt(vector(up_to, n, A068068(n)));
    A318313(n) = numerator(v318313_15[n]);
    A318314(n) = denominator(v318313_15[n]);

Formula

a(n) = denominator of f(n), where f(1) = 1, f(n) = (1/2) * (A068068(n) - Sum_{d|n, d>1, d 1.
a(n) = 2^A318315(n).
From Antti Karttunen, Sep 03-07 2018: (Start, conjectured formulas)
a(n) = A006519(n) * A317934(n), thus multiplicative with a(2^e) = 2^A005187(e), a(p^e) = 2^A011371(e) for odd primes p.
Equally, multiplicative with a(p^e) = 2^(((2-A000035(p))*e)-A000120(e)) for all primes p.
(End)

A318313 Numerators of the sequence whose Dirichlet convolution with itself yields A068068, number of odd unitary divisors of n.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 35, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 63, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 35, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 231, 1, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 35, 3, 1, 1, 3, 1, 1, 1, 5, 1, 1, 1, 3, 1, 1, 1, 63, 1, 1, 1, 3, 1, 1, 1, 5, 1
Offset: 1

Views

Author

Antti Karttunen and Andrew Howroyd, Aug 29 2018

Keywords

Crossrefs

Cf. A068068, A318314 (denominators).
Differs from A318453 for the first time at n=81, where a(81) = 3, while A318453(81) = 1.

Programs

  • PARI
    up_to = 16384;
    A068068(n) = (2^omega(n>>valuation(n, 2))); \\ From A068068
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v318313_15 = DirSqrt(vector(up_to, n, A068068(n)));
    A318313(n) = numerator(v318313_15[n]);

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A068068(n) - Sum_{d|n, d>1, d 1.
Sum_{k=1..n} A318313(k) / A318314(k) ~ 2*n/Pi. - Vaclav Kotesovec, May 10 2025

A000005 d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

If the canonical factorization of n into prime powers is Product p^e(p) then d(n) = Product (e(p) + 1). More generally, for k > 0, sigma_k(n) = Product_p ((p^((e(p)+1)*k))-1)/(p^k-1) is the sum of the k-th powers of the divisors of n.
Number of ways to write n as n = x*y, 1 <= x <= n, 1 <= y <= n. For number of unordered solutions to x*y=n, see A038548.
Note that d(n) is not the number of Pythagorean triangles with radius of the inscribed circle equal to n (that is A078644). For number of primitive Pythagorean triangles having inradius n, see A068068(n).
Number of factors in the factorization of the polynomial x^n-1 over the integers. - T. D. Noe, Apr 16 2003
Also equal to the number of partitions p of n such that all the parts have the same cardinality, i.e., max(p)=min(p). - Giovanni Resta, Feb 06 2006
Equals A127093 as an infinite lower triangular matrix * the harmonic series, [1/1, 1/2, 1/3, ...]. - Gary W. Adamson, May 10 2007
For odd n, this is the number of partitions of n into consecutive integers. Proof: For n = 1, clearly true. For n = 2k + 1, k >= 1, map each (necessarily odd) divisor to such a partition as follows: For 1 and n, map k + (k+1) and n, respectively. For any remaining divisor d <= sqrt(n), map (n/d - (d-1)/2) + ... + (n/d - 1) + (n/d) + (n/d + 1) + ... + (n/d + (d-1)/2) {i.e., n/d plus (d-1)/2 pairs each summing to 2n/d}. For any remaining divisor d > sqrt(n), map ((d-1)/2 - (n/d - 1)) + ... + ((d-1)/2 - 1) + (d-1)/2 + (d+1)/2 + ((d+1)/2 + 1) + ... + ((d+1)/2 + (n/d - 1)) {i.e., n/d pairs each summing to d}. As all such partitions must be of one of the above forms, the 1-to-1 correspondence and proof is complete. - Rick L. Shepherd, Apr 20 2008
Number of subgroups of the cyclic group of order n. - Benoit Jubin, Apr 29 2008
Equals row sums of triangle A143319. - Gary W. Adamson, Aug 07 2008
Equals row sums of triangle A159934, equivalent to generating a(n) by convolving A000005 prefaced with a 1; (1, 1, 2, 2, 3, 2, ...) with the INVERTi transform of A000005, (A159933): (1, 1,-1, 0, -1, 2, ...). Example: a(6) = 4 = (1, 1, 2, 2, 3, 2) dot (2, -1, 0, -1, 1, 1) = (2, -1, 0, -2, 3, 2) = 4. - Gary W. Adamson, Apr 26 2009
Number of times n appears in an n X n multiplication table. - Dominick Cancilla, Aug 02 2010
Number of k >= 0 such that (k^2 + k*n + k)/(k + 1) is an integer. - Juri-Stepan Gerasimov, Oct 25 2015
The only numbers k such that tau(k) >= k/2 are 1,2,3,4,6,8,12. - Michael De Vlieger, Dec 14 2016
a(n) is also the number of partitions of 2*n into equal parts, minus the number of partitions of 2*n into consecutive parts. - Omar E. Pol, May 03 2017
From Tomohiro Yamada, Oct 27 2020: (Start)
Let k(n) = log d(n)*log log n/(log 2 * log n), then lim sup k(n) = 1 (Hardy and Wright, Chapter 18, Theorem 317) and k(n) <= k(6983776800) = 1.537939... (the constant A280235) for every n (Nicolas and Robin, 1983).
There exist infinitely many n such that d(n) = d(n+1) (Heath-Brown, 1984). The number of such integers n <= x is at least c*x/(log log x)^3 (Hildebrand, 1987) but at most O(x/sqrt(log log x)) (Erdős, Carl Pomerance and Sárközy, 1987). (End)
Number of 2D grids of n congruent rectangles with two different side lengths, in a rectangle, modulo rotation (cf. A038548 for squares instead of rectangles). Also number of ways to arrange n identical objects in a rectangle (NOT modulo rotation, cf. A038548 for modulo rotation); cf. A007425 and A140773 for the 3D case. - Manfred Boergens, Jun 08 2021
The constant quoted above from Nicolas and Robin, 6983776800 = 2^5 * 3^3 * 5^2 * 7 * 11 * 13 * 17 * 19, appears arbitrary, but interestingly equals 2 * A095849(36). That second factor is highly composite and deeply composite. - Hal M. Switkay, Aug 08 2025

Examples

			G.f. = x + 2*x^2 + 2*x^3 + 3*x^4 + 2*x^5 + 4*x^6 + 2*x^7 + 4*x^8 + 3*x^9 + ...
		

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. 840.
  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 38.
  • G. Chrystal, Algebra: An elementary text-book for the higher classes of secondary schools and for colleges, 6th ed, Chelsea Publishing Co., New York 1959 Part II, p. 345, Exercise XXI(16). MR0121327 (22 #12066)
  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 55.
  • G. H. Hardy and E. M. Wright, revised by D. R. Heath-Brown and J. H. Silverman, An Introduction to the Theory of Numbers, 6th ed., Oxford Univ. Press, 2008.
  • K. Knopp, Theory and Application of Infinite Series, Blackie, London, 1951, p. 451.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Chap. II. (For inequalities, etc.)
  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962. Has many references to this sequence. - N. J. A. Sloane, Jun 02 2014
  • 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).
  • B. Spearman and K. S. Williams, Handbook of Estimates in the Theory of Numbers, Carleton Math. Lecture Note Series No. 14, 1975; see p. 2.1.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 285.
  • E. C. Titchmarsh, The Theory of Functions, Oxford, 1938, p. 160.
  • Terence Tao, Poincaré's Legacies, Part I, Amer. Math. Soc., 2009, see pp. 31ff for upper bounds on d(n).

Crossrefs

See A002183, A002182 for records. See A000203 for the sum-of-divisors function sigma(n).
For partial sums see A006218.
Factorizations into given number of factors: writing n = x*y (A038548, unordered, A000005, ordered), n = x*y*z (A034836, unordered, A007425, ordered), n = w*x*y*z (A007426, ordered).
Cf. A098198 (Dgf at s=2), A183030 (Dgf at s=3), A183031 (Dgf at s=3).

Programs

  • GAP
    List([1..150],n->Tau(n)); # Muniru A Asiru, Mar 05 2019
    
  • Haskell
    divisors 1 = [1]
    divisors n = (1:filter ((==0) . rem n)
                   [2..n `div` 2]) ++ [n]
    a = length . divisors
    -- James Spahlinger, Oct 07 2012
    
  • Haskell
    a000005 = product . map (+ 1) . a124010_row  -- Reinhard Zumkeller, Jul 12 2013
    
  • Julia
    function tau(n)
        i = 2; num = 1
        while i * i <= n
            if rem(n, i) == 0
                e = 0
                while rem(n, i) == 0
                    e += 1
                    n = div(n, i)
                end
                num *= e + 1
            end
            i += 1
        end
        return n > 1 ? num + num : num
    end
    println([tau(n) for n in 1:104])  # Peter Luschny, Sep 03 2023
  • Magma
    [ NumberOfDivisors(n) : n in [1..100] ]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Maple
    with(numtheory): A000005 := tau; [ seq(tau(n), n=1..100) ];
  • Mathematica
    Table[DivisorSigma[0, n], {n, 100}] (* Enrique Pérez Herrero, Aug 27 2009 *)
    CoefficientList[Series[(Log[1 - q] + QPolyGamma[1, q])/(q Log[q]), {q, 0, 100}], q] (* Vladimir Reshetnikov, Apr 23 2013 *)
    a[ n_] := SeriesCoefficient[ (QPolyGamma[ 1, q] + Log[1 - q]) / Log[q], {q, 0, Abs@n}]; (* Michael Somos, Apr 25 2013 *)
    a[ n_] := SeriesCoefficient[ q/(1 - q)^2 QHypergeometricPFQ[ {q, q}, {q^2, q^2}, q, q^2], {q, 0, Abs@n}]; (* Michael Somos, Mar 05 2014 *)
    a[n_] := SeriesCoefficient[q/(1 - q) QHypergeometricPFQ[{q, q}, {q^2}, q, q], {q, 0, Abs@n}] (* Mats Granvik, Apr 15 2015 *)
    With[{M=500},CoefficientList[Series[(2x)/(1-x)-Sum[x^k (1-2x^k)/(1-x^k),{k,M}],{x,0,M}],x]] (* Mamuka Jibladze, Aug 31 2018 *)
  • MuPAD
    numlib::tau (n)$ n=1..90 // Zerinvary Lajos, May 13 2008
    
  • PARI
    {a(n) = if( n==0, 0, numdiv(n))}; /* Michael Somos, Apr 27 2003 */
    
  • PARI
    {a(n) = n=abs(n); if( n<1, 0, direuler( p=2, n, 1 / (1 - X)^2)[n])}; /* Michael Somos, Apr 27 2003 */
    
  • PARI
    {a(n)=polcoeff(sum(m=1, n+1, sumdiv(m, d, (-log(1-x^(m/d) +x*O(x^n) ))^d/d!)), n)} \\ Paul D. Hanna, Aug 21 2014
    
  • Python
    from sympy import divisor_count
    for n in range(1, 20): print(divisor_count(n), end=', ') # Stefano Spezia, Nov 05 2018
    
  • Sage
    [sigma(n, 0) for n in range(1, 105)]  # Zerinvary Lajos, Jun 04 2009
    

Formula

If n is written as 2^z*3^y*5^x*7^w*11^v*... then a(n)=(z+1)*(y+1)*(x+1)*(w+1)*(v+1)*...
a(n) = 2 iff n is prime.
G.f.: Sum_{n >= 1} a(n) x^n = Sum_{k>0} x^k/(1-x^k). This is usually called THE Lambert series (see Knopp, Titchmarsh).
a(n) = A083888(n) + A083889(n) + A083890(n) + A083891(n) + A083892(n) + A083893(n) + A083894(n) + A083895(n) + A083896(n).
a(n) = A083910(n) + A083911(n) + A083912(n) + A083913(n) + A083914(n) + A083915(n) + A083916(n) + A083917(n) + A083918(n) + A083919(n).
Multiplicative with a(p^e) = e+1. - David W. Wilson, Aug 01 2001
a(n) <= 2 sqrt(n) [see Mitrinovich, p. 39, also A046522].
a(n) is odd iff n is a square. - Reinhard Zumkeller, Dec 29 2001
a(n) = Sum_{k=1..n} f(k, n) where f(k, n) = 1 if k divides n, 0 otherwise (Mobius transform of A000012). Equivalently, f(k, n) = (1/k)*Sum_{l=1..k} z(k, l)^n with z(k, l) the k-th roots of unity. - Ralf Stephan, Dec 25 2002
G.f.: Sum_{k>0} ((-1)^(k+1) * x^(k * (k + 1)/2) / ((1 - x^k) * Product_{i=1..k} (1 - x^i))). - Michael Somos, Apr 27 2003
a(n) = n - Sum_{k=1..n} (ceiling(n/k) - floor(n/k)). - Benoit Cloitre, May 11 2003
a(n) = A032741(n) + 1 = A062011(n)/2 = A054519(n) - A054519(n-1) = A006218(n) - A006218(n-1) = 1 + Sum_{k=1..n-1} A051950(k+1). - Ralf Stephan, Mar 26 2004
G.f.: Sum_{k>0} x^(k^2)*(1+x^k)/(1-x^k). Dirichlet g.f.: zeta(s)^2. - Michael Somos, Apr 05 2003
Sequence = M*V where M = A129372 as an infinite lower triangular matrix and V = ruler sequence A001511 as a vector: [1, 2, 1, 3, 1, 2, 1, 4, ...]. - Gary W. Adamson, Apr 15 2007
Sequence = M*V, where M = A115361 is an infinite lower triangular matrix and V = A001227, the number of odd divisors of n, is a vector: [1, 1, 2, 1, 2, 2, 2, ...]. - Gary W. Adamson, Apr 15 2007
Row sums of triangle A051731. - Gary W. Adamson, Nov 02 2007
Sum_{n>0} a(n)/(n^n) = Sum_{n>0, m>0} 1/(n*m). - Gerald McGarvey, Dec 15 2007
Logarithmic g.f.: Sum_{n>=1} a(n)/n * x^n = -log( Product_{n>=1} (1-x^n)^(1/n) ). - Joerg Arndt, May 03 2008
a(n) = Sum_{k=1..n} (floor(n/k) - floor((n-1)/k)). - Enrique Pérez Herrero, Aug 27 2009
a(s) = 2^omega(s), if s > 1 is a squarefree number (A005117) and omega(s) is: A001221. - Enrique Pérez Herrero, Sep 08 2009
a(n) = A048691(n) - A055205(n). - Reinhard Zumkeller, Dec 08 2009
For n > 1, a(n) = 2 + Sum_{k=2..n-1} floor((cos(Pi*n/k))^2). And floor((cos(Pi*n/k))^2) = floor(1/4 * e^(-(2*i*Pi*n)/k) + 1/4 * e^((2*i*Pi*n)/k) + 1/2). - Eric Desbiaux, Mar 09 2010, corrected Apr 16 2011
a(n) = 1 + Sum_{k=1..n} (floor(2^n/(2^k-1)) mod 2) for every n. - Fabio Civolani (civox(AT)tiscali.it), Mar 12 2010
From Vladimir Shevelev, May 22 2010: (Start)
(Sum_{d|n} a(d))^2 = Sum_{d|n} a(d)^3 (J. Liouville).
Sum_{d|n} A008836(d)*a(d)^2 = A008836(n)*Sum_{d|n} a(d). (End)
a(n) = sigma_0(n) = 1 + Sum_{m>=2} Sum_{r>=1} (1/m^(r+1))*Sum_{j=1..m-1} Sum_{k=0..m^(r+1)-1} e^(2*k*Pi*i*(n+(m-j)*m^r)/m^(r+1)). - A. Neves, Oct 04 2010
a(n) = 2*A038548(n) - A010052(n). - Reinhard Zumkeller, Mar 08 2013
Sum_{n>=1} a(n)*q^n = (log(1-q) + psi_q(1)) / log(q), where psi_q(z) is the q-digamma function. - Vladimir Reshetnikov, Apr 23 2013
a(n) = Product_{k = 1..A001221(n)} (A124010(n,k) + 1). - Reinhard Zumkeller, Jul 12 2013
a(n) = Sum_{k=1..n} A238133(k)*A000041(n-k). - Mircea Merca, Feb 18 2013
G.f.: Sum_{k>=1} Sum_{j>=1} x^(j*k). - Mats Granvik, Jun 15 2013
The formula above is obtained by expanding the Lambert series Sum_{k>=1} x^k/(1-x^k). - Joerg Arndt, Mar 12 2014
G.f.: Sum_{n>=1} Sum_{d|n} ( -log(1 - x^(n/d)) )^d / d!. - Paul D. Hanna, Aug 21 2014
2*Pi*a(n) = Sum_{m=1..n} Integral_{x=0..2*Pi} r^(m-n)( cos((m-n)*x)-r^m cos(n*x) )/( 1+r^(2*m)-2r^m cos(m*x) )dx, 0 < r < 1 a free parameter. This formula is obtained as the sum of the residues of the Lambert series Sum_{k>=1} x^k/(1-x^k). - Seiichi Kirikami, Oct 22 2015
a(n) = A091220(A091202(n)) = A106737(A156552(n)). - Antti Karttunen, circa 2004 & Mar 06 2017
a(n) = A034296(n) - A237665(n+1) [Wang, Fokkink, Fokkink]. - George Beck, May 06 2017
G.f.: 2*x/(1-x) - Sum_{k>0} x^k*(1-2*x^k)/(1-x^k). - Mamuka Jibladze, Aug 29 2018
a(n) = Sum_{k=1..n} 1/phi(n / gcd(n, k)). - Daniel Suteu, Nov 05 2018
a(k*n) = a(n)*(f(k,n)+2)/(f(k,n)+1), where f(k,n) is the exponent of the highest power of k dividing n and k is prime. - Gary Detlefs, Feb 08 2019
a(n) = 2*log(p(n))/log(n), n > 1, where p(n)= the product of the factors of n = A007955(n). - Gary Detlefs, Feb 15 2019
a(n) = (1/n) * Sum_{k=1..n} sigma(gcd(n,k)), where sigma(n) = sum of divisors of n. - Orges Leka, May 09 2019
a(n) = A001227(n)*(A007814(n) + 1) = A001227(n)*A001511(n). - Ivan N. Ianakiev, Nov 14 2019
From Richard L. Ollerton, May 11 2021: (Start)
a(n) = A038040(n) / n = (1/n)*Sum_{d|n} phi(d)*sigma(n/d), where phi = A000010 and sigma = A000203.
a(n) = (1/n)*Sum_{k=1..n} phi(gcd(n,k))*sigma(n/gcd(n,k))/phi(n/gcd(n,k)). (End)
From Ridouane Oudra, Nov 12 2021: (Start)
a(n) = Sum_{j=1..n} Sum_{k=1..j} (1/j)*cos(2*k*n*Pi/j);
a(n) = Sum_{j=1..n} Sum_{k=1..j} (1/j)*e^(2*k*n*Pi*i/j), where i^2=-1. (End)

Extensions

Incorrect formula deleted by Ridouane Oudra, Oct 28 2021

A036987 Fredholm-Rueppel sequence.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Binary representation of the Kempner-Mahler number Sum_{k>=0} 1/2^(2^k) = A007404.
a(n) = (product of digits of n; n in binary notation) mod 2. This sequence is a transformation of the Thue-Morse sequence (A010060), since there exists a function f such that f(sum of digits of n) = (product of digits of n). - Ctibor O. Zizka, Feb 12 2008
a(n-1), n >= 1, the characteristic sequence for powers of 2, A000079, is the unique solution of the following formal product and formal power series identity: Product_{j>=1} (1 + a(j-1)*x^j) = 1 + Sum_{k>=1} x^k = 1/(1-x). The product is therefore Product_{l>=1} (1 + x^(2^l)). Proof. Compare coefficients of x^n and use the binary representation of n. Uniqueness follows from the recurrence relation given for the general case under A147542. - Wolfdieter Lang, Mar 05 2009
a(n) is also the number of orbits of length n for the map x -> 1-cx^2 on [-1,1] at the Feigenbaum critical value c=1.401155... . - Thomas Ward, Apr 08 2009
A054525 (Mobius transform) * A001511 = A036987 = A047999^(-1) * A001511 = the inverse of Sierpiński's gasket * the ruler sequence. - Gary W. Adamson, Oct 26 2009 [Of course this is only vaguely correct depending on how the fuzzy indexing in these formulas is made concrete. - R. J. Mathar, Jun 20 2014]
Characteristic function of A000225. - Reinhard Zumkeller, Mar 06 2012
Also parity of the Catalan numbers A000108. - Omar E. Pol, Jan 17 2012
For n >= 2, also the largest exponent k >= 0 such that n^k in binary notation does not contain both 0 and 1. Unlike for the decimal version of this sequence, A062518, where the terms are only conjectural, for this sequence the values of a(n) can be proved to be the characteristic function of A000225, as follows: n^k will contain both 0 and 1 unless n^k = 2^r-1 for some r. But this is a special case of Catalan's equation x^p = y^q-1, which was proved by Preda Mihăilescu to have no nontrivial solution except 2^3 = 3^2 - 1. - Christopher J. Smyth, Aug 22 2014
Image, under the coding a,b -> 1; c -> 0, of the fixed point, starting with a, of the morphism a -> ab, b -> cb, c -> cc. - Jeffrey Shallit, May 14 2016
Number of nonisomorphic Boolean algebras of order n+1. - Jianing Song, Jan 23 2020

Examples

			G.f. = 1 + x + x^3 + x^7 + x^15 + x^31 + x^63 + x^127 + x^255 + x^511 + ...
a(7) = 1 since 7 = 2^3 - 1, while a(10) = 0 since 10 is not of the form 2^k - 1 for any integer k.
		

Crossrefs

The first row of A073346. Occurs for first time in A073202 as row 6 (and again as row 8).
Congruent to any of the sequences A000108, A007460, A007461, A007463, A007464, A061922, A068068 reduced modulo 2. Characteristic function of A000225.
If interpreted with offset=1 instead of 0 (i.e., a(1)=1, a(2)=1, a(3)=0, a(4)=1, ...) then this is the characteristic function of 2^n (A000079) and as such occurs as the first row of A073265. Also, in that case the INVERT transform will produce A023359.
This is Guy Steele's sequence GS(1, 3), also GS(3, 1) (see A135416).
Cf. A054525, A047999. - Gary W. Adamson, Oct 26 2009

Programs

  • Haskell
    a036987 n = ibp (n+1) where
       ibp 1 = 1
       ibp n = if r > 0 then 0 else ibp n' where (n',r) = divMod n 2
    a036987_list = 1 : f [0,1] where f (x:y:xs) = y : f (x:xs ++ [x,x+y])
    -- Same list generator function as for a091090_list, cf. A091090.
    -- Reinhard Zumkeller, May 19 2015, Apr 13 2013, Mar 13 2013
    
  • Maple
    A036987:= n-> `if`(2^ilog2(n+1) = n+1, 1, 0):
    seq(A036987(n), n=0..128);
  • Mathematica
    RealDigits[ N[ Sum[1/10^(2^n), {n, 0, Infinity}], 110]][[1]]
    (* Recurrence: *)
    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, k], {k, n, n}, {n, 104}]
    (* Mats Granvik, Jun 03 2011 *)
    mb2d[n_]:=1 - Module[{n2 = IntegerDigits[n, 2]}, Max[n2] - Min[n2]]; Array[mb2d, 120, 0] (* Vincenzo Librandi, Jul 19 2019 *)
    Table[PadRight[{1},2^k,0],{k,0,7}]//Flatten (* Harvey P. Dale, Apr 23 2022 *)
  • PARI
    {a(n) =( n++) == 2^valuation(n, 2)}; /* Michael Somos, Aug 25 2003 */
    
  • PARI
    a(n) = !bitand(n, n+1); \\ Ruud H.G. van Tol, Apr 05 2023
    
  • Python
    from sympy import catalan
    def a(n): return catalan(n)%2 # Indranil Ghosh, May 25 2017
    
  • Python
    def A036987(n): return int(not(n&(n+1))) # Chai Wah Wu, Jul 06 2022

Formula

1 followed by a string of 2^k - 1 0's. Also a(n)=1 iff n = 2^m - 1.
a(n) = a(floor(n/2)) * (n mod 2) for n>0 with a(0)=1. - Reinhard Zumkeller, Aug 02 2002 [Corrected by Mikhail Kurkov, Jul 16 2019]
Sum_{n>=0} 1/10^(2^n) = 0.110100010000000100000000000000010...
1 if n=0, floor(log_2(n+1)) - floor(log_2(n)) otherwise. G.f.: (1/x) * Sum_{k>=0} x^(2^k) = Sum_{k>=0} x^(2^k-1). - Ralf Stephan, Apr 28 2003
a(n) = 1 - A043545(n). - Michael Somos, Aug 25 2003
a(n) = -Sum_{d|n+1} mu(2*d). - Benoit Cloitre, Oct 24 2003
Dirichlet g.f. for right-shifted sequence: 2^(-s)/(1-2^(-s)).
a(n) = A000108(n) mod 2 = A001405(n) mod 2. - Paul Barry, Nov 22 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n,k)*Sum_{j=0..k} binomial(k, 2^j-1). - Paul Barry, Jun 01 2006
A000523(n+1) = Sum_{k=1..n} a(k). - Mitch Harris, Jul 22 2011
a(n) = A209229(n+1). - Reinhard Zumkeller, Mar 07 2012
a(n) = Sum_{k=1..n} A191898(n,k)*cos(Pi*(n-1)*(k-1))/n; (conjecture). - Mats Granvik, Mar 04 2013
a(n) = A000035(A000108(n)). - Omar E. Pol, Aug 06 2013
a(n) = 1 iff n=2^k-1 for some k, 0 otherwise. - M. F. Hasler, Jun 20 2014
a(n) = ceiling(log_2(n+2)) - ceiling(log_2(n+1)). - Gionata Neri, Sep 06 2015
From John M. Campbell, Jul 21 2016: (Start)
a(n) = (A000168(n-1) mod 2).
a(n) = (A000531(n+1) mod 2).
a(n) = (A000699(n+1) mod 2).
a(n) = (A000891(n) mod 2).
a(n) = (A000913(n-1) mod 2), for n>1.
a(n) = (A000917(n-1) mod 2), for n>0.
a(n) = (A001142(n) mod 2).
a(n) = (A001246(n) mod 2).
a(n) = (A001246(n) mod 4).
a(n) = (A002057(n-2) mod 2), for n>1.
a(n) = (A002430(n+1) mod 2). (End)
a(n) = 2 - A043529(n). - Antti Karttunen, Nov 19 2017
a(n) = floor(1+log(n+1)/log(2)) - floor(log(2n+1)/log(2)). - Adriano Caroli, Sep 22 2019
This is also the decimal expansion of -Sum_{k>=1} mu(2*k)/(10^k - 1), where mu is the Möbius function (A008683). - Amiram Eldar, Jul 12 2020

Extensions

Edited by M. F. Hasler, Jun 20 2014

A020888 Ordered set of (a + b - c)/2 as (a,b,c) runs through all primitive Pythagorean triples with a

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 30, 30, 31, 31, 32, 33, 33, 33, 33, 34, 34, 35, 35, 35, 35
Offset: 1

Views

Author

Keywords

Comments

n appears A068068(n) number of times. - Lekraj Beedassy, May 03 2006
Ordered inradii of primitive Pythagorean triangles. - Lekraj Beedassy, May 08 2006

Crossrefs

For values ordered by hypotenuse, see A014498.

Formula

a(n) = A020887(n)/2.

Extensions

Offset corrected to 1 by Ray Chandler, Jan 23 2020

A192066 Sum of the odd unitary divisors of n.

Original entry on oeis.org

1, 1, 4, 1, 6, 4, 8, 1, 10, 6, 12, 4, 14, 8, 24, 1, 18, 10, 20, 6, 32, 12, 24, 4, 26, 14, 28, 8, 30, 24, 32, 1, 48, 18, 48, 10, 38, 20, 56, 6, 42, 32, 44, 12, 60, 24, 48, 4, 50, 26, 72, 14, 54, 28, 72, 8, 80, 30, 60, 24, 62, 32, 80, 1, 84, 48, 68, 18, 96, 48, 72, 10, 74, 38, 104, 20, 96, 56, 80, 6
Offset: 1

Views

Author

R. J. Mathar, Jun 22 2011

Keywords

Comments

The unitary analog of A000593.

Examples

			n=9 has the divisors 1, 3 and 9, of which 3 is not a unitary divisor because gcd(3,9/3) = gcd(3,3) != 1. This leaves 1 and 9 as unitary divisors which sum to a(9) = 1+9 = 10.
		

Crossrefs

Programs

  • Haskell
    a192066 = sum . filter odd . a077610_row
    -- Reinhard Zumkeller, Feb 12 2012
    
  • Maple
    unitaryOddSigma := proc(n,k) local a,d ; a := 0 ; for d in numtheory[divisors](n) do if type(d,'odd') then if igcd(d,n/d) = 1 then a := a+d^k ; end if; end if; end do: a ; end proc:
    A := proc(n) unitaryOddSigma(n,1) ;end proc:
  • Mathematica
    a[n_] := DivisorSum[n, Boole[OddQ[#] && GCD[#, n/#] == 1]*#&];
    Array[a, 80] (* Jean-François Alcover, Nov 16 2017 *)
    f[2, p_] := 1; f[p_, e_] := p^e + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 18 2020 *)
  • PARI
    a(n) = sumdiv(n, d, if ((gcd(d, n/d)==1) && (d%2), d)); \\ Michel Marcus, Nov 17 2017

Formula

a(n) = Sum_{d|n, d odd, gcd(d,n/d)=1} d.
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-2^(1-s))/( zeta(2s-1)*(1-2^(1-2s)) ).
Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / (21*zeta(3)). - Vaclav Kotesovec, Feb 02 2019
Multiplicative with a(2^e) = 1, and a(p^e) = p^e + 1 for p > 2. - Amiram Eldar, Sep 18 2020

A144871 Square array A(n,k), n>=1, k>=1, read by antidiagonals, where sequence a_k of column k is shadow transform of C(n+k-1,k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 3, 2, 1, 1, 1, 1, 1, 4, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 2, 3, 1, 3, 4, 2, 2, 1, 1, 1, 1, 1, 2, 3, 5, 1, 1, 2, 1, 1, 1, 1, 1, 3, 4, 6, 2, 2, 4, 2, 1, 1, 1, 2, 1, 4, 1, 1, 1, 4, 4, 3, 2, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 4, 3, 2, 1
Offset: 1

Views

Author

Alois P. Heinz, Sep 23 2008

Keywords

Comments

Row sequences have periods 1, 1, 3, 8, ... given in A144872.

Examples

			Square array begins:
  1, 1, 1, 1, 1, 1, ...
  1, 1, 1, 1, 1, 1, ...
  1, 2, 1, 1, 2, 1, ...
  1, 1, 2, 1, 1, 2, ...
  1, 2, 3, 4, 1, 1, ...
  1, 2, 1, 1, 3, 3, ...
		

Crossrefs

Rows 1+2, 3 give: A000012, A101825.
Periods of the row sequences: A144872.
Cf. A007318.

Programs

  • Maple
    shadow:= proc(p) proc(n) add(`if`(modp(p(j), n)=0, 1, 0), j=0..n-1)
             end end:
    f:= proc(k) proc(n) binomial(n+k-1, k) end end:
    A:= (n, k)-> shadow(f(k))(n):
    seq(seq(A(n, 1+d-n), n=1..d), d=1..20);
  • Mathematica
    shadow[p_] := Function[n, Sum[If[Mod[p[j], n] == 0, 1, 0], {j, 0, n-1}]]; f[k_] := Function[n, Binomial[n+k-1, k]]; a[n_, k_] := shadow[f[k]][n]; Table[Table[a[n, 1+d-n], {n, 1, d}], {d, 1, 20}] // Flatten (* Jean-François Alcover, Dec 18 2013, translated from Maple *)

A327276 a(n) = Sum_{d|n, d odd} mu(d) * mu(n/d).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 15 2019

Keywords

Comments

Dirichlet inverse of A001227.
All terms are 0 or +/- a power of 2. - Robert Israel, Nov 26 2019

Crossrefs

Programs

  • Magma
    [&+[MoebiusMu(d)*MoebiusMu(n div d): d in [a:a in Divisors(n)| IsOdd(a)]]:n in [1..80]]; // Marius A. Burtea, Sep 15 2019
    
  • Maple
    f:= proc(n) local m, d;
      m:= n/2^padic:-ordp(n,2);
      add(numtheory:-mobius(d)*numtheory:-mobius(n/d), d = numtheory:-divisors(m))
    end proc:
    map(f, [$1..100]); # Robert Israel, Nov 26 2019
  • Mathematica
    Table[DivisorSum[n, MoebiusMu[#] MoebiusMu[n/#] &, OddQ[#] &], {n, 1, 79}]
    a[n_] := If[n == 1, n, -Sum[If[d < n, DivisorSum[n/d, Mod[#, 2] &] a[d], 0], {d, Divisors[n]}]]; Table[a[n], {n, 1, 79}]
    f[p_, e_] := Which[e == 1, -1 - Boole[p > 2], e == 2, Boole[p > 2], e > 2, 0]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Oct 25 2020 *)
  • PARI
    a(n)={sumdiv(n, d, if(d%2, moebius(d)*moebius(n/d)))} \\ Andrew Howroyd, Sep 23 2019

Formula

G.f. A(x) satisfies: A(x) = x - Sum_{k>=2} A001227(k) * A(x^k).
Dirichlet g.f.: 1 / (zeta(s)^2 * (1 - 1/2^s)).
a(1) = 1; a(n) = -Sum_{d|n, dA001227(n/d) * a(d).
a(n) = Sum_{d|n} A209229(n/d) * A007427(d).
Multiplicative with a(2^e) = -1 if e = 1, and 0 if e > 1, and a(p^e) = -2 if e = 1, 1 if e = 2, and 0 if e > 2, for an odd prime p. - Amiram Eldar, Oct 25 2020

A078644 a(n) = tau(2*n^2)/2.

Original entry on oeis.org

1, 2, 3, 3, 3, 6, 3, 4, 5, 6, 3, 9, 3, 6, 9, 5, 3, 10, 3, 9, 9, 6, 3, 12, 5, 6, 7, 9, 3, 18, 3, 6, 9, 6, 9, 15, 3, 6, 9, 12, 3, 18, 3, 9, 15, 6, 3, 15, 5, 10, 9, 9, 3, 14, 9, 12, 9, 6, 3, 27, 3, 6, 15, 7, 9, 18, 3, 9, 9, 18, 3, 20, 3, 6, 15, 9, 9, 18, 3, 15, 9, 6, 3, 27, 9, 6, 9, 12, 3, 30, 9, 9, 9, 6, 9
Offset: 1

Views

Author

Vladeta Jovovic, Dec 13 2002

Keywords

Comments

Inverse Moebius transform of A068068. Number of elements in the set {(x,y): x is odd, x|n, y|n, gcd(x,y)=1}.
The number of Pythagorean points (x,y), 0 < x < y, located on the hyperbola y = 2n(x-n)/(x-2n) and having "excess" x+y-z = 2n. - Seppo Mustonen, Jun 07 2005
a(n) is the number of Pythagorean triangles with radius of the inscribed circle equal to n. For number of primitive Pythagorean triangles having inradius n, see A068068(n). - Ant King, Mar 06 2006
Dirichlet convolution of A048691 and A154269. - R. J. Mathar, Jun 01 2011
Number of distinct L-shapes of thickness n where the L area equals the rectangular area that it "contains". Visually can be thought as those areas of A156688 (surrounded by equal border of thickness n: 2xy = (x+2n)(y+2n), x and y positive integers) where both x and y are even, so they can be split into L-shapes. So L-shapes have formula: 2xy = (x+n)(y+n). - Juhani Heino, Jul 23 2012

Crossrefs

Programs

  • Magma
    [NumberOfDivisors(2*n^2)/2 : n in [1..100]]; // Vincenzo Librandi, Aug 14 2018
  • Maple
    with(numtheory): seq(add(mobius(2*d)^2*tau(n/d), d in divisors(n)), n=1..100); # Ridouane Oudra, Nov 17 2019
  • Mathematica
    Table[DivisorSigma[0, 2 n^2] / 2, {n, 100}] (* Vincenzo Librandi, Aug 14 2018 *)
  • PARI
    a(n) = numdiv(2*n^2)/2; \\ Michel Marcus, Oct 04 2013
    
  • Sage
    [sigma(2*n^2,0)/2 for n in range(1,100)] # Joerg Arndt, May 12 2014
    

Formula

Multiplicative with a(2^e) = e+1, a(p^e) = 2*e+1, p > 2. a(n) = tau(n^2) if n is odd, a(n) = tau(n^2) - a(n/2) if n is even.
Dirichlet g.f.: zeta^3(s)/(zeta(2s)*(1+1/2^s)). - R. J. Mathar, Jun 01 2011
Sum_{k=1..n} a(k) ~ 2*n / (9*Pi^2) * (9*log(n)^2 + 6*log(n) * (-3 + 9*g + log(2) - 36*Pi^(-2)*z1) + 18 + 54*g^2 + 18*g * (log(2) - 3) - 6*log(2) - log(2)^2 - 54*sg1 + 2592*z1^2/Pi^4 - 72*Pi^-2*(9*g*z1 + (log(2) - 3)*z1 + 3*z2)), where g is the Euler-Mascheroni constant A001620, sg1 is the first Stieltjes constant A082633, z1 = Zeta'(2) = A073002, z2 = Zeta''(2) = A201994. - Vaclav Kotesovec, Feb 02 2019
a(n) = Sum_{d|n} mu(2d)^2*tau(n/d), Dirichlet convolution of A323239 and A000005. - Ridouane Oudra, Nov 17 2019
a(n) = A361689(n)/2. - R. J. Mathar, Mar 21 2023

A100008 Number of unitary divisors of 2n.

Original entry on oeis.org

2, 2, 4, 2, 4, 4, 4, 2, 4, 4, 4, 4, 4, 4, 8, 2, 4, 4, 4, 4, 8, 4, 4, 4, 4, 4, 4, 4, 4, 8, 4, 2, 8, 4, 8, 4, 4, 4, 8, 4, 4, 8, 4, 4, 8, 4, 4, 4, 4, 4, 8, 4, 4, 4, 8, 4, 8, 4, 4, 8, 4, 4, 8, 2, 8, 8, 4, 4, 8, 8, 4, 4, 4, 4, 8, 4, 8, 8, 4, 4, 4, 4, 4, 8, 8, 4, 8, 4, 4, 8, 8, 4, 8, 4, 8, 4, 4, 4, 8, 4, 4, 8, 4, 4, 16
Offset: 1

Views

Author

N. J. A. Sloane, Nov 20 2004

Keywords

Comments

b(n) = a(n)/a(1) is multiplicative with b(2^e) = 1, b(p^e) = 2 otherwise. - David W. Wilson, Jun 12 2005

Examples

			a(6)=4 because among the six divisors of 12 only 1,3,4 and 12 are unitary.
		

Crossrefs

Bisection of A034444, twice A068068.

Programs

  • Maple
    with(numtheory): for n from 1 to 120 do printf(`%d,`,2^nops(ifactors(2*n)[2])) od: # Emeric Deutsch, Dec 24 2004
  • Mathematica
    a[n_] := 2^PrimeNu[2*n]; Array[a, 100] (* Amiram Eldar, Jan 28 2023 *)
  • PARI
    A100008(n) = 2^omega(2*n); \\ Antti Karttunen, Sep 14 2017

Formula

a(n) = A000079(A099812(n)) = A000079(A001221(2n)) = 2*A068068(n). - Antti Karttunen, Sep 14 2017
Dirichlet g.f.: 2*zeta(s)^2/(zeta(2*s)*(1+1/2^s)). - Amiram Eldar, Jan 28 2023
Sum_{k=1..n} a(k) ~ 8*n*((log(n) - 1 + 2*gamma + log(2)/3)/Pi^2 - 12*zeta'(2)/Pi^4), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 28 2023

Extensions

More terms from Emeric Deutsch, Dec 24 2004
Showing 1-10 of 18 results. Next