%I #33 Sep 22 2021 13:15:03
%S 0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,1,0,0,0,
%T 1,0,1,1,1,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,0,1,1,1,0,1,0,1,0,
%U 0,1,0,0,1,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,0,0,2
%N Number of primes = 1 mod 3 dividing n.
%C The first instance of a(n)=2 is for n=91; the first instance of a(n)=3 is for n=1729. 1729 is famously Ramanujan's taxi cab number -- see A001235. - _Harvey P. Dale_, Jun 25 2013
%H Antti Karttunen, <a href="/A005088/b005088.txt">Table of n, a(n) for n = 1..10000</a>
%H S. R. Finch and Pascal Sebah, <a href="http://arXiv.org/abs/math.NT/0604465">Squares and Cubes Modulo n</a>, arXiv:math/0604465 [math.NT], 2006-2016.
%F Additive with a(p^e) = 1 if p = 1 (mod 3), 0 otherwise.
%F From _Antti Karttunen_, Jul 10 2017: (Start)
%F a(1) = 0; for n > 1, ((A020639(n) mod 3) mod 2) + a(A028234(n)).
%F a(n) = A001221(n) - A005090(n) - A079978(n).
%F (End)
%p A005088 := proc(n)
%p local a,pe;
%p a := 0 ;
%p for pe in ifactors(n)[2] do
%p if modp(op(1,pe),3)= 1 then
%p a := a+1 ;
%p end if;
%p end do:
%p a ;
%p end proc: # _R. J. Mathar_, May 19 2020
%t Join[{0},Table[Count[Transpose[FactorInteger[n]][[1]],_?(Mod[#-1,3] == 0&)],{n,2,100}]] (* _Harvey P. Dale_, Sep 22 2021 *)
%t Array[DivisorSum[#, 1 &, And[PrimeQ@ #, Mod[#, 3] == 1] &] &, 91] (* _Michael De Vlieger_, Jul 11 2017 *)
%o (PARI) a(n)=my(f=factor(n)[,1]); sum(i=1,#f,f[i]%3==1) \\ _Charles R Greathouse IV_, Jan 16 2017
%o (Scheme) (define (A005088 n) (if (= 1 n) 0 (+ (modulo (modulo (A020639 n) 3) 2) (A005088 (A028234 n))))) ;; _Antti Karttunen_, Jul 10 2017
%Y Cf. A001221, A005070, A005090, A020639, A028234, A079978.
%Y Cf. A121940 (first number having n such factors).
%K nonn
%O 1,91
%A _N. J. A. Sloane_