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

A267099 Fully multiplicative involution swapping the positions of 4k+1 and 4k+3 primes: a(1) = 1; a(prime(k)) = A267101(k), a(x*y) = a(x)*a(y) for x, y > 1.

Original entry on oeis.org

1, 2, 5, 4, 3, 10, 13, 8, 25, 6, 17, 20, 7, 26, 15, 16, 11, 50, 29, 12, 65, 34, 37, 40, 9, 14, 125, 52, 19, 30, 41, 32, 85, 22, 39, 100, 23, 58, 35, 24, 31, 130, 53, 68, 75, 74, 61, 80, 169, 18, 55, 28, 43, 250, 51, 104, 145, 38, 73, 60, 47, 82, 325, 64, 21, 170, 89, 44, 185, 78, 97, 200, 59, 46, 45, 116, 221, 70, 101
Offset: 1

Views

Author

Antti Karttunen, Feb 01 2016

Keywords

Comments

Lexicographically earliest self-inverse permutation of natural numbers where each prime of the form 4k+1 is replaced by a prime of the form 4k+3 and vice versa, with the composite numbers determined by multiplicativity.
Fully multiplicative with a(p_n) = p_{A267100(n)} = A267101(n).
Maps each term of A004613 to some term of A004614, each (nonzero) term of A001481 to some term of A268377 and each term of A004431 to some term of A268378 and vice versa.
Sequences A072202 and A078613 are closed with respect to this permutation.

Crossrefs

Cf. A000035, A000040, A000720, A010051, A020639, A032742, A267100, A267101, A354102 (Möbius transform), A354103 (inverse Möbius transform), A354192 (fixed points).
Cf. also A108548.

Programs

  • PARI
    up_to = 2^16;
    A267097list(up_to) = { my(v=vector(up_to),i=0,c=0); forprime(p=2,prime(up_to), if(1==(p%4), c++); i++; v[i] = c); (v); };
    v267097 = A267097list(up_to);
    A267097(n) = v267097[n];
    A267098(n) = ((n-1)-A267097(n));
    list_primes_of_the_form(up_to,m,k) = { my(v=vector(up_to),i=0); forprime(p=2,, if(k==(p%m), i++; v[i] = p; if(i==up_to,return(v)))); };
    v002144 = list_primes_of_the_form(2*up_to,4,1);
    A002144(n) = v002144[n];
    v002145 = list_primes_of_the_form(2*up_to,4,3);
    A002145(n) = v002145[n];
    A267101(n) = if(1==n,2,if(1==(prime(n)%4),A002145(A267097(n)),A002144(A267098(n))));
    A267099(n) = { my(f=factor(n)); for(k=1,#f~,f[k,1] = A267101(primepi(f[k,1]))); factorback(f); }; \\ Antti Karttunen, May 18 2022
    (Scheme, with memoization-macro definec)
    (definec (A267099 n) (cond ((<= n 1) n) ((= 1 (A010051 n)) (A267101 (A000720 n))) (else (* (A267099 (A020639 n)) (A267099 (A032742 n))))))

Formula

a(1) = 1; after which, if n is k-th prime [= A000040(k)], then a(n) = A267101(k), otherwise a(A020639(n)) * a(A032742(n)).
Other identities. For all n >= 1:
a(A000040(n)) = A267101(n).
a(2*n) = 2*a(n).
a(3*n) = 5*a(n).
a(5*n) = 3*a(n).
a(7*n) = 13*a(n).
a(11*n) = 17*a(n).
etc. See examples in A267101.
A000035(n) = A000035(a(n)). [Preserves the parity of n.]
A005094(a(n)) = -A005094(n).
A079635(a(n)) = -A079635(n).

Extensions

Verbal description prefixed to the name by Antti Karttunen, May 19 2022

A354102 a(n) = phi(A267099(n)), where A267099 is fully multiplicative involution swapping the positions of 4k+1 and 4k+3 primes, and phi is Euler totient function.

Original entry on oeis.org

1, 1, 4, 2, 2, 4, 12, 4, 20, 2, 16, 8, 6, 12, 8, 8, 10, 20, 28, 4, 48, 16, 36, 16, 6, 6, 100, 24, 18, 8, 40, 16, 64, 10, 24, 40, 22, 28, 24, 8, 30, 48, 52, 32, 40, 36, 60, 32, 156, 6, 40, 12, 42, 100, 32, 48, 112, 18, 72, 16, 46, 40, 240, 32, 12, 64, 88, 20, 144, 24, 96, 80, 58, 22, 24, 56, 192, 24, 100, 16, 500
Offset: 1

Views

Author

Antti Karttunen, May 18 2022

Keywords

Crossrefs

Möbius transform of A267099.
Cf. A000720, A008683, A267101, A354101, A354103, A354104 (Dirichlet inverse), A354105 (sum with it), A354106, A354107 (a(n) mod 4), A354190, A354191.
Coincides with A000010 on A354189.

Programs

Formula

Multiplicative with a(p^e) = (q-1) * q^(e-1), where q = A267101(A000720(p)).
a(n) = A000010(A267099(n)).
a(n) = Sum_{d|n} A008683(n/d) * A267099(d).
a(n) = A354101(n) + A000010(n) = A354190(n) - A354191(n).
For all n >= 0, a(4n+2) = a(2n+1).
Showing 1-2 of 2 results.