login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A245822
Permutation of natural numbers: a(n) = A245704(A091204(n)).
9
1, 2, 3, 4, 5, 8, 7, 9, 6, 16, 11, 10, 19, 33, 12, 25, 17, 15, 23, 34, 39, 70, 13, 24, 26, 50, 21, 52, 53, 18, 31, 55, 77, 93, 54, 22, 29, 27, 66, 105, 67, 48, 137, 156, 30, 28, 37, 64, 91, 35, 85, 58, 97, 49, 40, 98, 36, 135, 59, 45, 47, 261, 56, 76, 92, 122, 83, 374, 38, 102, 139, 69, 167, 130, 88, 203, 351, 212, 349, 235, 14
OFFSET
1,2
FORMULA
a(n) = A245704(A091204(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].
A245816(n) = A062298(a(A018252(n))). [While restriction to nonprimes induces another permutation].
PROG
(PARI)
allocatemem(123456789);
default(primelimit, 2^22)
v014580 = vector(2^18); A014580(n) = v014580[n];
v091226 = vector(2^22); A091226(n) = v091226[n];
A002808(n)={ my(k=-1); while( -n + n += -k + k=primepi(n), ); n}; \\ This function from M. F. Hasler
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, v091226[n] = v091226[n-1]); n++)
A091204(n) = if(n<=1, n, if(isprime(n), A014580(A091204(primepi(n))), {my(pfs, t, bits, i); pfs=factor(n); pfs[, 1]=apply(t->Pol(binary(A091204(t))), pfs[, 1]); sum(i=1, #bits=Vec(factorback(pfs))%2, bits[i]<<(#bits-i))}));
A091245(n) = ((n-A091226(n))-1);
A245704(n) = if(1==n, 1, if(isA014580(n), prime(A245704(A091226(n))), A002808(A245704(A091245(n)))));
for(n=1, 10001, write("b245822.txt", n, " ", A245822(n)));
(Scheme) (define (A245822 n) (A245704 (A091204 n)))
CROSSREFS
Inverse: A245821.
Other related permutations: A091204, A245704, A245816.
Fixed points: A245823.
Sequence in context: A080785 A319605 A352047 * A357260 A069797 A158979
KEYWORD
nonn
AUTHOR
Antti Karttunen, Aug 02 2014
STATUS
approved