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!)
A334868 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(1) = 0 and for n > 1, f(n) = -1 if n is in A050376, and f(n) = A334870(n) otherwise. 3
1, 2, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 8, 2, 2, 9, 2, 10, 11, 12, 2, 13, 2, 14, 15, 16, 2, 17, 2, 18, 19, 20, 21, 22, 2, 23, 24, 25, 2, 26, 2, 27, 28, 29, 2, 30, 2, 31, 32, 33, 2, 34, 35, 36, 37, 38, 2, 39, 2, 40, 41, 6, 42, 43, 2, 44, 45, 46, 2, 47, 2, 48, 49, 50, 51, 52, 2, 53, 2, 54, 2, 55, 56, 57, 58, 59, 2, 60, 61, 62, 63, 64, 65, 66, 2, 67, 68, 8, 2, 69, 2, 70, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
For all i, j: A305979(i) = A305979(j) => a(i) = a(j) => A334872(i) = A334872(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; };
ispow2(n) = (n && !bitand(n, n-1));
A302777(n) = ispow2(isprimepower(n));
A334870(n) = if(issquare(n), sqrtint(n), my(c=core(n), m=n); forprime(p=2, , if(!(c % p), m/=p; break, m*=p)); (m));
A334868aux(n) = if(1==n, 0, if(A302777(n), -1, A334870(n)));
v334868 = rgs_transform(vector(up_to, n, A334868aux(n)));
A334868(n) = v334868[n];
CROSSREFS
Cf. A050376 (positions of 2's), A305979, A334869, A334870, A334872.
Sequence in context: A293444 A302791 A373988 * A305979 A366805 A293223
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 08 2020
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 19 00:30 EDT 2024. Contains 374388 sequences. (Running on oeis4.)