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.

A329903 a(n) = A156552(n) mod 3.

This page as a plain text file.
%I A329903 #8 Jan 10 2020 12:36:01
%S A329903 0,1,2,0,1,2,2,1,0,0,1,2,2,2,1,0,1,1,2,1,0,0,1,2,0,2,2,2,2,0,1,1,1,0,
%T A329903 2,0,2,2,0,0,1,1,2,1,1,0,1,2,0,1,1,2,2,2,0,2,0,2,1,1,2,0,2,0,2,0,1,1,
%U A329903 1,2,2,1,1,2,2,2,1,1,2,1,0,0,1,0,0,2,0,0,2,0,0,1,1,0,2,2,1,1,1,0,2,0,1,2,0
%N A329903 a(n) = A156552(n) mod 3.
%H A329903 Antti Karttunen, <a href="/A329903/b329903.txt">Table of n, a(n) for n = 1..65537</a>
%H A329903 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A329903 a(n) = A010872(A156552(n)) = A156552(n) mod 3.
%t A329903 Array[Mod[#, 3] &@ Floor@ Total@ Flatten@ MapIndexed[#1 2^(#2 - 1) &, Flatten[Table[2^(PrimePi@ #1 - 1), {#2}] & @@@ FactorInteger@ #]] &, 105] (* _Michael De Vlieger_, Dec 27 2019 *)
%o A329903 (PARI)
%o A329903 A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
%o A329903 A329903(n) = (A156552(n)%3);
%Y A329903 Cf. A010872, A156552.
%Y A329903 Cf. A329609 (gives positions of zeros).
%K A329903 nonn
%O A329903 1,3
%A A329903 _Antti Karttunen_, Dec 08 2019