Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #28 Nov 25 2023 04:27:30
%S 0,1,1,1,1,1,1,1,2,1,1,1,1,1,1,2,2,1,1,1,1,1,2,1,2,1,1,1,1,2,2,1,2,1,
%T 1,1,2,1,1,1,2,1,1,2,2,2,1,1,2,1,2,1,1,1,1,1,2,2,2,1,2,1,1,1,3,1,2,1,
%U 1,1,1,2,3,1,1,2,1,1,2,1,2,1,1,1,1,2,2,2,3,1,2,1,2,1,1,1,2,1,1,2
%N Number of divisors of n of the form 7*k + 1.
%C Möebius transform is a period-7 sequence {1, 0, 0, 0, 0, 0, 0, ...}.
%H Robert Israel, <a href="/A279061/b279061.txt">Table of n, a(n) for n = 0..10000</a>
%H R. A. Smith and M. V. Subbarao, <a href="https://doi.org/10.4153/CMB-1981-005-3">The average number of divisors in an arithmetic progression</a>, Canadian Mathematical Bulletin, Vol. 24, No. 1 (1981), pp. 37-41.
%F G.f.: Sum_{k>=1} x^k/(1 - x^(7*k)).
%F G.f.: Sum_{k>=0} x^(7*k+1)/(1 - x^(7*k+1)).
%F Sum_{k=1..n} a(k) = n*log(n)/7 + c*n + O(n^(1/3)*log(n)), where c = gamma(1,7) - (1 - gamma)/7 = 0.713612..., gamma(1,7) = -(psi(1/7) + log(7))/7 is a generalized Euler constant, and gamma is Euler's constant (A001620) (Smith and Subbarao, 1981). - _Amiram Eldar_, Nov 25 2023
%e a(8) = 2 because 8 has 4 divisors {1,2,4,8} among which 2 divisors {1,8} are of the form 7*k + 1.
%p N:= 200: # to get a(0)..a(N)
%p V:= Vector(N):
%p for k from 1 to N do
%p R:= [seq(i,i=k..N,7*k)];
%p V[R]:= map(`+`,V[R],1);
%p od:
%p 0,seq(V[i],i=1..N); # _Robert Israel_, Dec 05 2016
%t nmax = 120; CoefficientList[Series[Sum[x^k/(1 - x^(7 k)), {k, 1, nmax}], {x, 0, nmax}], x]
%t nmax = 120; CoefficientList[Series[Sum[x^(7 k + 1)/(1 - x^(7 k + 1)), {k, 0, nmax}], {x, 0, nmax}], x]
%t Table[Count[Divisors[n],_?(IntegerQ[(#-1)/7]&)],{n,0,100}] (* _Harvey P. Dale_, Nov 08 2022 *)
%o (PARI) concat([0], Vec(sum(k=1, 100, x^k / (1 - x^(7*k))) + O(x^101))) \\ _Indranil Ghosh_, Mar 29 2017
%Y Cf. A001227, A001817, A001826, A001876, A188169.
%Y Cf. A001620, A016630, A354627 (psi(1/7)).
%K nonn,easy
%O 0,9
%A _Ilya Gutkovskiy_, Dec 05 2016