cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 10 results.

A336926 Lexicographically earliest infinite sequence such that a(i) = a(j) => A335880(1+sigma(i)) = A335880(1+sigma(j)), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 4, 4, 1, 3, 5, 4, 6, 7, 8, 8, 1, 5, 2, 9, 10, 5, 6, 8, 9, 1, 10, 7, 11, 12, 13, 5, 1, 14, 6, 14, 9, 5, 9, 11, 10, 10, 7, 6, 15, 10, 13, 14, 16, 6, 14, 13, 11, 6, 11, 13, 11, 11, 10, 9, 11, 10, 7, 11, 1, 15, 17, 10, 18, 7, 17, 13, 14, 13, 11, 16, 19, 7, 11, 11, 13, 9, 18, 15, 17, 20, 21, 11, 11, 10, 21, 13, 11, 21, 17, 11, 21, 11, 10, 11, 20, 5
Offset: 1

Views

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the function f(n) = A335880(A088580(n)).
For all i, j:
A324400(i) = A324400(j) => a(i) = a(j),
a(i) = a(j) => A336694(i) = A336694(j),
a(i) = a(j) => A336695(i) = A336695(j).

Crossrefs

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; };
    A329697(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A329697(f[k,1]-1)))); };
    A331410(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A331410(f[k,1]+1)))); };
    Aux335880(n) = [A329697(n),A331410(n)];
    v336926 = rgs_transform(vector(up_to, n, Aux335880(1+sigma(n))));
    A336926(n) = v336926[n];

A336927 Lexicographically earliest infinite sequence such that a(i) = a(j) => A335880(sigma(i)) = A335880(sigma(j)), for all i, j >= 1.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 1, 4, 5, 5, 2, 3, 3, 2, 2, 6, 5, 7, 8, 9, 1, 5, 2, 4, 6, 9, 8, 3, 4, 5, 1, 10, 2, 7, 2, 10, 7, 4, 3, 11, 9, 2, 5, 9, 7, 5, 2, 6, 12, 13, 5, 13, 7, 4, 5, 4, 8, 11, 4, 9, 6, 2, 5, 14, 9, 5, 15, 10, 2, 5, 5, 16, 11, 12, 6, 7, 2, 9, 8, 13, 12, 10, 9, 3, 7, 7, 4, 11, 11, 12, 3, 9, 1, 5, 4, 10, 13, 17, 7, 18, 19, 7, 5, 12, 2
Offset: 1

Views

Author

Antti Karttunen, Aug 11 2020

Keywords

Comments

Restricted growth sequence transform of the function f(n) = A335880(A000203(n)), or equally, of the ordered pair [A336928(n), A336929(n)].

Crossrefs

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; };
    A329697(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A329697(f[k,1]-1)))); };
    A331410(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A331410(f[k,1]+1)))); };
    Aux335880(n) = [A329697(n),A331410(n)];
    v336927 = rgs_transform(vector(up_to, n, Aux335880(sigma(n))));
    A336927(n) = v336927[n];

A329697 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.

Original entry on oeis.org

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

Views

Author

Ali Sada and Robert G. Wilson v, Feb 28 2020

Keywords

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

Examples

			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)
		

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.

Programs

  • Mathematica
    a[n_] := Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, n, # != 2^IntegerExponent[#, 2] &] -1; Array[a, 100]
  • 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

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)

A347374 Lexicographically earliest infinite sequence such that a(i) = a(j) => A331410(i) = A331410(j) and A000593(i) = A000593(j), for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 17, 5, 18, 10, 19, 3, 20, 11, 21, 6, 22, 12, 23, 2, 24, 13, 25, 7, 26, 14, 25, 4, 27, 15, 28, 8, 29, 16, 30, 1, 31, 17, 32, 9, 33, 17, 34, 5, 35, 18, 36, 10, 33, 19, 37, 3, 38, 20, 39, 11, 40, 21, 41, 6, 42, 22, 43, 12
Offset: 1

Views

Author

Antti Karttunen, Aug 29 2021

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A000593(n), A331410(n)].
For all i, j: A003602(i) = A003602(j) => a(i) = a(j) => A347249(i) = A347249(j).

Crossrefs

Cf. also A335880, A336390, A336391, A336394 for similar constructions.

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; };
    A000593(n) = sigma(n>>valuation(n, 2));
    A331410(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A331410(f[k,1]+1)))); };
    Aux347374(n) = [A331410(n), A000593(n)];
    v347374 = rgs_transform(vector(up_to, n, Aux347374(n)));
    A347374(n) = v347374[n];

A365388 Lexicographically earliest infinite sequence such that a(i) = a(j) => A334867(i) = A334867(i) and A365386(j) = A365386(j) for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20, 3, 21, 11, 22, 6, 23, 12, 24, 2, 25, 13, 26, 7, 27, 14, 28, 4, 29, 15, 30, 8, 31, 16, 32, 1, 33, 17, 34, 9, 35, 18, 36, 5, 37, 19, 38, 10, 39, 20, 40, 3, 41, 21, 42, 11, 43, 22, 44, 6, 45, 23, 46, 12, 47, 24, 48, 2, 49, 25, 41
Offset: 1

