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!)
A322974 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(1) = 0, f(2) = 1, f(n) = 3 if A009191(n) == 1 and f(n) = A049820(n) for all other numbers > 2. 4

%I #7 Jan 07 2019 11:11:12

%S 1,2,3,3,3,4,3,5,6,6,3,6,3,7,3,3,3,8,3,9,3,10,3,11,3,12,3,12,3,12,3,

%T 13,3,14,3,15,3,16,3,17,3,16,3,18,19,20,3,18,3,21,3,22,3,22,3,23,3,24,

%U 3,23,3,25,26,3,3,25,3,27,3,27,3,28,3,29,30,29,3,29,3,29,3,31,3,32,3,33,3,34,3,31,3,35,3,36,3,37,3,38,39,3,3,40,3,41,3

%N Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(1) = 0, f(2) = 1, f(n) = 3 if A009191(n) == 1 and f(n) = A049820(n) for all other numbers > 2.

%C For all i, j:

%C A322810(i) = A322810(j) => a(i) = a(j),

%C a(i) = a(j) => A323073(i) = A323073(j).

%H Antti Karttunen, <a href="/A322974/b322974.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 A322974aux(n) = if(n<=2,n-1,my(u=(n-numdiv(n))); if(1==gcd(n,u),3,u));

%o v322974 = rgs_transform(vector(up_to,n,A322974aux(n)));

%o A322974(n) = v322974[n];

%Y Cf. A000005, A009191, A049820, A323073.

%Y Cf. also A319337, A322810, A322980.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jan 05 2019

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 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)