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.

A331596 Number of distinct prime factors of gcd(A122111(n), A241909(n)).

This page as a plain text file.
%I A331596 #13 Jul 27 2024 23:17:04
%S A331596 0,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,1,1,1,1,2,1,1,2,1,
%T A331596 2,1,1,1,2,1,1,2,1,1,2,1,1,1,1,2,2,1,1,1,2,1,2,1,1,1,1,1,2,1,2,2,1,1,
%U A331596 2,2,1,1,1,1,2,1,2,2,1,1,1,1,1,1,2,1,2,1,1,1,2,1,2,1,2,1,1,2,2,1,1,2,1,1,3
%N A331596 Number of distinct prime factors of gcd(A122111(n), A241909(n)).
%H A331596 Antti Karttunen, <a href="/A331596/b331596.txt">Table of n, a(n) for n = 1..65537</a>
%H A331596 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A331596 a(n) = A001221(A331596(n)) = A001221(gcd(A122111(n), A241909(n))).
%F A331596 a(n) = A001222(A331597(n)).
%t A331596 Array[PrimeNu@ If[# == 1, 1, GCD @@ {Block[{k = #, m = 0}, Times @@ Power @@@ Table[k -= m; k = DeleteCases[k, 0]; {Prime@ Length@ k, m = Min@ k}, Length@ Union@ k]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ #], Function[t, Times @@ Prime@ Accumulate[If[Length@ t < 2, {0}, Join[{1}, ConstantArray[0, Length@ t - 2], {-1}]] + ReplacePart[t, Map[#1 -> #2 & @@ # &, #]]]]@ ConstantArray[0, Transpose[#][[1, -1]]] &[# /. {p_, e_} /; p > 0 :> {PrimePi@ p, e}]} &@ FactorInteger[#]] &, 105] (* _Michael De Vlieger_, Jan 24 2020, after _JungHwan Min_ at A122111. *)
%o A331596 (PARI) A331596(n) = omega(gcd(A122111(n), A241909(n)));
%Y A331596 Cf. A001221, A331596, A331597.
%K A331596 nonn
%O A331596 1,15
%A A331596 _Antti Karttunen_, Jan 22 2020