%I #18 Nov 25 2023 08:03:37
%S 0,1,1,1,1,1,1,2,1,1,1,2,1,2,1,2,1,1,1,3,2,1,1,2,1,2,1,3,1,2,1,3,1,1,
%T 2,2,1,2,2,3,1,2,1,3,1,1,1,3,2,3,1,3,1,1,1,4,2,1,1,3,1,2,2,3,2,2,1,3,
%U 1,3,1,2,1,2,2,3,2,2,1,5,1,1,1,4,1,2,1,3,1,2,3,3,2,1,2,3,1,3,1,4,1,2,1,4,2
%N Number of proper divisors of n of the form 3k+1.
%H Antti Karttunen, <a href="/A293895/b293895.txt">Table of n, a(n) for n = 1..20000</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 a(n) = A001817(n) - [n == 1 (mod 3)].
%F G.f.: Sum_{k>=1} x^(6*k-4) / (1 - x^(3*k-2)). - _Ilya Gutkovskiy_, Apr 14 2021
%F Sum_{k=1..n} a(k) = n*log(n)/3 + c*n + O(n^(1/3)*log(n)), where c = gamma(1,3) - (2 - gamma)/3 = A256425 - (2 - A001620)/3 = 0.203545... (Smith and Subbarao, 1981). - _Amiram Eldar_, Nov 25 2023
%t Table[DivisorSum[n, 1 &, And[Mod[#, 3] == 1, # != n] &], {n, 105}] (* _Michael De Vlieger_, Nov 08 2017 *)
%o (PARI) A293895(n) = sumdiv(n,d,(d<n)*(1==(d%3)));
%Y Cf. A001620, A001817, A256425, A293451, A293896, A293897, A293899.
%K nonn,easy
%O 1,8
%A _Antti Karttunen_, Nov 06 2017