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.

A026276 a(n) = a(m) if a(m) has already occurred exactly once and n = a(m) + m + 2, else a(n) = least positive integer that has not yet occurred.

This page as a plain text file.
%I A026276 #16 Mar 24 2017 21:40:36
%S A026276 1,2,3,1,4,2,5,3,6,7,4,8,9,5,10,11,6,12,7,13,14,8,15,9,16,17,10,18,11,
%T A026276 19,20,12,21,22,13,23,14,24,25,15,26,27,16,28,17,29,30,18,31,32,19,33,
%U A026276 20,34,35,21,36,22,37,38,23,39,40,24,41,25
%N A026276 a(n) = a(m) if a(m) has already occurred exactly once and n = a(m) + m + 2, else a(n) = least positive integer that has not yet occurred.
%C A026276 From _Bob Selcoe_, Mar 21 2017: (Start)
%C A026276 The sequence is composed of two unevenly interleaved subsequences B = {1..i} and C = {1..j}:
%C A026276   n:  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20
%C A026276   B:  1  2  3  -  4  -  5  -  6   7   -   8   9   -  10  11   -  12   -  13
%C A026276   C:  -  -  -  1  -  2  -  3  -   -   4   -   -   5   -   -   6   -   7   -
%C A026276 Terms in C can be derived from B: b(n) = n when n <= 3; when n > 3 and b(n) is not null, then b(n) = c(n+b(n)+2). So for example, c(17) = 6 because b(9) = 6 and 9+6+2 = 17.
%C A026276 b(n) = c(5n/3) as n -> inf.; that is, when a(n) = j first appears, the second appearance approaches a(5n/3) as n -> inf. (End)
%H A026276 Michael De Vlieger, <a href="/A026276/b026276.txt">Table of n, a(n) for n = 1..10000</a>
%t A026276 a = {1}; Do[AppendTo[a, If[n == # + Position[a, #][[1, 1]] + 2, #, If[Length@ # == 0, Max@ a + 1, First@ #] &@ Complement[Range@ Max@ a, a]]] &@ Last@ SelectFirst[Transpose@ {Values@ #, Keys@ #}, Length@ First@ # == 1 &] &@ PositionIndex[a], {n, 2, 66}]; a (* _Michael De Vlieger_, Mar 22 2017, Version 10 *)
%Y A026276 Cf. A009947.
%K A026276 nonn
%O A026276 1,2
%A A026276 _Clark Kimberling_