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

A011655 Period 3: repeat [0, 1, 1].

Original entry on oeis.org

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, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Keywords

Comments

A binary m-sequence: expansion of reciprocal of x^2+x+1 (mod 2).
A Chebyshev transform of the Jacobsthal numbers A001045: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))*A(x/(1+x^2)). - Paul Barry, Feb 16 2004
This is the r = 1 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.
This is the Fibonacci sequence (A000045) modulo 2. - Stephen Jordan (sjordan(AT)mit.edu), Sep 10 2007
For n > 0: a(n) = A084937(n-1) mod 2. - Reinhard Zumkeller, Dec 16 2007
This is also the Lucas numbers (A000032) mod 2. In general, this is the parity of any Lucas sequence associated with any pair (P,Q) when P and Q are odd; i.e., a(n) = U_n(P,Q) mod 2 = V_n(P,Q) mod 2. See Ribenboim. - Rick L. Shepherd, Feb 07 2009
Starting with offset 1: (1, 1, 0, 1, 1, 0, ...) = INVERTi transform of the tribonacci sequence A001590 starting (1, 2, 3, 6, 11, 20, 37, ...). - Gary W. Adamson, May 04 2009
From Reinhard Zumkeller, Nov 30 2009: (Start)
Characteristic function of numbers coprime to 3.
a(n) = 1 - A079978(n); a(A001651(n)) = 1; a(A008585(n)) = 0;
A000212(n) = Sum_{k=0..n} a(k)*(n-k). (End)
Sum_{k>0} a(k)/k/2^k = log(7)/3. - Jaume Oliver Lafont, Jun 01 2010
The sequence is the principal Dirichlet character of the reduced residue system mod 3 (the other is A102283). Associated Dirichlet L-functions are L(2,chi) = Sum_{n>=1} a(n)/n^2 = 4*Pi^2/27 = A214549, and L(3,chi) = Sum_{n>=1} a(n)/n^3 = 1.157536... = -(psi''(1/3) + psi''(2/3))/54 where psi'' is the tetragamma function. [Jolley eq 309 and arXiv:1008.2547, L(m = 3, r = 1, s)]. - R. J. Mathar, Jul 15 2010
a(n+1), n >= 0, is the sequence of the row sums of the Riordan triangle A158454. - Wolfdieter Lang, Dec 18 2010
Removing the first two elements and keeping the offset at 0, this is a periodic sequence (1, 0, 1, 1, 0, 1, ...). Its INVERTi transform is (1, -1, 2, -2, 2, -2, ...) with period (2,-2). - Gary W. Adamson, Jan 21 2011
Column k = 1 of triangle in A198295. - Philippe Deléham, Jan 31 2012
The set of natural numbers, A000027: (1, 2, 3, ...); is the INVERT transform of the signed periodic sequence (1, 1, 0, -1, -1, 0, 1, 1, 0, ...). - Gary W. Adamson, Apr 28 2013
Any integer sequence s(n) = |s(n-1) - s(n-2)| (equivalently, max(s(n-1), s(n-2)) - min(s(n-1), s(n-2))) for n > i + 1 with s(i) = j and s(i+1) = k, where j and k are not both 0, is or eventually becomes a multiple of this sequence, namely, the sequence repeat gcd(j, k), gcd(j, k), 0 (at some offset). In particular, if j and k are coprime, then s(n) is or eventually becomes this sequence (see, e.g., A110044). - Rick L. Shepherd, Jan 21 2014
For n >= 1, a(n) is also the characteristic function for rational g-adic integers (+n/3)A001651).%20See%20the%20definition%20in%20the%20Mahler%20reference,%20p.%207%20and%20also%20p.%2010.%20-%20_Wolfdieter%20Lang">g and also (-n/3)_g for all integers g >= 2 without a factor 3 (A001651). See the definition in the Mahler reference, p. 7 and also p. 10. - _Wolfdieter Lang, Jul 11 2014
Characteristic function for A007908(n+1) being divisible by 3. a(n) = bit flipped A007908(n+1) (mod 3) = bit flipped A079978(n). - Wolfdieter Lang, Jun 12 2017
Also Jacobi or Kronecker symbol (n/9) (or (n/9^e) for all e >= 1). - Jianing Song, Jul 09 2018
The binomial trans. is 0, 1, 3, 6, 11, 21, 42, 85, 171, 342,.. (see A024495). - R. J. Mathar, Feb 25 2023

