Do any integers occur in both sequences?

Peter Pein petsie at dordos.net
Tue Jul 31 05:11:58 CEST 2007


Leroy Quet schrieb:
> I have just submitted these two interdependent sequences (So don't look 
> for them in the database yet):
> 
>> %I A131937
>> %S A131937 1,4,8,14,21,29,38,49,61
>> %N A131937 a(1)=1; a(2)=4. a(n) = a(n-1) + (nth positive integer which 
>> does not occur in sequence A131938).
>> %e A131937 A131938: 2,5,10,16,23,32,42,53,...
>> Positive integers not in A131938: 1,3,4,6,7,8,9,11,...
>> So A131937(8) = A131937(7) + 11 = 49.
>> %Y A131937 A131938
>> %O A131937 1
>> %K A131937 ,more,nonn,
> 
>> %I A131938
>> %S A131938 2,5,10,16,23,32,42,53,65,78,93,109
>> %N A131938 a(1)=2; a(2)=5. a(n) = a(n-1) + (nth positive integer which 
>> does not occur in sequence A131937).
>> %e A131938 A131937: 1,4,8,14,21,29,...
>> Positive integers not in A131937: 2,3,5,6,7,9,10,11,...
>> So A131938(8) = A131938(7) + 11 = 53.
>> %Y A131938 A131937
>> %O A131938 1
>> %K A131938 ,more,nonn,
> 
> 
> I have not thought about this too hard; so for all I know, the proof is 
> quite easy.
> 
> Do any positive integers occur in both A131937 and A131938?
> 
> Thanks,
> Leroy Quet
> 
Hi again,

even if you meant "n-th pos. int. which does yet not occur in either l1
or l2" (or does one say "..does yet neither occur in l1 nor in l2"?) I
get another result

list1={1,4};list2={2,5};n=3;
Do[
    Print[{list1,list2}];
    Print["n= ",n," ",Complement[Range[25],list2]];
    AppendTo[list1,Part[Complement[Range[3n ],Union[list1,list2]],n]];
    Print["n= ",n," ",Complement[Range[25],list1]];
    AppendTo[list2,Part[Complement[Range[3n],Union[list1,list2]],n]];
    n++;
    ,{5}];
list1
list2
Intersection[%%,%]


{{1,4},{2,5}}
n= 3 {1,3,4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}
n= 3 {2,3,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}
{{1,4,7},{2,5,8}}
n= 4 {1,3,4,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}
n= 4 {2,3,5,6,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}
{{1,4,7,10},{2,5,8,11}}
n= 5 {1,3,4,6,7,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25}
n= 5 {2,3,5,6,8,9,11,12,14,15,16,17,18,19,20,21,22,23,24,25}
{{1,4,7,10,13},{2,5,8,11,14}}
n= 6 {1,3,4,6,7,9,10,12,13,15,16,17,18,19,20,21,22,23,24,25}
n= 6 {2,3,5,6,8,9,11,12,14,15,17,18,19,20,21,22,23,24,25}
{{1,4,7,10,13,16},{2,5,8,11,14,17}}
n= 7 {1,3,4,6,7,9,10,12,13,15,16,18,19,20,21,22,23,24,25}
n= 7 {2,3,5,6,8,9,11,12,14,15,17,18,20,21,22,23,24,25}

l1: {1,4,7,10,13,16,19}
l2: {2,5,8,11,14,17,20}
intersection: {}

And l1, l2 and intersection for the first 100 iterations are (sorry for
weird linewidths):

{1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52,
55, 58, 61, 64, 67, 70,
  73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118,
121, 124, 127, 130,
  133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172,
175, 178, 181, 184,
  187, 190, 193, 196, 199, 202, 205, 208, 211, 214, 217, 220, 223, 226,
229, 232, 235, 238,
  241, 244, 247, 250, 253, 256, 259, 262, 265, 268, 271, 274, 277, 280,
283, 286, 289, 292,
  295, 298, 301, 304}

{2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53,
56, 59, 62, 65, 68, 71,
  74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 104, 107, 110, 113, 116, 119,
122, 125, 128, 131,
  134, 137, 140, 143, 146, 149, 152, 155, 158, 161, 164, 167, 170, 173,
176, 179, 182, 185,
  188, 191, 194, 197, 200, 203, 206, 209, 212, 215, 218, 221, 224, 227,
230, 233, 236, 239,
  242, 245, 248, 251, 254, 257, 260, 263, 266, 269, 272, 275, 278, 281,
284, 287, 290, 293,
  296, 299, 302, 305}

{}

and after 10^4 iterations (without intersections), lists end :

In[121]:=
Take[#1, -5]& /@ {list1, list2}

Out[121]=
{{29992, 29995, 29998, 30001, 30004},
 {29993, 29996, 29999, 30002, 30005}}

This time we've got {x: x == i mod 3} with i = 1,2.

Testing the 10^4 iterations:

Union[Mod[#,3]]&/@{list1,list2}
--> {{1},{2}}

Could you please explain in detail, how you've got your sequences?

Peter





More information about the SeqFan mailing list