login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352899
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A352892(n), except f(n) = -n when <= 2.
5
1, 2, 3, 4, 3, 3, 3, 5, 6, 7, 3, 8, 3, 9, 4, 10, 3, 4, 3, 11, 12, 13, 3, 14, 6, 15, 7, 16, 3, 3, 3, 17, 8, 18, 4, 19, 3, 20, 21, 22, 3, 7, 3, 23, 5, 24, 3, 25, 6, 26, 27, 28, 3, 5, 12, 29, 30, 31, 3, 27, 3, 32, 26, 33, 8, 9, 3, 34, 35, 36, 3, 37, 3, 38, 9, 39, 4, 13, 3, 40, 41, 42, 3, 43, 21, 44, 45, 46, 3, 8, 12
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of function f(n) = -n if n < 3, and otherwise f(n) = A352892(n).
For all i, j:
A305801(i) = A305801(j) => A352898(i) = A352898(j) => a(i) = a(j),
a(i) = a(j) => A352893(i) = A352893(j),
a(i) = a(j) => A352896(i) = A352896(j).
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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
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)};
A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
A329603(n) = A005940(2+(3*A156552(n)));
A341515(n) = if(n%2, A064989(n), A329603(n));
A348717(n) = { my(f=factor(n)); if(#f~>0, my(pi1=primepi(f[1, 1])); for(k=1, #f~, f[k, 1] = prime(primepi(f[k, 1])-pi1+1))); factorback(f); }; \\ From A348717
Aux352899(n) = if(n<=2, -n, A352892(n));
v352899 = rgs_transform(vector(up_to, n, Aux352899(n)));
A352899(n) = v352899[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 08 2022
STATUS
approved