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.
%I A297165 #13 Dec 23 2024 14:53:45 %S A297165 1,2,3,4,5,6,9,10,7,8,15,14,25,22,21,12,11,26,27,34,35,20,33,38,49,18, %T A297165 39,16,55,46,45,58,13,28,51,30,125,62,57,44,77,74,63,82,65,24,69,86, %U A297165 121,50,75,52,85,94,81,42,91,68,87,106,175,118,93,40,17,66,99,122,95,76,105,134,343,142,111,36,115,70,117,146,143,32 %N A297165 Permutation of natural numbers: a(n) = A005940(2+A156552(n)), a(0) = 1. %C A297165 Note the indexing: although the domain starts from 0, the range excludes zero. %H A297165 Antti Karttunen, <a href="/A297165/b297165.txt">Table of n, a(n) for n = 0..10000</a> %H A297165 David Newman, et al, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2018-January/018239.html">New sequences from old, Discussion on SeqFan-mailing list</a>, January 2018. %H A297165 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %H A297165 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %H A297165 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %F A297165 a(0) = 1; for n > 1, a(n) = A005940(2+A156552(n)). %o A297165 (PARI) %o A297165 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A297165 A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res }; %o A297165 A297165(n) = if(!n,1,A005940(2+A156552(n))); \\ _Antti Karttunen_, Feb 15 2021 %o A297165 (Scheme) (define (A297165 n) (if (zero? n) 1 (A005940 (+ 2 (A156552 n))))) %Y A297165 Inverse: A297166. %Y A297165 Cf. A005940, A156552. %Y A297165 Cf. also A297163. %Y A297165 Row/column 2 of A341510 (from the term 2 onward). %K A297165 nonn %O A297165 0,2 %A A297165 _Antti Karttunen_, Jan 05 2018