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.

A366796 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366795(i) = A366795(j) for all i, j >= 0.

This page as a plain text file.
%I A366796 #6 Oct 26 2023 13:22:24
%S A366796 1,2,3,1,4,5,1,2,6,7,8,3,1,2,3,1,5,8,9,4,10,11,4,5,1,2,3,1,4,5,1,2,12,
%T A366796 13,10,6,11,14,6,7,14,15,16,8,6,7,8,3,1,2,3,1,4,5,1,2,6,7,8,6,1,2,3,1,
%U A366796 7,17,18,5,19,15,5,8,20,21,22,9,5,8,9,4,23,22,24,10,25,25,10,11,5,8,9,4,10,11,4,5,1
%N A366796 Lexicographically  earliest infinite sequence such that a(i) = a(j) => A366795(i) = A366795(j) for all i, j >= 0.
%C A366796 Restricted growth sequence transform of A366795.
%H A366796 Antti Karttunen, <a href="/A366796/b366796.txt">Table of n, a(n) for n = 0..65537</a>
%o A366796 (PARI)
%o A366796 up_to = 65537;
%o A366796 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 A366796 A001615(n) = if(1==n,n, my(f=factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1))); \\ After code in A001615
%o A366796 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
%o A366796 A344695(n) = gcd(sigma(n), A001615(n));
%o A366796 A366795(n) = A344695(A005940(1+n));
%o A366796 v366796 = rgs_transform(vector(1+up_to,n,A366795(n-1)));
%o A366796 A366796(n) = v366796[1+n];
%Y A366796 Cf. A005940, A344695, A366795.
%Y A366796 Cf. also A366802, A366805.
%K A366796 nonn
%O A366796 0,2
%A A366796 _Antti Karttunen_, Oct 26 2023