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.

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

This page as a plain text file.
%I A302850 #5 Apr 26 2018 17:43:21
%S A302850 1,2,3,5,4,9,7,21,12,15,6,39,13,25,31,37,8,69,19,55,28,17,11,129,14,
%T A302850 45,51,53,10,99,16,235,61,49,73,145,33,35,18,95,24,97,43,111,70,81,27,
%U A302850 399,46,79,57,141,23,237,48,285,64,85,36,309,22,105,271,209,59,183,63,165,88,225,40,415,20,67,241,117,139,243,75,559,154,29,41,489,84,133
%N A302850 Permutation of natural numbers: a(1) = 1; a(2) = 2; for n > 2, a(n) = 2+A064989(A003961(n)-4).
%H A302850 Antti Karttunen, <a href="/A302850/b302850.txt">Table of n, a(n) for n = 1..20000</a>
%H A302850 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%H A302850 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F A302850 a(1) = 1; a(2) = 2; for n > 2, a(n) = 2+A064989(A003961(n)-4).
%o A302850 (PARI)
%o A302850 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
%o A302850 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 A302850 A302850(n) = if(n<=2,n,2+A064989(A003961(n)-4));
%Y A302850 Cf. A302849 (inverse).
%Y A302850 Cf. A003961, A064989, A302848.
%K A302850 nonn
%O A302850 1,2
%A A302850 _Antti Karttunen_, Apr 26 2018