login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A322872 Ordinal transform of A171462, where A171462(n) = n - A052126(n). 2

%I #10 Dec 21 2021 11:53:37

%S 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 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 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 Ordinal transform of A171462, where A171462(n) = n - A052126(n).

%H Antti Karttunen, <a href="/A322872/b322872.txt">Table of n, a(n) for n = 1..65537</a>

%t A171462[n_] := If[n == 1, 0, Module[{f = FactorInteger[n], p},

%t p = f[[-1, 1]]; n(p-1)/p]];

%t b[_] = 0;

%t a[n_] := a[n] = With[{t = A171462[n]}, b[t] = b[t]+1];

%t Array[a, 105] (* _Jean-François Alcover_, Dec 21 2021 *)

%o (PARI)

%o up_to = 65537;

%o 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 A171462(n) = if(1==n,0,(n-(n/vecmax(factor(n)[, 1]))));

%o v322872 = ordinal_transform(vector(up_to,n,A171462(n)));

%o A322872(n) = v322872[n];

%Y Cf. A052126, A171462, A081373, A303756, A322871.

%K nonn

%O 1,4

%A _Antti Karttunen_, Dec 29 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 02:28 EDT 2024. Contains 375113 sequences. (Running on oeis4.)