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.

A322872 Ordinal transform of A171462, where A171462(n) = n - A052126(n).

This page as a plain text file.
%I A322872 #10 Dec 21 2021 11:53:37
%S A322872 1,1,1,2,1,2,1,3,2,1,1,2,1,2,3,3,1,4,1,2,2,1,1,3,2,1,3,2,1,3,1,4,2,1,
%T A322872 3,4,1,2,3,2,1,4,1,2,5,1,1,3,2,3,1,2,1,6,1,3,1,1,1,4,1,2,2,4,3,4,1,1,
%U A322872 2,5,1,5,1,2,6,3,2,4,1,2,3,1,1,5,2,1,2,3,1,6,3,2,1,1,2,3,1,4,3,4,1,2,1,3,4
%N A322872 Ordinal transform of A171462, where A171462(n) = n - A052126(n).
%H A322872 Antti Karttunen, <a href="/A322872/b322872.txt">Table of n, a(n) for n = 1..65537</a>
%t A322872 A171462[n_] := If[n == 1, 0, Module[{f = FactorInteger[n], p},
%t A322872      p = f[[-1, 1]]; n(p-1)/p]];
%t A322872 b[_] = 0;
%t A322872 a[n_] := a[n] = With[{t = A171462[n]}, b[t] = b[t]+1];
%t A322872 Array[a, 105] (* _Jean-François Alcover_, Dec 21 2021 *)
%o A322872 (PARI)
%o A322872 up_to = 65537;
%o A322872 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 A322872 A171462(n) = if(1==n,0,(n-(n/vecmax(factor(n)[, 1]))));
%o A322872 v322872 = ordinal_transform(vector(up_to,n,A171462(n)));
%o A322872 A322872(n) = v322872[n];
%Y A322872 Cf. A052126, A171462, A081373, A303756, A322871.
%K A322872 nonn
%O A322872 1,4
%A A322872 _Antti Karttunen_, Dec 29 2018