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”).

A365390
Inverse permutation of A356867, where A356867 is Sycamore's Doudna variant D(3).
4
1, 2, 3, 5, 4, 6, 10, 8, 9, 7, 28, 15, 82, 11, 12, 17, 244, 18, 730, 14, 30, 29, 2188, 24, 13, 83, 27, 20, 6562, 21, 19684, 26, 84, 245, 19, 45, 59050, 731, 246, 23, 177148, 33, 531442, 32, 36, 2189, 1594324, 51, 37, 16, 732, 86, 4782970, 54, 31, 35, 2190, 6563, 14348908, 42, 43046722, 19685, 90, 53, 85, 87, 129140164
OFFSET
1,2
FORMULA
For all n >= 1, A356867(a(n)) = n.
PROG
(PARI)
up_to = 1+(3^15);
A365390list(up_to) = { my(v=vector(up_to), met=Map(), h=0, ak); for(i=1, #v, if(1==vecsum(digits(i, 3)), v[i] = i; h = i, ak = v[i-h]; forprime(p=2, , if(3!=p && !mapisdefined(met, p*ak), v[i] = p*ak; break))); mapput(met, v[i], i)); my(invs=List([]), x); for(i=1, oo, if(mapisdefined(met, i, &x), listput(invs, x), if(isprime(i)&&i>4, listput(invs, 1+(3^(primepi(i)-2))), return(Vec(invs))))); };
v365390 = A365390list(up_to);
A365390(n) = v365390[n];
for(n=1, #v365390, print1(A365390(n), ", "));
(PARI) See Links section.
CROSSREFS
Cf. A365389 (one less), A356867 (inverse), A364958 (fixed points).
Cf. also A005941.
Sequence in context: A374404 A097347 A356867 * A376686 A359557 A114744
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 15 2023
STATUS
approved