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.

A303777 Ordinal transform of A081373; ordinal transform of {the ordinal transform of A000010}.

This page as a plain text file.
%I A303777 #17 Dec 20 2021 14:43:33
%S A303777 1,1,2,2,3,1,4,3,4,2,5,1,6,3,7,5,8,2,9,4,6,7,10,3,11,5,8,4,12,1,13,9,
%T A303777 10,6,14,2,15,7,11,5,16,1,17,8,9,12,18,3,13,6,19,7,20,8,14,4,15,16,21,
%U A303777 2,22,17,10,18,23,5,24,11,25,3,26,1,27,9,12,6,19,1,28,10,29,11,30,1,31,13,32,7,33,1,20,21,14,22,15,8
%N A303777 Ordinal transform of A081373; ordinal transform of {the ordinal transform of A000010}.
%H A303777 Antti Karttunen, <a href="/A303777/b303777.txt">Table of n, a(n) for n = 1..65537</a>
%p A303777 b:= proc() 0 end: g:= proc() 0 end:
%p A303777 h:= proc(n) option remember; local t;
%p A303777       t:= numtheory[phi](n); b(t):= b(t)+1
%p A303777     end:
%p A303777 a:= proc(n) option remember; local t;
%p A303777       t:= h(n); g(t):= g(t)+1
%p A303777     end:
%p A303777 seq(a(n), n=1..120);  # _Alois P. Heinz_, Apr 30 2018
%t A303777 b[_] = 0; g[_] = 0;
%t A303777 h[n_] := h[n] = With[{t = EulerPhi[n]}, b[t] = b[t]+1];
%t A303777 a[n_] := a[n] = With[{t = h[n]}, g[t] = g[t]+1];
%t A303777 Array[a, 120] (* _Jean-François Alcover_, Dec 19 2021, after _Alois P. Heinz_ *)
%o A303777 (PARI)
%o A303777 up_to = 65537;
%o A303777 ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
%o A303777 v081373 = ordinal_transform(vector(up_to,n,eulerphi(n)));
%o A303777 A081373(n) = v081373[n];
%o A303777 v303777 = ordinal_transform(vector(up_to,n,A081373(n)));
%o A303777 A303777(n) = v303777[n];
%Y A303777 Cf. A000010, A081373, A081375 (positions of ones), A210719 (positions of records), A286610.
%K A303777 nonn
%O A303777 1,3
%A A303777 _Antti Karttunen_, Apr 30 2018