This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A065562 a(n) = b(n)-th highest positive integer not equal to any a(k), 1 <= k < n, where {b(n)} = 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, ... (sequence A002260). 4

%I

%S 1,2,4,3,6,8,5,9,11,13,7,12,15,17,19,10,16,20,22,24,26,14,21,25,28,30,

%T 32,34,18,27,31,35,37,39,41,43,23,33,38,42,45,47,49,51,53,29,40,46,50,

%U 54,56,58,60,62,64,36,48,55,59,63,66,68,70,72,74,76,44,57,65,69,73,77

%N a(n) = b(n)-th highest positive integer not equal to any a(k), 1 <= k < n, where {b(n)} = 1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, ... (sequence A002260).

%C Every positive integer occurs once and only once somewhere in this sequence.

%H Michael De Vlieger, <a href="/A065562/b065562.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e b(6) = 3, so a(6) = 8 = 3rd-highest positive integer not equal to 1, 2, 4, 3, or 6 (the values of a(k), 1 <= k < 6).

%t Block[{a = {1}, s = Rest@ Range[96], r}, r = Flatten@ Map[Range, {1}~Join~Differences@ Most@ Reap[Do[If[Sow[PolygonalNumber@ i] > Last@ s, Break[]], {i, Infinity}]][[-1, 1]] ]; Do[AppendTo[a, s[[r[[i]] ]]]; s = Complement[s, a], {i, 2, 3 Max[s]/4}]; a] (* _Michael De Vlieger_, Sep 23 2017 *)

%Y Cf. A002260, A065579, A065561.

%K easy,nonn

%O 1,2

%A _Leroy Quet_, Nov 29 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 20 14:49 EST 2019. Contains 320327 sequences. (Running on oeis4.)