login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A280875 Set a(1)=0, a(2)=1, a(3)=3; b(1)=1, b(2)=2; c(1)=3. Thereafter, a(n) is the smallest positive integer m such that m is not yet in sequence a, m-a(n-1) is not yet in sequence b, and m-a(n-2) is not yet in sequence c; set b(n-1)=m-a(n-1), c(n-2)=m-a(n-2). 3

%I #49 May 10 2019 21:29:39

%S 0,1,3,2,5,9,4,13,10,6,18,11,16,7,25,17,15,28,12,19,27,8,14,24,35,49,

%T 20,37,52,21,44,33,23,47,41,29,54,70,22,42,61,36,78,31,53,74,30,57,83,

%U 26,56,84,32,64,51,34,71,100,38,81,60,40,86,63,39,87,69,43

%N Set a(1)=0, a(2)=1, a(3)=3; b(1)=1, b(2)=2; c(1)=3. Thereafter, a(n) is the smallest positive integer m such that m is not yet in sequence a, m-a(n-1) is not yet in sequence b, and m-a(n-2) is not yet in sequence c; set b(n-1)=m-a(n-1), c(n-2)=m-a(n-2).

%H N. J. A. Sloane, <a href="/A280875/b280875.txt">Table of n, a(n) for n = 1..999</a>

%H N. J. A. Sloane, <a href="/A280875/a280875.txt">Table of [n, a(n), b(n), c(n)] for n = 1..997</a>

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

%e For n=4: m=2 works, because 2 is not in a, 2-3=-1 is not in b, and 2-1=1 is not in c; set a(4)=2, b(3)=-1 and c(2)=1.

%e For n=5: m=5 works, because 5 is not in a, 5-2=3 is not in b, and 5-3=2 is not in c; set a(5)=5, b(4)=3 and c(3)=2.

%t a = {0, 1};

%t d1 = {1};

%t d2 = {};

%t For[n = 3, n <= 10000, n++,

%t For[t = Min[Complement[Range[Max[n]], a]], t <= Infinity, t++,

%t If[MemberQ[a, t] == False,

%t If[MemberQ[d1, t - a[[n - 1]]] == False && MemberQ[d2, t - a[[n - 2]]] == False,Break[];]]];

%t a = Flatten[Append[a, t]];

%t d1 = Flatten[Append[d1, t - a[[n - 1]]]];

%t d2 = Flatten[Append[d2, t - a[[n - 2]]]];]

%Y Cf. A257883, A308000 (b), A308001 (c).

%K nonn

%O 1,3

%A _Luca Petrone_, May 14 2018

%E Edited by _N. J. A. Sloane_, Jun 25 2018.

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)