A322808 Lexicographically earliest such sequence a that a(i) = a(j) => f(i) = f(j) for all i, j, where f(n) = 0 if n is a squarefree number > 2, and f(n) = A097246(n) for all other numbers.
1, 2, 3, 4, 3, 3, 3, 5, 6, 3, 3, 7, 3, 3, 3, 7, 3, 8, 3, 9, 3, 3, 3, 10, 11, 3, 9, 12, 3, 3, 3, 10, 3, 3, 3, 9, 3, 3, 3, 13, 3, 3, 3, 14, 15, 3, 3, 16, 17, 18, 3, 19, 3, 13, 3, 20, 3, 3, 3, 21, 3, 3, 22, 16, 3, 3, 3, 23, 3, 3, 3, 13, 3, 3, 12, 24, 3, 3, 3, 21, 15, 3, 3, 25, 3, 3, 3, 26, 3, 27, 3, 28, 3, 3, 3, 29, 3, 30, 31, 12, 3, 3, 3, 32, 3
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
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; }; A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i,1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); }; A322808aux(n) = if((n>2)&&issquarefree(n),0,A097246(n)); v322808 = rgs_transform(vector(up_to,n,A322808aux(n))); A322808(n) = v322808[n];
Comments