Examples

			G.f. = x + x^2 + x^4 + x^5 + x^7 + x^8 + x^10 + x^11 + x^13 + x^14 + x^16 + x^17 + ...
		

References

  • S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967.
  • H. D. Lueke, Korrelationssignale, Springer 1992, pp. 43-48.
  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, p. 408.
  • K. Mahler, p-adic numbers and their functions, 2nd ed., Cambridge University press, 1981.
  • Paulo Ribenboim, The Little Book of Big Primes. Springer-Verlag, NY, 1991, p. 46. [Rick L. Shepherd, Feb 07 2009]

Crossrefs

Partial sums of A057078 give A011655(n+1).
Cf. A035191 (Mobius transform), A001590, A002487, A049347.
Cf. A000027, A000045, A004523 (partial sums), A057078 (first differences).
Cf. A007908, A079978 (bit flipped).
Cf. A011656 - A011751 for other binary m-sequences.
Cf. A002264.

Programs

Formula

G.f.: (x + x^2) / (1 - x^3) = Sum_{k>0} (x^k - x^(3*k)).
G.f.: x / (1 - x / (1 + x / (1 + x / (1 - 2*x / (1 + x))))). - Michael Somos, Apr 02 2012
a(n) = a(n+3) = a(-n), a(3*n) = 0, a(3*n + 1) = a(3*n + 2) = 1 for all n in Z.
a(n) = (1/2)*( (-1)^(floor((2n + 4)/3)) + 1 ). - Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003
a(n) = Fibonacci(n) mod 2. - Paul Barry, Nov 12 2003
a(n) = (2/3)*(1 - cos(2*Pi*n/3)). - Ralf Stephan, Jan 06 2004
a(n) = 1 - a(n-1)*a(n-2), a(n) = n for n < 2. - Reinhard Zumkeller, Feb 28 2004
a(n) = 2*(1 - T(n, -1/2))/3 with Chebyshev's polynomials T(n, x) of the first kind; see A053120. - Wolfdieter Lang, Oct 18 2004
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k*binomial(n-k, k)*A001045(n-2k)/(n-k). - Paul Barry, Oct 31 2004
a(n) = A002487(n) mod 2. - Paul Barry, Jan 14 2005
From Bruce Corrigan (scentman(AT)myfamily.com), Aug 08 2005: (Start)
a(n) = n^2 mod 3.
a(n) = (1/3)*(2 - (r^n + r^(2*n))) where r = (-1 + sqrt(-3))/2. (End)
From Michael Somos, Sep 23 2005: (Start)
Euler transform of length 3 sequence [ 1, -1, 1].
Moebius transform is length 3 sequence [ 1, 0, -1].
Multiplicative with a(3^e) = 0^e, a(p^e) = 1 otherwise. (End)
From Hieronymus Fischer, Jun 27 2007: (Start)
a(n) = (4/3)*(|sin(Pi*(n-2)/3)| + |sin(Pi*(n-1)/3)|)*|sin(Pi*n/3)|.
a(n) = ((n+1) mod 3 + 1) mod 2 = (1 - (-1)^(n - 3*floor((n+1)/3)))/2. (End)
a(n) = 2 - a(n-1) - a(n-2) for n > 1. - Reinhard Zumkeller, Apr 13 2008
a(2*n+1) = a(n+1) XOR a(n), a(2*n) = a(n), a(1) = 1, a(0) = 0. - Reinhard Zumkeller, Dec 27 2008
Sum_{n>=1} a(n)/n^s = (1-1/3^s)*Riemann_zeta(s), s > 1. - R. J. Mathar, Jul 31 2010
a(n) = floor((4*n-5)/3) mod 2. - Gary Detlefs, May 15 2011
a(n) = (a(n-1) - a(n-2))^2 with a(0) = 0, a(1) = 1. - Francesco Daddi, Aug 02 2011
Convolution of A040000 with A049347. - R. J. Mathar, Jul 21 2012
G.f.: Sum_{k>0} x^A001651(k). - L. Edson Jeffery, Dec 05 2012
G.f.: x/(G(0) - x^2) where G(k) = 1 - x/(x + 1/(1 - x/G(k+1))); (recursively defined continued fraction). - Sergei N. Gladkovskii, Feb 15 2013
For the general case: The characteristic function of numbers that are not multiples of m is a(n) = floor((n-1)/m) - floor(n/m) + 1, with m,n > 0. - Boris Putievskiy, May 08 2013
a(n) = sign(n mod 3). - Wesley Ivan Hurt, Jun 22 2013
a(n) = A000035(A000032(n)) = A000035(A000045(n)). - Omar E. Pol, Oct 28 2013
a(n) = (-n mod 3)^((n-1) mod 3). - Wesley Ivan Hurt, Apr 16 2015
a(n) = (2/3) * (1 - sin((Pi/6) * (4*n + 3))) for n >= 0. - Werner Schulte, Jul 20 2017
a(n) = a(n-1) XOR a(n-2) with a(0) = 0, a(1) = 1. - Chunqing Liu, Dec 18 2022
a(n) = floor((n+2)/3) - floor(n/3) = A002264(n+2) - A002264(n). - Aaron J Grech, Jul 30 2024
E.g.f.: 2*(exp(x) - exp(-x/2)*cos(sqrt(3)*x/2))/3. - Stefano Spezia, Mar 30 2025
Dirichlet g.f.: zeta(s)*(1-1/3^s). - R. J. Mathar, Aug 10 2025

