

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



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, 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, 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
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

For all i, j:
A322810(i) = A322810(j) => a(i) = a(j),
a(i) = a(j) => A323073(i) = A323073(j).


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..65537


PROG

(PARI)
up_to = 65537;
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; };
A322974aux(n) = if(n<=2, n1, my(u=(nnumdiv(n))); if(1==gcd(n, u), 3, u));
v322974 = rgs_transform(vector(up_to, n, A322974aux(n)));
A322974(n) = v322974[n];


CROSSREFS

Cf. A000005, A009191, A049820, A323073.
Cf. also A319337, A322810, A322980.
Sequence in context: A176228 A322822 A305232 * A326201 A342625 A295569
Adjacent sequences: A322971 A322972 A322973 * A322975 A322976 A322977


KEYWORD

nonn


AUTHOR

Antti Karttunen, Jan 05 2019


STATUS

approved



