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.

A102568 a(n+1) = if a(n-1)=a(n)-1 then 2*a(n) else smallest number not occurring earlier; a(1)=1, a(2)=2.

This page as a plain text file.
%I A102568 #9 Sep 08 2015 15:16:30
%S A102568 1,2,4,3,5,6,12,7,8,16,9,10,20,11,13,14,28,15,17,18,36,19,21,22,44,23,
%T A102568 24,48,25,26,52,27,29,30,60,31,32,64,33,34,68,35,37,38,76,39,40,80,41,
%U A102568 42,84,43,45,46,92,47,49,50,100,51,53,54,108,55,56,112,57,58,116,59,61
%N A102568 a(n+1) = if a(n-1)=a(n)-1 then 2*a(n) else smallest number not occurring earlier; a(1)=1, a(2)=2.
%C A102568 Permutation of the natural numbers with inverse A102569;
%C A102568 a(n) <= 2*n; a(n) <> n for n>6;
%C A102568 A102570(n) = a(a(n)).
%H A102568 Ivan Neretin, <a href="/A102568/b102568.txt">Table of n, a(n) for n = 1..10000</a>
%H A102568 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%t A102568 Nest[Append[#, If[#[[-1]] == #[[-2]] + 1, 2 #[[-1]], Min[Complement[Range[Max[#] + 1], #]]]] &, {1, 2}, 69] (* _Ivan Neretin_, Sep 08 2015 *)
%K A102568 nonn
%O A102568 1,2
%A A102568 _Reinhard Zumkeller_, Jan 15 2005