A005088 Number of primes = 1 mod 3 dividing n.
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, 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, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 2
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000
- S. R. Finch and Pascal Sebah, Squares and Cubes Modulo n, arXiv:math/0604465 [math.NT], 2006-2016.
Crossrefs
Programs
-
Maple
A005088 := proc(n) local a,pe; a := 0 ; for pe in ifactors(n)[2] do if modp(op(1,pe),3)= 1 then a := a+1 ; end if; end do: a ; end proc: # R. J. Mathar, May 19 2020
-
Mathematica
Join[{0},Table[Count[Transpose[FactorInteger[n]][[1]],?(Mod[#-1,3] == 0&)],{n,2,100}]] (* _Harvey P. Dale, Sep 22 2021 *) Array[DivisorSum[#, 1 &, And[PrimeQ@ #, Mod[#, 3] == 1] &] &, 91] (* Michael De Vlieger, Jul 11 2017 *)
-
PARI
a(n)=my(f=factor(n)[,1]); sum(i=1,#f,f[i]%3==1) \\ Charles R Greathouse IV, Jan 16 2017
-
Scheme
(define (A005088 n) (if (= 1 n) 0 (+ (modulo (modulo (A020639 n) 3) 2) (A005088 (A028234 n))))) ;; Antti Karttunen, Jul 10 2017
Comments