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.

A269853 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A064216(n)).

This page as a plain text file.
%I A269853 #10 Mar 25 2016 07:46:53
%S A269853 1,2,3,4,5,6,7,8,11,10,9,12,15,14,19,16,13,22,31,20,27,18,21,24,63,30,
%T A269853 23,28,17,38,43,32,35,26,29,44,39,62,87,40,37,54,79,36,75,42,25,48,
%U A269853 159,126,127,60,61,46,51,56,55,34,53,76,123,86,107,64,41,70,71,52,247,58,125,88,143,78,251,124,45,174,59,80,287,74,33
%N A269853 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A064216(n)).
%H A269853 Antti Karttunen, <a href="/A269853/b269853.txt">Table of n, a(n) for n = 1..8192</a>
%H A269853 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A269853 a(1) = 1, after which for even n, a(n) = 2*a(n/2), for odd n, a(n) = 1 + 2*a(A064989(n-2)).
%t A269853 a[1] = 1; a[n_] := a[n] = If[EvenQ@ n, 2 a[n/2], 1 + 2 a[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[(n - 1) - 1]]]; Table[a@ n, {n, 83}] (* _Michael De Vlieger_, Mar 23 2016 *)
%o A269853 (Scheme, with memoization-macro definec)
%o A269853 (definec (A269853 n) (cond ((= 1 n) n) ((even? n) (* 2 (A269853 (/ n 2)))) (else (+ 1 (* 2 (A269853 (A064216 (/ (- n 1) 2))))))))
%Y A269853 Inverse: A269854.
%Y A269853 Cf. A003961, A064216, A064989, A243071, A246376.
%K A269853 nonn
%O A269853 1,2
%A A269853 _Antti Karttunen_, Mar 16 2016