Extensions

Better name from Omar E. Pol, Oct 28 2013

A046913 Sum of divisors of n not congruent to 0 mod 3.

Original entry on oeis.org

1, 3, 1, 7, 6, 3, 8, 15, 1, 18, 12, 7, 14, 24, 6, 31, 18, 3, 20, 42, 8, 36, 24, 15, 31, 42, 1, 56, 30, 18, 32, 63, 12, 54, 48, 7, 38, 60, 14, 90, 42, 24, 44, 84, 6, 72, 48, 31, 57, 93, 18, 98, 54, 3, 72, 120, 20, 90, 60, 42, 62, 96, 8, 127, 84, 36, 68, 126
Offset: 1

Views

Author

Keywords

Examples

			Divisors of 12 are 1 2 3 4 6 12 and discarding 3 6 and 12 we get a(12) = 1 + 2 + 4 = 7.
x + 3*x^2 + x^3 + 7*x^4 + 6*x^5 + 3*x^6 + 8*x^7 + 15*x^8 + x^9 + 18*x^10 + ...
		

Crossrefs

Programs

  • Magma
    [SumOfDivisors(3*k)-3*SumOfDivisors(k):k in [1..70]]; // Marius A. Burtea, Jun 01 2019
  • Mathematica
    Table[DivisorSigma[1, 3*w]-3*DivisorSigma[1, w], {w, 1, 256}]
    DivisorSum[#1, # &, Mod[#, 3] != 0 &] & /@ Range[68] (* Jayanta Basu, Jun 30 2013 *)
    f[p_, e_] := If[p == 3, 1, (p^(e+1)-1)/(p-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 17 2020 *)
  • PARI
    {a(n) = if( n<1, 0, sigma(3*n) - 3 * sigma(n))} /* Michael Somos, Jul 19 2004 */
    
  • PARI
    a(n) = sigma(n \ 3^valuation(n, 3)) \\ David A. Corneth, Jun 01 2019
    

Formula

Multiplicative with a(3^e) = 1, a(p^e) = (p^(e+1)-1)/(p-1) for p<>3. - Vladeta Jovovic, Sep 11 2002
G.f.: Sum_{k>0} x^k*(1+2*x^k+2*x^(3*k)+x^(4*k))/(1-x^(3*k))^2. - Vladeta Jovovic, Dec 18 2002
a(n) = A000203(3n)-3*A000203(n). - Labos Elemer, Aug 14 2003
Inverse Mobius transform of A091684. - Gary W. Adamson, Jul 03 2008
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-1/3^(s-1)). - R. J. Mathar, Feb 10 2011
G.f. A(x) satisfies: 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w)= u^2 + 9 * v^2 + 16 * w^2 - 6 * u*v + 4 * u*w - 24 * v*w - v + w. - Michael Somos, Jul 19 2004
L.g.f.: log(Product_{k>=1} (1 - x^(3*k))/(1 - x^k)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Mar 14 2018
a(n) = A002324(n) + 3*Sum_{j=1, n-1} A002324(j)*A002324(n-j). See Farkas and Guerzhoy links. - Michel Marcus, Jun 01 2019
a(3*n) = a(n). - David A. Corneth, Jun 01 2019
Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / 18. - Vaclav Kotesovec, Sep 17 2020

A001817 G.f.: Sum_{n>0} x^n/(1-x^(3n)) = Sum_{n>=0} x^(3n+1)/(1-x^(3n+1)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) is the number of positive divisors of n of the form 3k+1. If r(n) denotes the number of representations of n by the quadratic form j^2+ij+i^2, then r(n)= 6 *(a(n)-A001822(n)). - Benoit Cloitre, Jun 24 2002

Examples

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

References

  • Bruce C. Berndt, On a certain theta-function in a letter of Ramanujan from Fitzroy House, Ganita 43 (1992), 33-43.

Crossrefs

Programs

  • Haskell
    a001817 n = length [d | d <- [1,4..n], mod n d == 0]
    -- Reinhard Zumkeller, Nov 26 2011
  • Maple
    A001817 := proc(n)
        local a,d ;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if modp(d,3) = 1 then
                a := a+1 ;
            end if ;
        end do:
        a ;
    end proc:
    seq(A001817(n),n=1..100) ; # R. J. Mathar, Sep 25 2017
  • Mathematica
    a[n_] := DivisorSum[n, Boole[Mod[#, 3] == 1]&]; Array[a, 100] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    a(n)=if(n<1,0,sumdiv(n,d,d%3==1))
    

Formula

Moebius transform is period 3 sequence [1, 0, 0, ...]. - Michael Somos, Sep 20 2005
G.f.: Sum_{k>0} x^(3k-2)/(1-x^(3k-2)) = Sum_{k>0} x^k/(1-x^(3k)). - Michael Somos, Sep 20 2005
Equals A051731 * [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, ...]. - Gary W. Adamson, Nov 06 2007
a(n) = (A035191(n) + A002324(n)) / 2. - Reinhard Zumkeller, Nov 26 2011
Sum_{k=1..n} a(k) = n*log(n)/3 + c*n + O(n^(1/3)*log(n)), where c = gamma(1,3) - (1 - gamma)/3 = A256425 - (1 - A001620)/3 = 0.536879... (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023

A001822 Expansion of Sum_{n>=0} x^(3n+2)/(1-x^(3n+2)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(n) is the number of positive divisors of n of the form 3k+2. If r(n) denotes the number of representations of n by the quadratic form j^2+i*j+i^2, then r(n)= 6 *(A001817(n)-a(n)). - Benoit Cloitre, Jun 24 2002

References

  • Bruce C. Berndt,"On a certain theta-function in a letter of Ramanujan from Fitzroy House", Ganita 43 (1992),33-43.

Crossrefs

Programs

  • Haskell
    a001822 n = length [d | d <- [2,5..n], mod n d == 0]
    -- Reinhard Zumkeller, Nov 26 2011
  • Maple
    A001822 := proc(n)
        local a,d ;
        a := 0 ;
        for d in numtheory[divisors](n) do
            if modp(d,3) = 2 then
                a := a+1 ;
            end if ;
        end do:
        a ;
    end proc:
    seq(A001822(n),n=1..100) ; # R. J. Mathar, Sep 25 2017
  • Mathematica
    a[n_] := DivisorSum[n, Boole[Mod[#, 3] == 2]&]; Array[a, 100] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, d%3==2))
    

Formula

Moebius transform is period 3 sequence [0, 1, 0, ...]. - Michael Somos, Sep 20 2005
G.f.: Sum_{k>0} x^(3k-1)/(1-x^(3k-1)) = Sum_{k>0} x^(2k)/(1-x^(3k)). - Michael Somos, Sep 20 2005
a(n) = (A035191(n) - A002324(n)) / 2. - Reinhard Zumkeller, Nov 26 2011
a(n) + A001817(n) + A000005(n/3) = A000005(n), where A000005(.)=0 if the argument is not an integer. - R. J. Mathar, Sep 25 2017
Sum_{k=1..n} a(k) = n*log(n)/3 + c*n + O(n^(1/3)*log(n)), where c = gamma(2,3) - (1 - gamma)/3 = A256843 - (1 - A001620)/3 = -0.0677207... (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023

A078708 Sum of divisors d of n such that n/d is not congruent to 0 mod 3.

Original entry on oeis.org

1, 3, 3, 7, 6, 9, 8, 15, 9, 18, 12, 21, 14, 24, 18, 31, 18, 27, 20, 42, 24, 36, 24, 45, 31, 42, 27, 56, 30, 54, 32, 63, 36, 54, 48, 63, 38, 60, 42, 90, 42, 72, 44, 84, 54, 72, 48, 93, 57, 93, 54, 98, 54, 81, 72, 120, 60, 90, 60, 126, 62, 96, 72, 127, 84, 108, 68, 126, 72, 144
Offset: 1

Views

Author

Vladeta Jovovic, Dec 18 2002

Keywords

Crossrefs

Cf. A002131 (k=2), this sequence (k=3), A285895 (k=4), A285896 (k=5).

Programs

  • Mathematica
    f[p_, e_] := If[p == 3, 3^e, (p^(e+1)-1)/(p-1)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 30 2022 *)
  • PARI
    for(n=1,70,d=divisors(n); s=0; for(j=1,matsize(d)[2],if((n/d[j])%3>0,s=s+d[j])); print1(s,","))
    
  • PARI
    a(n)=sumdiv(n,d,if((n/d)%3,1,0)*d)

Formula

G.f.: Sum_{k>0} x^k*(1+x^k)^2*(1+x^(2*k))/(1-x^(3*k))^2.
a(n) = (A000203(3*n)-A000203(n))/3. - Vladeta Jovovic, Dec 22 2003
G.f.: Sum_{k>=1} k*x^k*(1 + x^k)/(1 - x^(3*k)). - Ilya Gutkovskiy, Sep 13 2019
From R. J. Mathar, May 25 2020: (Start)
a(n) = A326399(n) + A326400(n).
a(n) = A000203(n) - A000203(n/3), where A000203(.) = 0 for non-integer arguments. (End)
From Amiram Eldar, Oct 30 2022: (Start)
Multiplicative with a(3^e) = 3^e and a(p^e) = (p^(e+1)-1)/(p-1) if p != 3.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 2*Pi^2/27 = 0.731081... (A346933). (End)
Dirichlet g.f.: zeta(s)*zeta(s-1)*(1-1/3^s). - Amiram Eldar, Dec 30 2022

Extensions

Extended by Klaus Brockhaus and Benoit Cloitre, Dec 20 2002

A035218 Coefficients in expansion of Dirichlet series Product_p (1-(Kronecker(m,p)+1)*p^(-s)+Kronecker(m,p)*p^(-2s))^(-1) for m = 36.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 1, 3, 2, 1, 2, 2, 2, 2, 1, 2, 2, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 3, 2, 2, 2, 1, 4, 2, 2, 2, 2, 2, 2, 2, 2, 1, 4, 2, 2, 2, 2, 4, 2, 1, 2, 2, 3, 2, 4, 2, 2, 2, 1, 2, 2, 2, 4, 2, 2, 2, 2, 2, 4, 2, 2, 2, 4, 1, 2, 3, 2, 3, 2, 2, 2, 2, 4
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of factors (over Q) of the polynomial x^(2n) - x^n + 1. - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 30 2003
This sequence is multiplicative. Just as (A001227)(n) is the number of ways to write n as differences of 3-gonal numbers, this sequence is the number of ways to write n as difference of (-1)-gonal numbers. If p_e(n):=1/2*n*((e-2)*n+(4-e)) is the n-th e-gonal number, then 2*a(n) = |{(m,k) of Z X Z; pe(-1)(m+k)-pe(m-1)=n}| for e=-1. - Volker Schmitt (clamsi(AT)gmx.net), Oct 11 2004
a(n) is the number of divisors of n not divisible by 2 or 3. For example, a(36)=1 because 1 is the only such divisor of 36. a(10) = 2 because we count the divisors 1 and 5. - Geoffrey Critzer, Feb 15 2015

Crossrefs

Programs

  • Maple
    res:=1; ifac:=op(ifactors(i))[2]; for pfac in ifac do; if pfac[1]>3 then res:=res*(pfac[2]+1); a(n):=res;
  • Mathematica
    nn = 81; f[list_, i] := list[[i]]; a = Prepend[Drop[Table[Boole[Min[FactorInteger[n][[All, 1]]] > 3], {n, 1, nn}], 1], 1]; b = Table[1, {nn}]; Table[DirichletConvolve[f[a, n], f[b, n], n, m], {m, 1, nn}] (* Geoffrey Critzer, Feb 15 2015 *)
    f[p_, e_] := If[p >= 5, e + 1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 27 2023 *)
  • PARI
    m=36; direuler(p=2,101,1/(1-(kronecker(m,p)*(X-X^2))-X))
    
  • PARI
    a(n) = sumdiv(n, d, (d % 2) && (d % 3)); \\ Michel Marcus, Feb 16 2015

Formula

a(n) = d(6n) - d(3n) - d(2n) + d(n) where d() is the divisor function. - Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 30 2003
Multiplicative with a(2^e)=1, a(3^e)=1, a(p^e)=e+1 if p>3. Inverse Möbius transform is periodic with 1, 0, 0, 0, 1, 0. - Volker Schmitt (clamsi(AT)gmx.net), Oct 11 2004
Dirichlet g.f.: zeta(s)^2*(1 - 1/2^s)*(1 - 1/3^s). - Geoffrey Critzer, Feb 15 2015
From Antti Karttunen, Oct 03 2018: (Start)
a(n) = A279060(n) + A319995(n).
a(n) = A320015(n) + ch15(n), where ch15 is the characteristic function of numbers of the form +-1 mod 6, i.e., ch15(n) = A232991(n-1).
(End)
Sum_{k=1..n} a(k) ~ n*(log(n) + 2*gamma + log(12)/2 - 1)/3, where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jan 29 2019

Extensions

More terms from Antti Karttunen, Oct 03 2018

A035207 Coefficients in expansion of Dirichlet series Product_p (1 - (Kronecker(m,p) + 1)*p^(-s) + Kronecker(m,p)*p^(-2s))^(-1) for m = 25.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of divisors of n not congruent to 0 mod 5.

Crossrefs

Cf. A116073 (sum of divisors of n not congruent to 0 mod 5).

Programs

  • Magma
    [NumberOfDivisors(n)/Valuation(5*n, 5): n in [1..100]]; // Vincenzo Librandi, Jun 03 2019
  • Maple
    for n from 1 to 500 do a := ifactors(n):s := 1:for k from 1 to nops(a[2]) do p := a[2][k][1]:e := a[2][k][2]: if p=5 then b := 1:else b := e+1:fi:s := s*b:od:printf(`%d,`,s); od:
  • Mathematica
    Table[Count[Divisors[n],?(!Divisible[#,5]&)],{n,110}] (* _Harvey P. Dale, Apr 08 2015 *)
    f[5, e_] := 1; f[p_, e_] := e+1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 26 2020 *)
  • PARI
    {a(n)=if(n<1, 0, sumdiv(n, d, d%5>0))} /* Michael Somos, Oct 31 2006 */
    
  • PARI
    {a(n)=if(n<1, 0, direuler(p=2, n, 1/(1-X)/if(p==5, 1, 1-X))[n])} /* Michael Somos, Oct 31 2006 */
    

Formula

Multiplicative with a(5^e)=1 and a(p^e)=e+1 for p<>5.
Moebius transform is period 5 sequence A011558. - Michael Somos, Oct 31 2006
G.f.: Sum_{k>=1} x^k*(1 + x^k + x^(2*k) + x^(3*k))/(1 - x^(5*k)). - Ilya Gutkovskiy, Sep 11 2019
a(n) = tau(5*n) - tau(n). - Ridouane Oudra, Sep 05 2020
From Amiram Eldar, Nov 27 2022: (Start)
Dirichlet g.f.: zeta(s)^2 * (1 - 1/5^s).
Sum_{k=1..n} a(k) ~ (4*n*log(n) + (8*gamma + log(5) - 4)*n)/5, where gamma is Euler's constant (A001620). (End)

Extensions

Additional comments from Vladeta Jovovic, Oct 26 2001

A054584 Number of subgroups of the group generated by a^n=1, b^3=1 and ab=ba.

Original entry on oeis.org

2, 4, 6, 6, 4, 12, 4, 8, 10, 8, 4, 18, 4, 8, 12, 10, 4, 20, 4, 12, 12, 8, 4, 24, 6, 8, 14, 12, 4, 24, 4, 12, 12, 8, 8, 30, 4, 8, 12, 16, 4, 24, 4, 12, 20, 8, 4, 30, 6, 12, 12, 12, 4, 28, 8, 16, 12, 8, 4, 36, 4, 8, 20, 14, 8, 24, 4, 12, 12, 16, 4, 40, 4, 8, 18, 12, 8, 24, 4, 20, 18, 8, 4
Offset: 1

Views

Author

John W. Layman, Apr 12 2000

Keywords

Comments

Also the number of subgroups of the group C_n X C_3 (where C_n is the cyclic group of order n). Number of subgroups of the group C_n X C_m is Sum_{i|n,j|m} gcd(i,j).

Crossrefs

Programs

  • Haskell
    a054584 n = a000005 n + 3 * a079978 n * a000005 (a051176 n) + a035191 n
    -- Reinhard Zumkeller, Aug 27 2012
  • Maple
    for n from 1 to 500 do a := ifactors(n):s := 1:for k from 1 to nops(a[2]) do p := a[2][k][1]:e := a[2][k][2]: if p=3 then b := 2*e+1:else b := e+1:fi:s := s*b:od:printf(`%d,`,2*s); od:
  • Mathematica
    f[d_ /; Mod[d, 3] == 0] = 4; f[] = 2; a[n] := Total[f /@ Divisors[n]]; Table[a[n], {n, 1, 100}](* Jean-François Alcover, Nov 21 2011, after Michael Somos *)
    f[p_, e_] := e + 1; f[3, e_] := 2*e + 1; a[1] = 2; a[n_] := 2*Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 29 2022 *)
  • PARI
    a(n)=if(n<1, 0, sumdiv(n,d, (d%3==0)*2+2)) /* Michael Somos, Sep 20 2005 */
    

Formula

a(n) = tau(n)+3*tau(n/3)+A035191(n) if n is congruent to 0 mod 3 else tau(n)+A035191(n), where A035191(n) is the number of divisors of n that are not congruent to 0 mod 3.
a(n)/2 is multiplicative with a(3^e)=2e+1 and a(p^e)=e+1 for p<>3.
Moebius transform is period 3 sequence [2, 2, 4, ...]. - Michael Somos, Sep 20 2005
G.f.: Sum_{k>0} x^k(2+2*x^k+4*x^(2k))/(1-x^(3k)).
From Amiram Eldar, Nov 29 2022: (Start)
Dirichlet g.f.: 2 * zeta(s)^2 * (1 + 1/3^s).
Sum_{k=1..n} a(k) ~ 2*(4*n*log(n) + (8*gamma - 4 - log(3))*n)/3, where gamma is Euler's constant (A001620). (End)

Extensions

Additional comments from Vladeta Jovovic, Oct 25 2001

A099751 Number of ways to write n as differences of (-4)-gonal numbers. If pe(n):=1/2*n*((e-2)*n+(4-e)) is the n-th e-gonal number, then a(n) = |{(m,k) of Z X Z; pe(-1)(m+k)-pe(m-1)=n}| for e=-4.

Original entry on oeis.org

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

Views

Author

Volker Schmitt (clamsi(AT)gmx.net), Nov 10 2004

Keywords

Examples

			G.f. = x + x^3 + x^4 + 2*x^5 + 2*x^7 + 2*x^8 + x^9 + 2*x^11 + x^12 + 2*x^13 + ...
a(5)=2 because there are two ways of differences: First pe(3)-pe(-2)=(-15)-(-20)=5 and second pe(1)-pe(2)=(1)-(-4)=5, for e=-4.
		

Crossrefs

Cf. A001227 for e in {3, -2, 6}, A048272 for e in {0, 1, 4, 8} and A035218 for e=-1.

Programs

  • Haskell
    a099751 n = product $ zipWith f (a027748_row n) (a124010_row n)
       where f 2 e = e - 1; f 3 e = 1; f _ e = e + 1
    -- Reinhard Zumkeller, Mar 20 2015
  • Maple
    res:=1; ifac:=op(ifactors(i))[2]; for pfac in ifac do; if pfac[1]=2 then res:=res*(pfac[2]-1); else if pfac[1]<>3 then res:=res*(pfac[2]+1); fi; fi; od; a(i):=res;
  • Mathematica
    a[ n_] := If[ n < 1, 0, If[ Divisible[n, 4], -1, 1] Sum[ KroneckerSymbol[ -3, d] (-1)^Quotient[ d, 3], {d, Divisors@n}]]; (* Michael Somos, Mar 19 2015 *)
  • PARI
    {a(n) = if( n<1, 0, if( n%2==0, (valuation(n, 2) -1) * a(n / 2^valuation(n, 2)), if( n%3==0, a(n / 3^valuation(n, 3)), numdiv(n)))) }; /* Michael Somos, Sep 20 2005 */
    
  • PARI
    {a(n) = if( n<1, 0, (-1)^(n%4 == 0) * sumdiv( n, d, (-1)^(d\3) * kronecker( -3, d)))}; /* Michael Somos, Nov 16 2011 */
    

Formula

Multiplicative with a(2^e) = e-1 if e>0, a(3^e) = 1, a(p^e) = e+1 if p>3.
Moebius transform is period 12 sequence [ 1, -1, 0, 1, 1, 0, 1, 1, 0, -1, 1, 0, ...].
G.f.: Sum_{k>0} (x^k - x^(2*k) + x^(4*k) + x^(5*k) + x^(7*k) + x^(8*k) - x^(10*k) + x^(11*k)) / (1 - x^(12*k)). - Michael Somos, Sep 20 2005
a(3*n) = a(n). a(4*n + 2) = 0. - Michael Somos, Nov 16 2011
a(4*n) = A035191(n). - Michael Somos, Mar 19 2015
From Amiram Eldar, Nov 30 2022: (Start)
Dirichlet g.f.: zeta(s)^2*(1 + 2^(1-2*s) - 2^(1-s))*(1 - 1/3^s).
Sum_{k=1..n} a(k) ~ n*log(n)/3 + (2*gamma - 1 + log(3)/2)*n/3, where gamma is Euler's constant (A001620). (End)

A326394 Expansion of Sum_{k>=1} x^k * (1 + x^(2*k)) / (1 - x^(3*k)).

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Sep 11 2019

Keywords

Comments

Number of divisors of n that are not of the form 3*k + 2.

Crossrefs

Programs

  • Mathematica
    nmax = 90; CoefficientList[Series[Sum[x^k (1 + x^(2 k))/(1 - x^(3 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    Table[DivisorSum[n, 1 &, !MemberQ[{2}, Mod[#, 3]] &], {n, 1, 90}]
  • PARI
    a(n) = {numdiv(n) - sumdiv(n, d, d%3==2)} \\ Andrew Howroyd, Sep 11 2019

Formula

a(n) = A000005(n) - A001822(n).
Sum_{k=1..n} a(k) ~ 2*n*log(n)/3 + c*n, where c = (5*gamma-2)/3 - gamma(2,3) = (5*A001620-2)/3 - A256843 = 0.222152... . - Amiram Eldar, Jan 14 2024
Showing 1-10 of 13 results. Next