Views

Author

Antti Karttunen, Sep 07 2023

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A334867(n), A365386(n)], or equally, of the quadruplet [A329697(n), A334204(n), A331410(n), A365385(n)].
For all i, j:
A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A334867(i) = A334867(j),
a(i) = a(j) => A335880(i) = A335880(j),
a(i) = a(j) => A365386(i) = A365386(j).

Crossrefs

Differs from A003602 and A351090 for the first time at n=99, where a(99) = 41, while A003602(99) = A351090(99) = 50.

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; };
    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));
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A334204(n) = A329697(A163511(n));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    A365385(n) = A331410(A163511(n));
    A365388aux(n) = [A329697(n),A334204(n),A331410(n),A365385(n)];
    v365388 = rgs_transform(vector(up_to,n,A365388aux(n)));
    A365388(n) = v365388[n];

A336936 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A007733(n), A329697(n), A331410(n)], for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 10, 4, 14, 8, 15, 1, 16, 9, 17, 5, 18, 10, 17, 3, 19, 11, 20, 6, 21, 12, 22, 2, 23, 13, 24, 7, 25, 10, 26, 4, 27, 14, 28, 8, 29, 15, 30, 1, 21, 16, 31, 9, 32, 17, 33, 5, 34, 18, 35, 10, 36, 17, 37, 3, 38, 19, 39, 11, 40, 20, 41, 6, 42, 21, 43, 12, 44, 22, 45, 2, 46, 23, 47, 13
Offset: 1

Views

Author

Antti Karttunen, Aug 11 2020

Keywords

Comments

Restricted growth sequence transform of the triplet [A007733(n), A329697(n), A331410(n)], or equally, of the ordered pair [A007733(n), A335880(n)].
For all i, j: A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

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; };
    A007733(n) = znorder(Mod(2, n/2^valuation(n, 2))); \\ From A007733
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    Aux336936(n) = [A007733(n), A329697(n), A331410(n)];
    v336936 = rgs_transform(vector(up_to, n, Aux336936(n)));
    A336936(n) = v336936[n];

A351454 Lexicographically earliest infinite sequence such that a(i) = a(j) => A006530(i) = A006530(j), A329697(i) = A329697(j) and A331410(i) = A331410(j) for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 9, 2, 10, 6, 11, 4, 12, 7, 13, 3, 14, 8, 15, 5, 16, 9, 17, 2, 18, 10, 19, 6, 20, 11, 21, 4, 22, 12, 23, 7, 24, 13, 25, 3, 26, 14, 27, 8, 28, 15, 29, 5, 30, 16, 31, 9, 32, 17, 33, 2, 34, 18, 35, 10, 36, 19, 37, 6, 38, 20, 39, 11, 40, 21, 41, 4, 42, 22, 43, 12, 44, 23, 45, 7, 46, 24, 47, 13, 48, 25, 49, 3, 50, 26, 51, 14, 52, 27, 53, 8, 54
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2022

Keywords

Comments

Restricted growth sequence transform of the triplet [A006530(n), A329697(n), A331410(n)], or equally, of the ordered pair [A006530(n), A335880(n)].
For all i, j >= 1: A324400(i) = A324400(j) => a(i) = a(j).

Examples

			a(99) = a(121) because 99 = 3^2 * 11 and 121 = 11^2, so they have equal largest prime factor (A006530), and they also agree on A329697(99) = A329697(121) = 4 and on A331410(99) = A331410(121) = 4, therefore they get equal value (which is 51) allotted to them by the restricted growth sequence transform. - _Antti Karttunen_, Feb 14 2022
		

Crossrefs

