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.

A322806 Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.

This page as a plain text file.
%I A322806 #5 Dec 26 2018 21:35:54
%S A322806 1,2,3,3,4,5,6,4,5,7,8,9,10,11,9,6,12,13,14,15,15,16,17,18,7,19,11,20,
%T A322806 21,22,23,8,18,24,13,25,26,27,28,29,30,31,32,33,34,35,36,37,22,38,39,
%U A322806 40,41,42,29,43,44,45,46,47,48,49,50,10,37,51,52,28,53,54,55,56,57,58,59,60,25,61,62,63,64,65,66,67,68,69,70,71,72,73,38
%N A322806 Lexicographically earliest such sequence a that a(i) = a(j) => A285330(i) = A285330(j) for all i, j.
%C A322806 Restricted growth sequence transform of A285330.
%H A322806 Antti Karttunen, <a href="/A322806/b322806.txt">Table of n, a(n) for n = 1..65537</a>
%o A322806 (PARI)
%o A322806 up_to = 65537;
%o A322806 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 A322806 A007947(n) = factorback(factorint(n)[, 1]); \\ From A007947
%o A322806 A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ From A048675
%o A322806 A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))), (n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); };
%o A322806 A285330(n) = if(issquarefree(n),A048675(n),A285328(n));
%o A322806 v322806 = rgs_transform(vector(up_to,n,A285330(n)));
%o A322806 A322806(n) = v322806[n];
%Y A322806 Cf. A048675, A285328, A285330, A285332, A285333, A286543, A322807.
%K A322806 nonn
%O A322806 1,2
%A A322806 _Antti Karttunen_, Dec 26 2018