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!)
A319989 a(n) = A303757(A252463(n)). 8

%I #8 Dec 20 2018 23:17:20

%S 1,1,1,1,1,1,1,2,2,1,1,3,1,1,3,2,1,2,1,3,3,1,1,4,2,1,2,3,1,1,1,2,3,1,

%T 1,4,1,1,2,3,1,2,1,2,4,1,1,4,1,1,3,3,1,2,2,4,3,1,1,5,1,1,3,2,2,2,1,3,

%U 3,1,1,5,1,1,4,3,1,2,1,4,2,1,1,6,2,1,2,3,1,3,2,2,2,1,1,5,1,2,4,4,1,1,1,4,5

%N a(n) = A303757(A252463(n)).

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

%F a(n) = A303757(A252463(n)).

%t Block[{s = Table[Which[n == 1, 1, EvenQ@n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n], {n, 120}], t}, t = EulerPhi@ Range@ Max@ s; Map[Function[n, Count[t[[2 ;; n]], _?(# == t[[n]] &)]], s] /. 0 -> 1] (* _Michael De Vlieger_, Nov 23 2018 *)

%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 Aux303757(n) = if(1==n,0,eulerphi(n));

%o v303757 = ordinal_transform(vector(up_to,n,Aux303757(n)));

%o A303757(n) = v303757[n];

%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A252463(n) = if(!(n%2),n/2,A064989(n));

%o A319989(n) = A303757(A252463(n));

%Y Cf. A252463, A303757.

%Y Cf. also A319699, A319700, A319703, A320107, A320111.

%K nonn

%O 1,8

%A _Antti Karttunen_, Nov 22 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 April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)