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

A332214 Mersenne-prime fixing variant of permutation A163511: a(n) = A332212(A163511(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 7, 16, 27, 18, 49, 12, 21, 14, 5, 32, 81, 54, 343, 36, 147, 98, 25, 24, 63, 42, 35, 28, 15, 10, 31, 64, 243, 162, 2401, 108, 1029, 686, 125, 72, 441, 294, 175, 196, 75, 50, 961, 48, 189, 126, 245, 84, 105, 70, 155, 56, 45, 30, 217, 20, 93, 62, 11, 128, 729, 486, 16807, 324, 7203, 4802, 625, 216, 3087, 2058, 875
Offset: 0

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Comments

Any Mersenne prime (A000668) times any power of 2, i.e., sequence A335431, is fixed by this map (note the indexing), including also all even perfect numbers. It is not currently known whether there are any additional fixed points.
Because a(n) has the same prime signature as A163511(n), it implies that applying A046523 and A052409 to this sequence gives the same results as with A163511, namely, sequences A278531 and A365805. - Antti Karttunen, Oct 09 2023

Crossrefs

Cf. A163511, A332211, A332212, A332215 (inverse permutation).
Cf. A278531 [= A046523(a(n))], A290251 [= A001222(a(n))], A365805 [= A052409(a(n))], A366372 [= a(n)-n], A366373 [= gcd(n,a(n))], A366374 (numerator of n/a(n)), A366375 (denominator of n/a(n)), A366376.
Cf. A000043, A000668, A000396, A324200, A335431 (conjectured to give all the fixed points).

Programs

  • PARI
    A332214(n) = A332212(A163511(n));
    
  • PARI
    \\ Needs precomputed data for A332211:
    v332211 = readvec("b332211_to.txt"); \\ Prepared with gawk ' { print $2 } ' < b332211.txt > b332211_to.txt
    A332211(n) = v332211[n];
    A332214(n) = if(!n, 1, my(i=1, p=A332211(i), t=1); while(n>1, if(!(n%2), (t*=p), i++; p=A332211(i)); n >>= 1); (t*p)); \\ Antti Karttunen, Oct 09 2023

Formula

a(n) = A332212(A163511(n)).

A364259 a(n) = A331410(A332212(n)).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 2, 0, 2, 1, 1, 1, 2, 2, 2, 0, 1, 2, 2, 1, 3, 1, 3, 1, 2, 2, 3, 2, 3, 2, 2, 0, 2, 1, 3, 2, 4, 2, 3, 1, 1, 3, 4, 1, 3, 3, 3, 1, 4, 2, 2, 2, 3, 3, 2, 2, 3, 3, 1, 2, 2, 2, 4, 0, 3, 2, 1, 1, 4, 3, 4, 2, 4, 4, 3, 2, 3, 3, 2, 1, 4, 1, 4, 3, 2, 4, 4, 1, 3, 3, 4, 3, 3, 3, 3, 1, 5, 4, 3, 2, 3, 2, 3, 2, 4
Offset: 1

Views

Author

Antti Karttunen, Jul 16 2023

Keywords

Comments

Fully additive because A332212 is fully multiplicative and A331410 is fully additive.

Crossrefs

Cf. A000079 (positions of 0's), A331410, A332212, A364260.

A108548 Fully multiplicative with a(prime(j)) = A108546(j), where A108546 is the lexicographically earliest permutation of primes such that after 2 the forms 4*k+1 and 4*k+3 alternate, and prime(j) is the j-th prime in A000040.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 12, 11, 14, 15, 16, 17, 18, 19, 20, 21, 26, 29, 24, 25, 22, 27, 28, 23, 30, 37, 32, 39, 34, 35, 36, 31, 38, 33, 40, 41, 42, 43, 52, 45, 58, 53, 48, 49, 50, 51, 44, 47, 54, 65, 56, 57, 46, 61, 60, 59, 74, 63, 64, 55, 78, 73, 68, 87, 70, 67, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2005

Keywords

Comments

Multiplicative with a(2^e) = 2^e, else if p is the m-th prime then a(p^e) = q^e where q is the m/2-th prime of the form 4*k + 3 (A002145) for even m and a(p^e) = r^e where r is the (m-1)/2-th prime of the form 4*k + 1 (A002144) for odd m. - David A. Corneth, Apr 25 2022
Permutation of the natural numbers with fixed points A108549: a(A108549(n)) = A108549(n).

Crossrefs

Cf. A002144, A002145, A049084, A108546, A108549 (fixed points), A332808 (inverse permutation).
Cf. also A332815, A332817 (this permutation applied to Doudna tree and its mirror image), also A332818, A332819.
Cf. also A267099, A332212 and A348746 for other similar mappings.

Programs

  • Mathematica
    terms = 72;
    A111745 = Module[{prs = Prime[Range[2 terms]], m3, m1, min},
         m3 = Select[prs, Mod[#, 4] == 3&];
         m1 = Select[prs, Mod[#, 4] == 1&];
         min = Min[Length[m1], Length[m3]];
         Riffle[Take[m3, min], Take[m1, min]]];
    A108546[n_] := If[n == 1, 2, A111745[[n - 1]]];
    A049084[n_] := PrimePi[n]*Boole[PrimeQ[n]];
    a[n_] := If[n == 1, 1, Module[{p, e}, Product[{p, e} = pe; A108546[A049084[p]]^e, {pe, FactorInteger[n]}]]];
    Array[a, terms] (* Jean-François Alcover, Nov 19 2021, using Harvey P. Dale's code for A111745 *)
  • PARI
    up_to = 26927; \\ One of the prime fixed points.
    A108546list(up_to) = { my(v=vector(up_to), p,q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4,up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); (v); };
    v108546 = A108546list(up_to);
    A108546(n) = v108546[n];
    A108548(n) = { my(f=factor(n)); f[,1] = apply(A108546,apply(primepi,f[,1])); factorback(f); }; \\ Antti Karttunen, Apr 25 2022

Extensions

Name edited by Antti Karttunen, Apr 25 2022

A332211 Lexicographically earliest permutation of primes such that a(n) = 2^n - 1 when n is one of the Mersenne prime exponents (in A000043).

Original entry on oeis.org

2, 3, 7, 5, 31, 11, 127, 13, 17, 19, 23, 29, 8191, 37, 41, 43, 131071, 47, 524287, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 2147483647, 103, 107, 109, 113, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 2305843009213693951, 269, 271, 277, 281, 283, 293, 307, 311, 313
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Comments

Sequence is well-defined also in case there are only a finite number of Mersenne primes.

Examples

			For p in A000043: 2, 3, 5, 7, 13, 17, 19, ..., a(p) = (2^p)-1, thus a(2) = 2^2 - 1 = 3, a(3) = 7, a(5) = 31, a(7) = 127, a(13) = 8191, a(17) = 131071, etc., with the rest of positions filled by the least unused prime:
1, 2, 3, 4,  5,  6,   7,  8,  9, 10, 11, 12,   13, 14, 15, 16, 17, ...
2, 3, 7, 5, 31, 11, 127, 13, 17, 19, 23, 29, 8191, 37, 41, 43, 131071, ...
		

Crossrefs

Cf. A000040, A000043, A000668, A332210 (inverse permutation of primes), A332220.
Used to construct permutations A332212, A332214.

Programs

  • PARI
    up_to = 127;
    A332211list(up_to) = { my(v=vector(up_to), xs=Map(), i=1, q); for(n=1,up_to, if(isprime(q=((2^n)-1)), v[n] = q, while(mapisdefined(xs,prime(i)), i++); v[n] = prime(i)); mapput(xs,v[n],n)); (v); };
    v332211 = A332211list(up_to);
    A332211(n) = v332211[n];
    \\ For faster computing of larger values, use precomputed values of A000043:
    v000043 = [2,3,5,7,13,17,19,31,61,89,107,127,521,607,1279,2203,2281,3217];
    up_to = v000043[#v000043];
    A332211list(up_to) = { my(v=vector(up_to), xs=Map(), i=1, q); for(n=1,up_to, if(vecsearch(v000043,n), q = (2^n)-1, while(mapisdefined(xs,prime(i)), i++); q = prime(i)); v[n] = q; mapput(xs,q,n)); (v); };

Formula

For all applicable n >= 1, a(A000043(n)) = A000668(n).

A332213 Fully multiplicative with a(p) = A332210(A000720(p)).

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 13, 12, 19, 10, 21, 16, 23, 18, 29, 28, 15, 26, 31, 24, 49, 38, 27, 20, 37, 42, 11, 32, 39, 46, 35, 36, 43, 58, 57, 56, 47, 30, 53, 52, 63, 62, 61, 48, 25, 98, 69, 76, 71, 54, 91, 40, 87, 74, 73, 84, 79, 22, 45, 64, 133, 78, 83, 92, 93, 70, 89, 72, 97, 86, 147, 116, 65, 114, 101, 112, 81, 94, 103, 60, 161, 106, 111
Offset: 1

Views

Author

Antti Karttunen, Feb 09 2020

Keywords

Crossrefs

Cf. A000043, A000668, A000720, A332210, A332212 (inverse permutation), A332215.

Programs

  • PARI
    \\ Needs also code from A332210:
    A332213(n) = { my(f=factor(n)); f[,1] = apply(A332210,apply(primepi,f[,1])); factorback(f); };

Formula

a(1) = 1, a(p^e) = A332210(A000720(p))^e, a(m*n) = a(m)*a(n).
Showing 1-5 of 5 results.