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!)
A113821 Triangle where a(1,1)=1; and the n terms of row n are the smallest positive integers not occurring earlier in the sequence such that, for any given m (1 <= m <= n), a(n,m) and n have at least one 1-bit in the same position when they are written in binary. 7

%I #18 Aug 17 2017 05:42:14

%S 1,2,3,5,6,7,4,12,13,14,9,11,15,17,19,10,18,20,21,22,23,25,26,27,28,

%T 29,30,31,8,24,40,41,42,43,44,45,33,35,37,39,46,47,49,51,53,34,38,50,

%U 54,55,56,57,58,59,60,61,62,63,65,66,67,69,70,71,72,73,36,52,68,74,75,76,77

%N Triangle where a(1,1)=1; and the n terms of row n are the smallest positive integers not occurring earlier in the sequence such that, for any given m (1 <= m <= n), a(n,m) and n have at least one 1-bit in the same position when they are written in binary.

%C Sequence is a permutation of the positive integers.

%H Michael De Vlieger, <a href="/A113821/b113821.txt">Table of n, a(n) for n = 1..11325</a> (Rows 1 <= n <= 150).

%e 4 = 100 in binary. Among the positive integers not occurring among the first 3 rows of the sequence (4 = 100 in binary, 8 = 1000 in binary, 9 = 1001 in binary, etc...), [4,12,13,14] (which is [100,1100,1101,1110] in binary) are the lowest 4 positive integers that share at least one 1-bit with 4 when written in binary. So row 4 is [4,12,13,14].

%e From _Michael De Vlieger_, Aug 16 2017: (Start)

%e Triangle begins:

%e 1

%e 2 3

%e 5 6 7

%e 4 12 13 14

%e 9 11 15 17 19

%e 10 18 20 21 22 23

%e 25 26 27 28 29 30 31

%e 8 24 40 41 42 43 44 45

%e 33 35 37 39 46 47 49 51 53

%e 34 38 50 54 55 56 57 58 59 60

%e 61 62 63 65 66 67 69 70 71 72 73

%e 36 52 68 74 75 76 77 78 79 84 85 86

%e ...

%e (End)

%t Block[{a = {{1}}}, Do[a = Join[a, {Take[#, n]}] &@ Select[Flatten@ Position[Array[BitAnd[n, #] &, 120], k_ /; k > 0], FreeQ[a, #] &], {n, 2, 12}]; Flatten@ a] (* _Michael De Vlieger_, Aug 16 2017 *)

%Y Cf. A115630 (inverse), A115640 (fixed points), A115641 (cycles), A115642 (cycle lengths).

%Y Row sums are in A160969. - _Klaus Brockhaus_, May 31 2009

%K easy,nonn,tabl

%O 1,2

%A _Leroy Quet_, Jan 23 2006

%E More terms from _Klaus Brockhaus_, Jan 29 2006

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 24 19:06 EDT 2024. Contains 371962 sequences. (Running on oeis4.)