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.

A323156 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323155(n) for all n, except f(1) = 0.

This page as a plain text file.
%I A323156 #7 Jan 09 2019 21:22:10
%S A323156 1,2,3,4,2,5,2,6,3,2,2,7,2,8,3,6,2,9,2,10,3,2,2,11,2,2,3,12,2,13,2,14,
%T A323156 3,2,2,15,2,16,3,17,2,18,2,19,3,2,2,20,2,2,3,4,2,21,2,22,3,2,2,23,2,
%U A323156 24,3,14,2,5,2,25,3,8,2,26,2,27,3,28,2,5,2,29,3,2,2,30,2,2,3,31,2,32,2,4,3,2,2,33,2,34,3,10,2,35,2,36,3
%N A323156 Lexicographically earliest sequence such that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = A323155(n) for all n, except f(1) = 0.
%C A323156 For all i, j:
%C A323156   a(i) = a(j) => A072627(i) = A072627(j),
%C A323156   a(i) = a(j) => A323157(i) = A323157(j) => A322977(i) = A322977(j).
%H A323156 Antti Karttunen, <a href="/A323156/b323156.txt">Table of n, a(n) for n = 1..65537</a>
%o A323156 (PARI)
%o A323156 up_to = 65537;
%o A323156 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 A323156 A323155(n) = { my(m=1); fordiv(n, d, if(isprime(d-1), m *= (d-1)^(1+valuation(n,d-1)))); (m); };
%o A323156 v323156 = rgs_transform(vector(up_to, n, if(1==n,0,A323155(n))));
%o A323156 A323156(n) = v323156[n];
%Y A323156 Cf. A323157, also A322315.
%Y A323156 Cf. A072627, A322977.
%K A323156 nonn
%O A323156 1,2
%A A323156 _Antti Karttunen_, Jan 09 2019