[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
Search: a336470 -id:a336470
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) is the number of iterations needed to reach a power of 2 starting at n and using the map k -> k-(k/p), where p is the largest prime factor of k.
+10
65
0, 0, 1, 0, 1, 1, 2, 0, 2, 1, 2, 1, 2, 2, 2, 0, 1, 2, 3, 1, 3, 2, 3, 1, 2, 2, 3, 2, 3, 2, 3, 0, 3, 1, 3, 2, 3, 3, 3, 1, 2, 3, 4, 2, 3, 3, 4, 1, 4, 2, 2, 2, 3, 3, 3, 2, 4, 3, 4, 2, 3, 3, 4, 0, 3, 3, 4, 1, 4, 3, 4, 2, 3, 3, 3, 3, 4, 3, 4, 1, 4, 2, 3, 3, 2, 4, 4, 2, 3, 3, 4, 3, 4, 4, 4, 1, 2, 4, 4, 2
OFFSET
1,7
COMMENTS
From Antti Karttunen, Apr 07 2020: (Start)
Also the least number of iterations of nondeterministic map k -> k-(k/p) needed to reach a power of 2, when any prime factor p of k can be used. The minimal length path to the nearest power of 2 (= 2^A064415(n)) is realized whenever one uses any of the A005087(k) distinct odd prime factors of the current k, at any step of the process. For example, this could be done by iterating with the map k -> k-(k/A078701(k)), i.e., by using the least odd prime factor of k (instead of the largest prime).
Proof: Viewing the prime factorization of changing k as a multiset ("bag") of primes, we see that liquefying any odd prime p with step p -> (p-1) brings at least one more 2 to the bag, while applying p -> (p-1) to any 2 just removes it from the bag, but gives nothing back. Thus the largest (and thus also the nearest) power of 2 is reached by eliminating - step by step - all odd primes from the bag, but none of 2's, and it doesn't matter in which order this is done.
The above implies also that the sequence is totally additive, which also follows because both A064097 and A064415 are. That A064097(n) = A329697(n) + A054725(n) for all n > 1 can be also seen by comparing the initial conditions and the recursion formulas of these three sequences.
For any n, A333787(n) is either the nearest power of 2 reached (= 2^A064415(n)), or occurs on some of the paths from n to there.
(End)
A003401 gives the numbers k where a(k) = A005087(k). See also A336477. - Antti Karttunen, Mar 16 2021
LINKS
Michael De Vlieger, Annotated fan style binary tree labeling the index n, with a color code where black represents a(n) = 0, red a(n) = 1, and magenta the largest value in a(n) for n = 1..16383.
FORMULA
From Antti Karttunen, Apr 07-19 2020: (Start)
a(1) = a(2) = 0; and for n > 2, a(p) = 1 + a(p-1) if p is an odd prime and a(n*m) = a(n) + a(m) if m,n > 1. [This is otherwise equal to the definition of A064097, except here we have a different initial condition, with a(2) = 0].
a(2n) = a(A000265(n)) = a(n).
a(p) = 1+a(p-1), for all odd primes p.
If A209229(n) == 1 [when n is a power of 2], a(n) = 0,
otherwise a(n) = 1 + a(n-A052126(n)) = 1 + a(A171462(n)).
Equivalently, for non-powers of 2, a(n) = 1 + a(n-(n/A078701(n))),
or equivalently, for non-powers of 2, a(n) = 1 + Min a(n - n/p), for p prime and dividing n.
a(n) = A064097(n) - A064415(n), or equally, a(n) = A064097(n) - A054725(n), for n > 1.
a(A019434(n)) = 1, a(A334092(n)) = 2, a(A334093(n)) = 3, etc. for all applicable n.
For all n >= 0, a(A334099(n)) = a(A000244(n)) = a(A000351(n)) = a(A001026(n)) = a(257^n) = a(65537^n) = n.
a(A122111(n)) = A334107(n), a(A225546(n)) = A334109(n).
(End)
From Antti Karttunen, Mar 16 2021: (Start)
a(n) = a(A336466(n)) + A087436(n) = A336396(n) + A087436(n).
a(A053575(n)) = A336469(n) = a(n) - A005087(n).
a(A147545(n)) = A000120(A147545(n)) - 1.
(End)
EXAMPLE
The trajectory of 15 is {12, 8}, taking 2 iterations to reach 8 = 2^3. So a(15) is 2.
From Antti Karttunen, Apr 07 2020: (Start)
Considering all possible paths from 15 to 1 nondeterministic map k -> k-(k/p), where p can be any prime factor of k, we obtain the following graph:
15
/ \
/ \
10 12
/ \ / \
/ \ / \
5 8 6
\__ | __/|
\_|_/ |
4 3
\ /
\ /
2
|
1.
It can be seen that there's also alternative route to 8 via 10 (with 10 = 15-(15/3), where 3 is not the largest prime factor of 15), but it's not any shorter than the route via 12.
(End)
MATHEMATICA
a[n_] := Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, n, # != 2^IntegerExponent[#, 2] &] -1; Array[a, 100]
PROG
(PARI) A329697(n) = if(!bitand(n, n-1), 0, 1+A329697(n-(n/vecmax(factor(n)[, 1])))); \\ Antti Karttunen, Apr 07 2020
(PARI)
up_to = 2^24;
A329697list(up_to) = { my(v=vector(up_to)); v[1] = 0; for(n=2, up_to, v[n] = if(!bitand(n, n-1), 0, 1+vecmin(apply(p -> v[n-n/p], factor(n)[, 1]~)))); (v); };
v329697 = A329697list(up_to);
A329697(n) = v329697[n]; \\ Antti Karttunen, Apr 07 2020
(PARI) A329697(n) = if(n<=2, 0, if(isprime(n), A329697(n-1)+1, my(f=factor(n)); (apply(A329697, f[, 1])~ * f[, 2]))); \\ Antti Karttunen, Apr 19 2020
CROSSREFS
Cf. A000079, A334101, A334102, A334103, A334104, A334105, A334106 for positions of 0 .. 6 in this sequence, and also array A334100.
Cf. A334099 (a right inverse, positions of the first occurrence of each n).
Cf. A334091 (first differences), A335429 (partial sums).
Cf. also A331410 (analogous sequence when using the map k -> k + k/p), A334861, A335877 (their sums and differences), see also A335878 and A335884, A335885.
KEYWORD
easy,nonn
AUTHOR
Ali Sada and Robert G. Wilson v, Feb 28 2020
STATUS
approved
Fully multiplicative with a(p) = A000265(p-1) for any prime p, where A000265(k) gives the odd part of k.
+10
30
1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 3, 1, 1, 1, 1, 9, 1, 3, 5, 11, 1, 1, 3, 1, 3, 7, 1, 15, 1, 5, 1, 3, 1, 9, 9, 3, 1, 5, 3, 21, 5, 1, 11, 23, 1, 9, 1, 1, 3, 13, 1, 5, 3, 9, 7, 29, 1, 15, 15, 3, 1, 3, 5, 33, 1, 11, 3, 35, 1, 9, 9, 1, 9, 15, 3, 39, 1, 1, 5, 41, 3, 1, 21, 7, 5, 11, 1, 9, 11, 15, 23, 9, 1, 3, 9, 5, 1, 25, 1, 51, 3, 3
OFFSET
1,7
COMMENTS
For the comment here, we extend the definition of the second kind of Cunningham chain (see Wikipedia-article) so that also isolated primes for which neither (p+1)/2 nor 2p-1 is a prime are considered to be in singular chains, that is, in chains of the length one. If we replace one or more instances of any particular odd prime factor p in n with any odd prime q in such a chain, so that m = (q^k)*n / p^(e-k), where e is the exponent of p of n, and k <= e is the number of instances of p replaced with q, then it holds that a(m) = a(n), and by induction, the value stays invariant for any number of such replacements. Note also that A001222, but not necessarily A001221 will stay invariant in such changes.
For example, if some of the odd prime divisors p of n are in A005382, then replacing it with 2p-1 (i.e., the corresponding terms of A005383), gives a new number m, for which a(m) = a(n). And vice versa, the same is true for any of the prime divisors > 3 of n that are in A005383, then replacing any one of them with (p+1)/2 will not affect the result. For example, a(37*37*37) = a(19*37*73) = 729 as 37 is both in A005382 and in A005383.
a(n) = A053575(n) for squarefree n (A005117). - Antti Karttunen, Mar 16 2021
FORMULA
a(n) = A000265(A003958(n)) = A000265(A333787(n)).
a(A000010(n)) = A336468(n) = a(A053575(n)).
A329697(a(n)) = A336396(n) = A329697(n) - A087436(n).
a(n) = A335915(n) / A336467(n). - Antti Karttunen, Mar 16 2021
MATHEMATICA
Array[Times @@ Map[If[# <= 2, 1, (# - 1)/2^IntegerExponent[# - 1, 2]] &, Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[#]]] &, 105] (* Michael De Vlieger, Jul 24 2020 *)
PROG
(PARI)
A000265(n) = (n>>valuation(n, 2));
A336466(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(f[k, 1]-1)^f[k, 2]); };
KEYWORD
nonn,mult,look
AUTHOR
Antti Karttunen, Jul 22 2020
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => A336467(i) = A336467(j) and A336158(i) = A336158(j), for all i, j >= 1.
+10
10
1, 1, 2, 1, 3, 2, 2, 1, 4, 3, 3, 2, 5, 2, 6, 1, 7, 4, 8, 3, 9, 3, 3, 2, 10, 5, 11, 2, 12, 6, 2, 1, 6, 7, 6, 4, 13, 8, 14, 3, 15, 9, 16, 3, 17, 3, 3, 2, 4, 10, 18, 5, 19, 11, 18, 2, 20, 12, 12, 6, 21, 2, 22, 1, 23, 6, 24, 7, 6, 6, 7, 4, 25, 13, 26, 8, 6, 14, 8, 3, 27, 15, 15, 9, 28, 16, 29, 3, 30, 17, 14, 3, 9, 3, 29, 2, 31, 4, 17, 10, 32, 18, 33, 5, 34
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered pair [A336467(n), A336158(n)].
For all i, j:
A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A331410(i) = A331410(j),
a(i) = a(j) => A336391(i) = A336391(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; };
A000265(n) = (n>>valuation(n, 2));
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A336467(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k, 1], 1, (A000265(f[k, 1]+1))^f[k, 2])); };
Aux336390(n) = [A336158(n), A336467(n)];
v336390 = rgs_transform(vector(up_to, n, Aux336390(n)));
A336390(n) = v336390[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 10 2020
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => A329697(i) = A329697(j) and A336158(i) = A336158(j), for all i, j >= 1.
+10
8
1, 1, 2, 1, 2, 2, 3, 1, 4, 2, 3, 2, 3, 3, 5, 1, 2, 4, 6, 2, 7, 3, 6, 2, 4, 3, 8, 3, 6, 5, 6, 1, 7, 2, 7, 4, 6, 6, 7, 2, 3, 7, 9, 3, 10, 6, 9, 2, 11, 4, 5, 3, 6, 8, 7, 3, 12, 6, 9, 5, 6, 6, 13, 1, 7, 7, 9, 2, 12, 7, 9, 4, 6, 6, 10, 6, 12, 7, 9, 2, 14, 3, 6, 7, 5, 9, 12, 3, 6, 10, 12, 6, 12, 9, 12, 2, 3, 11, 13, 4, 6, 5, 6, 3, 15
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered pair [A329697(n), A336158(n)].
For all i, j:
A336470(i) = A336470(j) => a(i) = a(j)
a(i) = a(j) => A336396(i) = A336396(j),
a(i) = a(j) => A336469(i) = A336469(j) => A336477(i) = A336477(j).
This sequence has an ability to see where the terms of A003401 are, as they are the indices of zeros in A336469. Specifically, they are numbers k that satisfy the condition A329697(k) = A001221(A336158(k)), i.e., numbers for which A329697(k) is equal to the number of distinct prime divisors of the odd part of k. See also comments in array A334100.
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; };
A000265(n) = (n>>valuation(n, 2));
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A329697(n) = if(!bitand(n, n-1), 0, 1+A329697(n-(n/vecmax(factor(n)[, 1]))));
Aux336471(n) = [A329697(n), A336158(n)];
v336471 = rgs_transform(vector(up_to, n, Aux336471(n)));
A336471(n) = v336471[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 22 2020
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A329697(i) = A329697(j), for all i, j >= 1.
+10
7
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 6, 4, 7, 1, 3, 5, 8, 3, 9, 6, 10, 2, 6, 6, 11, 4, 10, 7, 12, 1, 13, 3, 8, 5, 9, 8, 10, 3, 14, 9, 15, 6, 16, 10, 17, 2, 18, 6, 19, 6, 16, 11, 20, 4, 21, 10, 22, 7, 23, 12, 24, 1, 13, 13, 18, 3, 25, 8, 21, 5, 9, 9, 16, 8, 15, 10, 17, 3, 25, 14, 16, 9, 26, 15, 27, 6, 16, 16, 28, 10, 27, 17, 29, 2, 6, 18, 30, 6, 16, 19, 20, 6, 15
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered pair [A278222(n), A329697(n)].
For all i, j: A336460(i) = A336460(j) => a(i) = a(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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
A329697(n) = if(!bitand(n, n-1), 0, 1+A329697(n-(n/vecmax(factor(n)[, 1]))));
Aux336473(n) = [A278222(n), A329697(n)];
v336473 = rgs_transform(vector(up_to, n, Aux336473(n)));
A336473(n) = v336473[n];
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Jul 24 2020
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A278222(n), A336158(n), A336466(n)], for all i, j >= 1.
+10
6
1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 3, 5, 9, 3, 10, 6, 11, 2, 12, 7, 13, 4, 14, 8, 15, 1, 16, 3, 17, 5, 18, 9, 19, 3, 20, 10, 21, 6, 22, 11, 23, 2, 24, 12, 25, 7, 26, 13, 27, 4, 28, 14, 29, 8, 30, 15, 31, 1, 32, 16, 33, 3, 34, 17, 35, 5, 18, 18, 22, 9, 36, 19, 37, 3, 38, 20, 39, 10, 40, 21, 41, 6, 42, 22, 43, 11, 44, 23, 45, 2, 7, 24, 46, 12, 47, 25, 48, 7, 49
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered triple [A278222(n), A336158(n), A336466(n)].
For all i, j:
A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A336159(i) = A336159(j),
a(i) = a(j) => A336470(i) = A336470(j) => A336471(i) = A336471(j),
a(i) = a(j) => A336472(i) = A336472(j),
a(i) = a(j) => A336473(i) = A336473(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; };
A000265(n) = (n>>valuation(n, 2));
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
A336466(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k, 1], 1, (A000265(f[k, 1]-1))^f[k, 2])); };
Aux336460(n) = [A278222(n), A336158(n), A336466(n)];
v336460 = rgs_transform(vector(up_to, n, Aux336460(n)));
A336460(n) = v336460[n];
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 24 2020
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => A278222(i) = A278222(j) and A336466(i) = A336466(j), for all i, j >= 1.
+10
5
1, 1, 2, 1, 3, 2, 4, 1, 3, 3, 5, 2, 6, 4, 7, 1, 3, 3, 8, 3, 9, 5, 10, 2, 11, 6, 12, 4, 13, 7, 14, 1, 15, 3, 6, 3, 16, 8, 17, 3, 18, 9, 19, 5, 20, 10, 21, 2, 8, 11, 12, 6, 22, 12, 23, 4, 24, 13, 25, 7, 26, 14, 27, 1, 28, 15, 29, 3, 30, 6, 31, 3, 16, 16, 20, 8, 32, 17, 33, 3, 34, 18, 35, 9, 36, 19, 37, 5, 38, 20, 39, 10, 40, 21, 41, 2, 6, 8, 42, 11, 43, 12, 44, 6, 45
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered pair [A278222(n), A336466(n)].
For all i, j: A336460(i) = A336460(j) => a(i) = a(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; };
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A278222(n) = A046523(A005940(1+n));
A000265(n) = (n>>valuation(n, 2));
A336466(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k, 1], 1, (A000265(f[k, 1]-1))^f[k, 2])); };
Aux336472(n) = [A278222(n), A336466(n)];
v336472 = rgs_transform(vector(up_to, n, Aux336472(n)));
A336472(n) = v336472[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 24 2020
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A342666(n), A350063(n)] for n > 1, with f(1) = 1.
+10
5
1, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 3, 3, 7, 2, 4, 2, 8, 5, 9, 2, 10, 3, 11, 4, 11, 2, 11, 2, 12, 3, 13, 3, 14, 2, 3, 9, 11, 2, 8, 2, 15, 6, 16, 2, 17, 3, 5, 11, 18, 2, 19, 5, 20, 13, 21, 2, 22, 2, 23, 8, 24, 3, 25, 2, 26, 3, 6, 2, 9, 2, 27, 4, 28, 3, 26, 2, 29, 7, 30, 2, 31, 9, 32, 16, 33, 2, 31, 5, 34, 21, 35
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A342666(n), A350063(n)], when assuming that A342666(1) = 0.
Restricted growth sequence transform of the function f(1) = 0, f(n) = A336470(A156552(n)) for n > 1.
For all i, j >= 1: A305897(i) = A305897(j) => a(i) = a(j) => A350065(i) = A350065(j).
For all i, j >= 2: a(i) = a(j) => A342651(i) = A342651(j).
PROG
(PARI)
up_to = 3003;
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; };
A000265(n) = (n>>valuation(n, 2));
A003958(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1]--); factorback(f); };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
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 };
A336466(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(f[k, 1]-1)^f[k, 2]); };
Aux350067(n) = if(1==n, 1, my(u=A000265(A156552(n))); [A046523(u), A336466(u)]);
v350067 = rgs_transform(vector(up_to, n, Aux350067(n)));
A350067(n) = v350067[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 29 2022
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => A365425(i) = A365425(j) and A365426(i) = A365426(j) for all i, j >= 0.
+10
3
1, 1, 1, 2, 1, 3, 2, 2, 1, 4, 3, 3, 2, 5, 2, 6, 1, 7, 4, 4, 3, 8, 3, 9, 2, 8, 5, 10, 2, 10, 6, 11, 1, 12, 7, 7, 4, 13, 4, 14, 3, 15, 8, 16, 3, 16, 9, 17, 2, 13, 8, 18, 5, 19, 10, 20, 2, 18, 10, 21, 6, 21, 11, 6, 1, 22, 12, 12, 7, 23, 7, 24, 4, 25, 13, 26, 4, 26, 14, 27, 3, 25, 15, 28, 8, 29, 16, 30, 3, 28, 16, 31, 9, 31, 17
OFFSET
0,4
COMMENTS
Restricted growth sequence transform of the ordered pair [A365425(n), A365426(n)].
Restricted growth sequence transform of the function f(n) = A336470(A163511(n)).
For all i, j: a(i) = a(j) => A334204(i) = A334204(j).
LINKS
FORMULA
For all n >= 1, a(n) = a(2*n) = a(A000265(n)).
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; };
A000265(n) = (n>>valuation(n, 2));
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
A336466(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(f[k, 1]-1)^f[k, 2]); };
A365394aux(n) = [A365425(n), A365426(n)];
v365394 = rgs_transform(vector(1+up_to, n, A365394aux(n-1)));
A365394(n) = v365394[1+n];
CROSSREFS
Cf. also A350067, A365395, A366792 (compare the scatter plots).
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Sep 04 2023
STATUS
approved
Lexicographically earliest infinite sequence such that a(i) = a(j) => A366789(i) = A366789(j) and A336158(i) = A336158(j), for all i, j >= 1.
+10
3
1, 1, 2, 1, 3, 2, 2, 1, 4, 3, 5, 2, 3, 2, 6, 1, 7, 4, 2, 3, 8, 5, 9, 2, 10, 3, 11, 2, 5, 6, 12, 1, 13, 7, 6, 4, 3, 2, 6, 3, 14, 8, 7, 5, 15, 9, 16, 2, 4, 10, 17, 3, 2, 11, 18, 2, 8, 5, 19, 6, 9, 12, 20, 1, 21, 13, 22, 7, 21, 6, 5, 4, 23, 3, 24, 2, 13, 6, 12, 3, 25, 14, 26, 8, 27, 7, 13, 5, 3, 15, 6, 9, 28, 16, 6, 2, 29, 4
OFFSET
1,3
COMMENTS
Restricted growth sequence transform of the ordered pair [A366789(n), A336158(n)].
For all i, j:
A003602(i) = A003602(j) => a(i) = a(j) => A366388(i) = A366388(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; };
A000265(n) = (n>>valuation(n, 2));
A366789(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(primepi(f[k, 1]))^f[k, 2]); };
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
Aux366790(n) = [A366789(n), A336158(n)];
v366790 = rgs_transform(vector(up_to, n, Aux366790(n)));
A366790(n) = v366790[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 23 2023
STATUS
approved

Search completed in 0.011 seconds