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.

A005088 Number of primes = 1 mod 3 dividing n.

This page as a plain text file.
%I A005088 #33 Sep 22 2021 13:15:03
%S A005088 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 A005088 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 A005088 0,1,0,0,1,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,0,0,2
%N A005088 Number of primes = 1 mod 3 dividing n.
%C A005088 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 A005088 Antti Karttunen, <a href="/A005088/b005088.txt">Table of n, a(n) for n = 1..10000</a>
%H A005088 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 A005088 Additive with a(p^e) = 1 if p = 1 (mod 3), 0 otherwise.
%F A005088 From _Antti Karttunen_, Jul 10 2017: (Start)
%F A005088 a(1) = 0; for n > 1, ((A020639(n) mod 3) mod 2) + a(A028234(n)).
%F A005088 a(n) = A001221(n) - A005090(n) - A079978(n).
%F A005088 (End)
%p A005088 A005088 := proc(n)
%p A005088     local a,pe;
%p A005088     a := 0 ;
%p A005088     for pe in ifactors(n)[2] do
%p A005088         if modp(op(1,pe),3)= 1 then
%p A005088             a := a+1 ;
%p A005088         end if;
%p A005088     end do:
%p A005088     a ;
%p A005088 end proc: # _R. J. Mathar_, May 19 2020
%t A005088 Join[{0},Table[Count[Transpose[FactorInteger[n]][[1]],_?(Mod[#-1,3] == 0&)],{n,2,100}]] (* _Harvey P. Dale_, Sep 22 2021 *)
%t A005088 Array[DivisorSum[#, 1 &, And[PrimeQ@ #, Mod[#, 3] == 1] &] &, 91] (* _Michael De Vlieger_, Jul 11 2017 *)
%o A005088 (PARI) a(n)=my(f=factor(n)[,1]); sum(i=1,#f,f[i]%3==1) \\ _Charles R Greathouse IV_, Jan 16 2017
%o A005088 (Scheme) (define (A005088 n) (if (= 1 n) 0 (+ (modulo (modulo (A020639 n) 3) 2) (A005088 (A028234 n))))) ;; _Antti Karttunen_, Jul 10 2017
%Y A005088 Cf. A001221, A005070, A005090, A020639, A028234, A079978.
%Y A005088 Cf. A121940 (first number having n such factors).
%K A005088 nonn
%O A005088 1,91
%A A005088 _N. J. A. Sloane_