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.

A322988 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(1) = 0 if n is a prime power > 2, f(2) = -1, and f(n) = A322990(n) for all other numbers.

This page as a plain text file.
%I A322988 #7 Jan 02 2019 11:54:49
%S A322988 1,2,3,3,3,4,3,3,3,5,3,6,3,7,8,3,3,9,3,10,11,12,3,13,3,14,3,15,3,6,3,
%T A322988 3,16,17,18,19,3,20,21,22,3,8,3,23,24,25,3,26,3,27,28,29,3,30,31,32,
%U A322988 33,34,3,35,3,36,37,3,38,11,3,39,40,10,3,41,3,42,43,44,45,13,3,46,3,47,3,48,49,50,51,52,3,15,53,54,55,56,57,58,3,59,60,61,3,16,3
%N A322988 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(1) = 0 if n is a prime power > 2, f(2) = -1, and f(n) = A322990(n) for all other numbers.
%C A322988 For all i, j: a(i) = a(j) => A322989(i) = A322989(j).
%C A322988 For all i, j > 2: A305976(i) = A305976(j) => a(i) = a(j).
%H A322988 Antti Karttunen, <a href="/A322988/b322988.txt">Table of n, a(n) for n = 1..65537</a>
%o A322988 (PARI)
%o A322988 up_to = 8192;
%o A322988 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 A322988 A289271(n) = { my(v=0,i=0,x=1); for(d=2,oo,if(n==1, return(v)); if(1==gcd(x,d)&&1==omega(d), if(!(n%d)&&1==gcd(d,n/d), v += 2^i; n /= d; x *= d); i++)); }; \\ After _Rémy Sigrist_'s program for A289271.
%o A322988 A289272(n) = { my(m=1, pp=1); while(n>0, pp++; while(!isprimepower(pp)||(gcd(pp,m)>1), pp++); if(n%2, m *= pp); n >>=1); (m); }; \\ _Antti Karttunen_, Jan 02 2019
%o A322988 A322990(n) = A289272(A289271(n)>>1);
%o A322988 A322988aux(n) = if(2==n,-1,if(isprimepower(n),0,A322990(n)));
%o A322988 v322988 = rgs_transform(vector(up_to,n,A322988aux(n)));
%o A322988 A322988(n) = v322988[n];
%Y A322988 Cf. A289271, A289272, A305976, A322989, A322990.
%Y A322988 Cf. A322805, A322822 for analogous constructions for filter sequences.
%K A322988 nonn
%O A322988 1,2
%A A322988 _Antti Karttunen_, Jan 02 2019