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!)
A322587 Lexicographically earliest such sequence a that for all i, j, a(i) = a(j) => f(i) = f(j), where f(n) = 0 for odd primes, and f(n) = A291756(n) [equally: A295887(n)] for any other number. 11
1, 1, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 11, 2, 6, 2, 12, 13, 14, 2, 15, 16, 13, 17, 18, 2, 10, 2, 19, 20, 21, 22, 23, 2, 24, 22, 25, 2, 13, 2, 26, 27, 28, 2, 29, 30, 16, 31, 32, 2, 17, 33, 34, 35, 36, 2, 37, 2, 38, 39, 40, 41, 20, 2, 42, 43, 22, 2, 44, 2, 35, 45, 46, 47, 22, 2, 48, 49, 33, 2, 32, 50, 51, 52, 53, 2, 27, 54, 55, 47, 56, 54, 57, 2, 30, 58, 59, 2, 31, 2, 60, 41 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
For all i, j: a(i) = a(j) => A322320(i) = A322320(j).
LINKS
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; };
A003557(n) = { my(f=factor(n)); for(i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };
A173557(n) = my(f=factor(n)[, 1]); prod(k=1, #f, f[k]-1); \\ From A173557
Aux322587(n) = if((n>2)&&isprime(n), 0, (1/2)*(2 + ((A003557(n)+A173557(n))^2) - A003557(n) - 3*A173557(n)));
v322587 = rgs_transform(vector(up_to, n, Aux322587(n)));
A322587(n) = v322587[n];
CROSSREFS
Sequence in context: A052297 A365049 A297162 * A372569 A058973 A155520
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 18 2018
STATUS
approved

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 18 21:02 EDT 2024. Contains 374388 sequences. (Running on oeis4.)