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-6 of 6 results.

A366264 Inverse of A366263, where A366263 is the Doudna sequence permuted by Blue code.

Original entry on oeis.org

0, 1, 3, 2, 5, 4, 15, 7, 6, 14, 17, 13, 51, 16, 12, 8, 85, 11, 255, 19, 18, 50, 257, 22, 10, 84, 9, 49, 771, 21, 1285, 25, 48, 254, 20, 28, 3855, 256, 86, 52, 4369, 55, 13107, 87, 23, 770, 21845, 59, 30, 31, 252, 253, 65535, 26, 54, 82, 258, 1284, 65537, 62, 196611, 3854, 53, 42, 80, 81, 327685, 259, 768, 61, 983055
Offset: 1

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Crossrefs

Cf. A156552, A193231, A366263 (inverse map).

Programs

  • PARI
    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}; \\ From A156552
    A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) };
    A366264(n) = A193231(A156552(n));

Formula

a(n) = A193231(A156552(n)).
For all n >= 0, a(A366263(n)) = n, and for all n >= 1, A366263(a(n)) = n.
For all n >= 2, 1+A268389(a(n)) = A055396(n).

A368900 LCM-transform of Doudna sequence.

Original entry on oeis.org

1, 2, 3, 2, 5, 1, 3, 2, 7, 1, 1, 1, 5, 1, 3, 2, 11, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 2, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 2, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Let's define "property S" for sequences as follows: If s is any sequence of positive natural numbers, normalized to begin with offset 1, then it satisfies the S-property if LCM-transform(s) is equal to the sequence obtained by applying A014963 to sequence s, or in other words, when for all n >= 1, lcm {s(1)..s(n)} / lcm {s(1)..s(n-1)} = A014963(s(n)). This holds if and only if, for all n >= 1, when, either (case A): s(n) is of the form p^k, p prime, then gcd(s(n), lcm {s(1)..s(n-1)}) must be equal to p^(k-1), or (case B): when s(n) is not a prime power, then gcd(s(n), lcm {s(1)..s(n-1)}) must be equal to s(n). Together the cases (A) and (B) reduce to the condition that each prime power should appear in s before any of its multiples do.
Clearly the Doudna-sequence satisfies the property by the way of its construction, as do many of its variants like A356867 (see A369060).
Also, for any base-2 related permutation b that keeps all the numbers of range [2^k, 2^(1+k)[ in the same range, i.e., if for all n >= 1, A000523(b(n)) = A000523(n), then the above property is automatically satisfied.
Furthermore, because in Doudna-sequence no multiple of any term is located on the same row as the term itself (see the tree-illustration in A005940), it follows that any composition of A005940 with any such base-2 related permutation as mentioned above also automatically satisfies the S-property, for example, the permutations A163511, A243353, A253563, A253565, A366260, A366263 and A366275.
Note: Like A005940 itself, also this sequence might be more logical with the starting offset 0 instead of 1, to better align with the underlying mapping from the binary expansion of n to the prime factorization. - Antti Karttunen, Jan 24 2024

Crossrefs

List of LCM-transforms of permutations (permutation given in parentheses):
Cf. A265576 (A064413; note that the EKG sequence permutation does not satisfy the S-property).
In all following cases, the permutation satisfies the S-property:
Cf. A369041 (A003188), A369042 (A006068), A369043 (A193231), A369044 (A057889), A369041 (A054429). [Base-2 related permutations]
Other permutations that have the same property: A303767, (and when used as an offset=1 sequence): A052330.

Programs

  • Mathematica
    nn = 120; Array[Set[{s[#], a[#]}, {#, #}] &, 2]; j = 2;
    Do[If[EvenQ[n],
      Set[s[n], 2 s[n/2]],
      Set[s[n],
        Times @@ Power @@@ Map[{Prime[PrimePi[#1] + 1], #2} & @@ # &,
          FactorInteger[s[(n + 1)/2]]]]];
      k = LCM[j, s[n]]; a[n] = k/j; j = k, {n, 3, nn}];
    Array[a, nn] (* Michael De Vlieger, Mar 24 2024 *)
  • PARI
    up_to = 16384;
    LCMtransform(v) = { my(len = length(v), b = vector(len), g = vector(len)); b[1] = g[1] = 1; for(n=2,len, g[n] = lcm(g[n-1],v[n]); b[n] = g[n]/g[n-1]); (b); };
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t) };
    v368900 = LCMtransform(vector(up_to,i,A005940(i)));
    A368900(n) = v368900[n];
    
  • PARI
    A000265(n) = (n>>valuation(n,2));
    A209229(n) = (n && !bitand(n,n-1));
    A368900(n)  = if(1==n, 1, my(x=A000265(n-1)); if(A209229(1+x), prime(1+valuation(n-1,2)), 1));

Formula

a(n) = A368901(n) / A368901(n-1) = lcm {1..A005940(n)} / lcm {1..A005940(n-1)}.
a(n) = A005940(n) / gcd(A005940(n), A368901(n-1)).
a(n) = A014963(A005940(n)). [Because A005940 satisfies the property given in the comments]
For n >= 1, Product_{d|n} a(A005941(d)) = n. [Implied by above]
For n >= 1, a(n) = A369030(1+A054429(n-1)).
For n > 1, if n-1 is a number of the form 2^i - 2^j with i >= j, then a(n) = prime(1+j), otherwise a(n) = 1.

A366275 The Cat's tongue permutation: a(n) = A163511(A057889(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 5, 16, 27, 18, 15, 12, 25, 10, 7, 32, 81, 54, 45, 36, 75, 30, 21, 24, 125, 50, 35, 20, 49, 14, 11, 64, 243, 162, 135, 108, 225, 90, 63, 72, 375, 150, 105, 60, 147, 42, 33, 48, 625, 250, 175, 100, 245, 70, 55, 40, 343, 98, 77, 28, 121, 22, 13, 128, 729, 486, 405, 324, 675, 270, 189, 216, 1125
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Comments

"Cat's tongue" refers to the look of the scatter plot of this sequence.

Crossrefs

Cf. A000040, A000225, A007814, A057889, A163511, A209229, A290251, A366276 (inverse map), A366277 (fixed points of map n -> a(n)), A366278, A366279, A366280, A366281 [= A052409(a(n))], A366282 [= a(n)-n], A366283 [= gcd(n,a(n))].
Cf. also A163511, A253563, A366263 (compare the scatter plots).

Programs

  • PARI
    A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2)));
    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));
    A366275(n) = A163511(A057889(n));
    
  • Python
    from sympy import prime
    def A366275(n):
        if n:
            k, c, m = int(bin(n>>(r:=(~n & n-1).bit_length()))[:1:-1],2)<>= s+1
            return m*prime(c)
        return 1 # Chai Wah Wu, Oct 08 2023

Formula

For n >= 0, A001222(a(n)) = A290251(n).
For n >= 1, A007814(a(n)) = A135523(n) = A007814(n) + A209229(n). [Like A163511, also this permutation preserves the 2-adic valuation of n, except when n is a power of two, in which cases that value is incremented by one.]
For n >= 1, a(2*n) = 2*a(n).
For n >= 1, a(A000225(n)) = A000040(n).

A332450 Self-inverse permutation of natural numbers, "Blue code" conjugated by A156552 and its inverse: a(n) = A005940(1+A193231(A156552(n))).

Original entry on oeis.org

1, 2, 4, 3, 6, 5, 16, 8, 9, 27, 14, 18, 100, 11, 25, 7, 210, 12, 256, 20, 21, 147, 38, 45, 15, 385, 10, 98, 1156, 30, 1938, 50, 121, 2187, 35, 125, 234256, 23, 315, 245, 6902, 72, 3496900, 120, 24, 1083, 9699690, 108, 81, 32, 15625, 1458, 65536, 75, 225, 231, 57, 2185, 106, 243, 8836, 771147, 150, 105, 143, 154, 14946, 68, 529, 162
Offset: 1

Views

Author

Antti Karttunen, Feb 15 2020

Keywords

Crossrefs

Cf. A293448 (A057889 similarly conjugated).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A156552(n) = {my(f = factor(n), 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}; \\ From A156552
    A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) }; \\ From A193231
    A332450(n) = A005940(1+A193231(A156552(n)));

Formula

a(n) = A005940(1+A193231(A156552(n))).
a(A003961(n)) = A332451(a(n)); a(A332451(n)) = A003961(a(n)).
a(n) = A366263(A156552(n)). - Antti Karttunen, Oct 06 2023

A366260 Doudna sequence permuted by May code: a(n) = A005940(1+A303767(n)).

Original entry on oeis.org

1, 2, 4, 3, 9, 5, 6, 8, 16, 7, 10, 12, 15, 27, 25, 18, 54, 11, 14, 20, 21, 45, 35, 30, 24, 32, 49, 50, 36, 75, 81, 125, 625, 13, 22, 28, 33, 63, 55, 42, 40, 48, 77, 70, 60, 105, 135, 175, 90, 162, 121, 98, 100, 147, 225, 245, 150, 72, 64, 343, 250, 108, 375, 243, 729, 17, 26, 44, 39, 99, 65, 66, 56, 80, 91, 110
Offset: 0

Views

Author

Antti Karttunen, Oct 05 2023

Keywords

Crossrefs

Programs

A365810 Squareferee numbers ordered factorization-wise by Blue code: a(n) = A019565(A193231(n)).

Original entry on oeis.org

1, 2, 6, 3, 10, 5, 15, 30, 210, 105, 35, 70, 21, 42, 14, 7, 22, 11, 33, 66, 55, 110, 330, 165, 1155, 2310, 770, 385, 462, 231, 77, 154, 858, 429, 143, 286, 2145, 4290, 1430, 715, 5005, 10010, 30030, 15015, 2002, 1001, 3003, 6006, 39, 78, 26, 13, 390, 195, 65, 130, 910, 455, 1365, 2730, 91, 182, 546, 273, 1870, 935
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Crossrefs

Permutation of A005117.
Cf. also A366263.

Programs

  • PARI
    A019565(n) = { my(m=1, p=1); while(n>0, p = nextprime(1+p); if(n%2, m *= p); n >>= 1); (m); };
    A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) };
    A365810(n) = A019565(A193231(n));

Formula

a(n) = A334205(A019565(n)).
Showing 1-6 of 6 results.