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.

A279060 Number of divisors of n of the form 6*k + 1.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Dec 05 2016

Keywords

Comments

Möbius transform is the period-6 sequence {1, 0, 0, 0, 0, 0, ...}.

Examples

			a(14) = 2 because 14 has 4 divisors {1,2,7,14} among which 2 divisors {1,7} are of the form 6*k + 1.
		

Crossrefs

Programs

  • Mathematica
    nmax = 120; CoefficientList[Series[Sum[x^k/(1 - x^(6 k)), {k, 1, nmax}], {x, 0, nmax}], x]
    nmax = 120; CoefficientList[Series[Sum[x^(6 k + 1)/(1 - x^(6 k + 1)), {k, 0, nmax}], {x, 0, nmax}], x]
    Table[Count[Divisors[n],?(Mod[#,6]==1&)],{n,0,120}] (* _Harvey P. Dale, Apr 27 2018 *)
  • PARI
    A279060(n) = if(!n,n,sumdiv(n, d, (1==(d%6)))); \\ Antti Karttunen, Jul 09 2017
    
  • Python
    from sympy import divisors
    def A279060(n): return sum(d%6 == 1 for d in divisors(n)) # David Radcliffe, Jun 19 2025

Formula

G.f.: Sum_{k>=1} x^k/(1 - x^(6*k)).
G.f.: Sum_{k>=0} x^(6*k+1)/(1 - x^(6*k+1)).
From Antti Karttunen, Oct 03 2018: (Start)
a(n) = A320001(n) + [1 == n (mod 6)], where [ ] is the Iverson bracket, giving 1 only when n = 1 mod 6, and 0 otherwise.
a(n) = A035218(n) - A319995(n). (End)
a(n) = (A035218(n) + A035178(n)) / 2. - David Radcliffe, Jun 19 2025
Sum_{k=1..n} a(k) = n*log(n)/6 + c*n + O(n^(1/3)*log(n)), where c = gamma(1,6) - (1 - gamma)/6 = 0.686263..., gamma(1,6) = -(psi(1/6) + log(6))/6 is a generalized Euler constant, and gamma is Euler's constant (A001620) (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023