The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A302849 Permutation of natural numbers: a(1) = 1, a(2) = 2; for n > 2, a(n) = A064989(4+A003961(n-2)). 3

%I

%S 1,2,3,5,4,11,7,17,6,29,23,9,13,25,10,31,22,39,19,73,8,61,53,41,14,

%T 137,47,21,82,101,15,107,37,187,38,59,16,227,12,71,83,191,43,121,26,

%U 49,173,55,34,401,27,149,28,151,20,373,51,205,65,89,33,161,67,57,116,727,74,197,18,45,139,129,35,445,79,113,158,199,50,155,46,569,403,85,58

%N Permutation of natural numbers: a(1) = 1, a(2) = 2; for n > 2, a(n) = A064989(4+A003961(n-2)).

%H Antti Karttunen, <a href="/A302849/b302849.txt">Table of n, a(n) for n = 1..20000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(1) = 1, a(2) = 2; for n > 2, a(n) = A064989(4+A003961(n-2)).

%o (PARI)

%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961

%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};

%o A302849(n) = if(n<=2,n,A064989(4+A003961(n-2)));

%Y Cf. A302850 (inverse).

%Y Cf. A003961, A064989, A302847.

%K nonn

%O 1,2

%A _Antti Karttunen_, Apr 26 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 14 13:50 EDT 2021. Contains 343884 sequences. (Running on oeis4.)