Cf. also A324400, A336936, A351453.
Differs from A351452 for the first time at n=49, where a(49) = 26, while A351452(49) = 19.
Differs from A351460 for the first time at n=121, where a(121) = 51, while A351460(121) = 62.
Differs from A103391(1+n) for the first time after n=1 at n=121, where a(121) = 51, while A103391(122) = 62.

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; };
    A006530(n) = if(1==n, n, my(f=factor(n)); f[#f~, 1]);
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    Aux351454(n) = [A006530(n), A329697(n), A331410(n)];
    v351454 = rgs_transform(vector(up_to, n, Aux351454(n)));
    A351454(n) = v351454[n];

A336161 Lexicographically earliest infinite sequence such that a(i) = a(j) => A087436(i) = A087436(j) and A335915(i) = A335915(j) for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 5, 2, 6, 3, 7, 1, 8, 4, 9, 3, 7, 5, 10, 2, 11, 6, 12, 3, 13, 7, 5, 1, 14, 8, 11, 4, 15, 9, 16, 3, 13, 7, 17, 5, 18, 10, 19, 2, 11, 11, 11, 6, 20, 12, 21, 3, 21, 13, 22, 7, 23, 5, 18, 1, 24, 14, 25, 8, 26, 11, 27, 4, 28, 15, 29, 9, 21, 16, 30, 3, 31, 13, 32, 7, 33, 17, 34, 5, 35, 18, 24, 10, 14, 19, 36, 2, 37, 11, 38, 11, 39, 11, 40, 6, 29
Offset: 1

Views

Author

Antti Karttunen, Jul 10 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A087436(n), A335915(n)].
For all i, j: A324400(i) = A324400(j) => a(i) = a(j) => A335904(i) = A335904(j).

Crossrefs

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; };
    A087436(n) = (bigomega(n>>valuation(n,2)));
    A000265(n) = (n>>valuation(n,2));
    A335915(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]-1)*A000265(f[k,1]+1))^f[k,2])); };
    Aux336161(n) = [A087436(n),A335915(n)];
    v336161 = rgs_transform(vector(up_to, n, Aux336161(n)));
    A336161(n) = v336161[n];

A336920 Lexicographically earliest infinite sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = [A329697(n), A331410(n), A336158(n)], for all i, j >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 6, 4, 7, 1, 8, 5, 9, 3, 10, 6, 11, 2, 12, 6, 13, 4, 14, 7, 15, 1, 16, 8, 16, 5, 14, 9, 16, 3, 17, 10, 18, 6, 19, 11, 20, 2, 21, 12, 22, 6, 14, 13, 23, 4, 24, 14, 25, 7, 11, 15, 26, 1, 23, 16, 25, 8, 27, 16, 18, 5, 28, 14, 29, 9, 27, 16, 18, 3, 30, 17, 9, 10, 31, 18, 32, 6, 28, 19, 27, 11, 33, 20, 32, 2, 17, 21, 34, 12, 28, 22, 9, 6, 35
Offset: 1

Views

Author

Antti Karttunen, Aug 10 2020

Keywords

Comments

Restricted growth sequence transform of the triplet [A329697(n), A331410(n), A336158(n)].
For all i, j:
A324400(i) = A324400(j) => A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A335880(i) = A335880(j),
a(i) = a(j) => A336391(i) = A336391(j),
a(i) = a(j) => A336471(i) = A336471(j).

Crossrefs

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; };
    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
    A336158(n) = A046523(A000265(n));
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    Aux336920(n) = [A329697(n), A331410(n), A336158(n)];
    v336920 = rgs_transform(vector(up_to, n, Aux336920(n)));
    A336920(n) = v336920[n];

A366380 Lexicographically earliest infinite sequence such that a(i) = a(j) => A336158(i) = A336158(j), A336466(i) = A336466(j) and A336467(i) = A336467(j) for all i, j >= 1, where A336466 is fully multiplicative with a(p) = oddpart(p-1) for any prime p and A336467 is fully multiplicative with a(2) = 1 and a(p) = oddpart(p+1) for odd primes, and A336158(n) gives the prime signature of the odd part of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 4, 1, 5, 3, 6, 2, 7, 4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20, 3, 21, 11, 22, 6, 23, 12, 24, 2, 25, 13, 26, 7, 27, 14, 28, 4, 29, 15, 30, 8, 31, 16, 32, 1, 33, 17, 34, 9, 35, 18, 36, 5, 37, 19, 38, 10, 39, 20, 40, 3, 41, 21, 42, 11, 43, 22, 44, 6, 45, 23, 46, 12, 47, 24, 48, 2, 49, 25, 50
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2023

Keywords

Comments

Restricted growth sequence transform of the triplet [A336158(n), A336466(n), A336467(n)].
For all i, j >= 1:
A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A366381(i) = A366381(j),
a(i) = a(j) => A335880(i) = A335880(j),
a(i) = a(j) => A336390(i) = A336390(j),
a(i) = a(j) => A336470(i) = A336470(j).

Crossrefs

Differs from A003602 and A351090 for the first time at n=153, where a(153) = 38, while A003602(153) = A351090(153) = 77.
Differs from A365388 for the first time at n=99, where a(99) = 50, while A365388(99) = 41.

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; };
    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
    A336158(n) = A046523(A000265(n));
    A336466(n) = { my(f=factor(n)); prod(k=1, #f~, A000265(f[k, 1]-1)^f[k, 2]); };
    A336467(n) = { my(f=factor(n)); prod(k=1,#f~,if(2==f[k,1],1,(A000265(f[k,1]+1))^f[k,2])); };
    A366380aux(n) = [A336158(n), A336466(n), A336467(n)];
    v366380 = rgs_transform(vector(up_to,n,A366380aux(n)));
    A366380(n) = v366380[n];
Showing 1-10 of 10 results.