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.

A245821 Permutation of natural numbers: a(n) = A091205(A245703(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 7, 6, 8, 12, 11, 15, 23, 81, 18, 10, 17, 30, 13, 162, 27, 36, 19, 24, 16, 25, 38, 46, 37, 45, 31, 135, 14, 20, 50, 57, 47, 69, 21, 55, 83, 115, 419, 87, 60, 210, 61, 42, 54, 26, 90, 28, 29, 35, 32, 63, 171, 52, 59, 138, 113, 180, 111, 48, 88, 39, 41, 621, 72, 22, 953, 230, 103, 207, 126, 64, 33, 243
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2014

Keywords

Crossrefs

Inverse: A245822.
Other related permutations: A091205, A245703, A245815.
Fixed points: A245823.

Programs

  • PARI
    allocatemem(234567890);
    v014580 = vector(2^18);
    v091226 = vector(2^22);
    v091242 = vector(2^22);
    isA014580(n)=polisirreducible(Pol(binary(n))*Mod(1, 2)); \\ This function from Charles R Greathouse IV
    i=0; j=0; n=2; while((n < 2^22), if(isA014580(n), i++; v014580[i] = n; v091226[n] = v091226[n-1]+1, j++; v091242[j] = n; v091226[n] = v091226[n-1]); n++);
    A014580(n) = v014580[n];
    A091226(n) = v091226[n];
    A091242(n) = v091242[n];
    A091205(n) = if(n<=1, n, if(isA014580(n), prime(A091205(A091226(n))), {my(irfs, t); irfs=subst(lift(factor(Mod(1, 2)*Pol(binary(n)))), x, 2); irfs[,1]=apply(t->A091205(t), irfs[,1]); factorback(irfs)}));
    A245703(n) = if(1==n, 1, if(isprime(n), A014580(A245703(primepi(n))), A091242(A245703(n-primepi(n)-1))));
    A245821(n) = A091205(A245703(n));
    for(n=1, 10001, write("b245821.txt", n, " ", A245821(n)));
    
  • Scheme
    (define (A245821 n) (A091205 (A245703 n)))

Formula

a(n) = A091205(A245703(n)).
Other identities. For all n >= 1, the following holds:
A078442(a(n)) = A078442(n), A049076(a(n)) = A049076(n). [Preserves "the order of primeness of n"].
a(p_n) = p_{a(n)} where p_n is the n-th prime, A000040(n).
a(n) = A049084(a(A000040(n))). [Thus the same permutation is induced also when it is restricted to primes].
A245815(n) = A062298(a(A018252(n))). [While restriction to nonprimes induces another permutation].