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.

A331730 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A331595(n) for all other n, except for odd primes p, f(p) = 0.

This page as a plain text file.
%I A331730 #7 Jan 25 2020 20:53:34
%S A331730 1,2,3,4,3,4,3,5,4,4,3,5,3,4,6,7,3,8,3,5,6,4,3,7,4,4,5,5,3,8,3,9,6,4,
%T A331730 6,7,3,4,6,7,3,8,3,5,10,4,3,9,4,11,6,5,3,7,12,7,6,4,3,7,3,4,10,13,12,
%U A331730 8,3,5,6,11,3,9,3,4,8,5,6,8,3,9,7,4,3,7,12,4,6,7,3,7,12,5,6,4,12,13,3,14,10,7,3,8,3,7,15
%N A331730 Lexicographically earliest  infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A331595(n) for all other n, except for odd primes p, f(p) = 0.
%C A331730 For all i, j:
%C A331730   A305801(i) = A305801(j) => a(i) = a(j),
%C A331730   a(i) = a(j) => A331597(i) = A331597(j) => A331596(i) = A331596(j),
%C A331730   a(i) = a(j) => A331731(i) = A331731(j) => A331600(i) = A331600(j).
%H A331730 Antti Karttunen, <a href="/A331730/b331730.txt">Table of n, a(n) for n = 1..65537</a>
%o A331730 (PARI)
%o A331730 up_to = 65537;
%o A331730 rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
%o A331730 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A331730 A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
%o A331730 A241909(n) = if(1==n||isprime(n),2^primepi(n),my(f=factor(n),h=1,i,m=1,p=1,k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k,1]); m *= p^(i-h); h = i; if(f[k,2]>1, f[k,2]--, k++)); (p*m));
%o A331730 A331595(n) = gcd(A122111(n), A241909(n));
%o A331730 Aux331730(n) = if((n%2)&&isprime(n),0,A331595(n));
%o A331730 v331730 = rgs_transform(vector(up_to, n, Aux331730(n)));
%o A331730 A331730(n) = v331730[n];
%Y A331730 Cf. A122111, A241909, A305801, A331594, A331595, A331596, A331597, A331600, A331731.
%K A331730 nonn
%O A331730 1,2
%A A331730 _Antti Karttunen_, Jan 25 2020