

A323081


Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(p) = (p mod 4) for primes p, and f(n) = A252463(n) for any other numbers.


3



1, 2, 3, 4, 5, 6, 3, 7, 7, 8, 3, 9, 5, 10, 9, 11, 5, 12, 3, 13, 13, 14, 3, 15, 12, 16, 11, 17, 5, 18, 3, 19, 17, 20, 18, 21, 5, 22, 23, 24, 5, 25, 3, 23, 15, 26, 3, 27, 28, 28, 29, 29, 5, 30, 25, 31, 32, 33, 3, 34, 5, 35, 24, 36, 37, 37, 3, 32, 38, 39, 3, 40, 5, 41, 21, 38, 39, 42, 3, 43, 19, 44, 3, 45, 42, 46, 47, 48, 5, 49, 50, 47, 51, 52, 53, 54, 5, 55, 31, 56, 5, 53, 3, 57, 34
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

For all i, j:
A319704(i) = A319704(j) => a(i) = a(j) => A322805(i) = A322805(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; };
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)};
A252463(n) = if(!(n%2), n/2, A064989(n));
A323081aux(n) = if(isprime(n), (n%4), A252463(n));
v323081 = rgs_transform(vector(up_to, n, A323081aux(n)));
A323081(n) = v323081[n];


CROSSREFS

Cf. A292583, A319704, A322805, A323080.
Sequence in context: A323074 A195153 A328764 * A274630 A278058 A320115
Adjacent sequences: A323078 A323079 A323080 * A323082 A323083 A323084


KEYWORD

nonn


AUTHOR

Antti Karttunen, Jan 03 2019


STATUS

approved



