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!)
A318309 Restricted growth sequence transform of A083254 (2*phi(n) - n). 2

%I #6 Aug 26 2018 12:27:04

%S 1,2,1,2,3,4,5,2,3,4,6,7,8,4,1,2,9,10,11,7,3,4,12,13,9,4,6,7,14,15,16,

%T 2,17,4,18,19,20,4,6,13,21,22,23,7,3,4,24,25,20,26,18,7,27,22,28,13,9,

%U 4,29,30,31,4,6,2,32,33,34,7,35,36,37,38,39,4,5,7,40,41,42,25,14,4,43,44,40,4,28,13,45,46,47,7,14,4,48,49,50,15,12,51

%N Restricted growth sequence transform of A083254 (2*phi(n) - n).

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

%o (PARI)

%o up_to = 65537;

%o 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 A083254(n) = (2*eulerphi(n)-n);

%o v318309 = rgs_transform(vector(up_to,n,A083254(n)));

%o A318309(n) = v318309[n];

%Y Cf. A000010, A083254, A286449.

%K nonn

%O 1,2

%A _Antti Karttunen_, Aug 26 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 July 28 11:05 EDT 2024. Contains 374691 sequences. (Running on oeis4.)