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.

A211344 Atomic Boolean functions interpreted as binary numbers.

This page as a plain text file.
%I A211344 #31 Feb 08 2025 13:57:41
%S A211344 1,3,5,15,51,85,255,3855,13107,21845,65535,16711935,252645135,
%T A211344 858993459,1431655765,4294967295,281470681808895,71777214294589695,
%U A211344 1085102592571150095,3689348814741910323,6148914691236517205
%N A211344 Atomic Boolean functions interpreted as binary numbers.
%C A211344 Row n of the triangle shows the atoms among n-ary Boolean functions:
%C A211344             1                                  01
%C A211344          3     5                       0011          0101
%C A211344      15    51     85          00001111      00110011      01010101
%C A211344 Often n-ary x_k = T(n,k), e.g. for 2-ary functions x_1=0011, x_2=0101 and for 3-ary functions x_1=00001111, x_2=00110011, x_3=01010101.
%C A211344 An easier generalized way is the enumeration from right to left, here shown with k starting from 0, so that n-ary x_k = T(n, n-k-1). As numbers in the diagonals on the right have the same bit pattern, this corresponds to the infinitary definition of x_k as a binary fraction 1/A000215(k) = 1/(2^2^k + 1):
%C A211344 2-ary x_0=0101=5, 3-ary x_0=01010101=85, infinitary x_0 = 1/3 = .010101...
%C A211344 2-ary x_1=0011=3, 3-ary x_1=00110011=51, infinitary x_1 = 1/5 = .001100110011...
%H A211344 Tilman Piesk, <a href="/A211344/b211344.txt">Table of n, a(n) for n = 0..65</a>
%H A211344 Tilman Piesk, <a href="http://commons.wikimedia.org/wiki/File:Atomic_Boolean_functions_in_Sierpinski_triangle.svg">Atomic Boolean functions in Sierpinski triangle</a> (Wikimedia Commons)
%F A211344 a = A001317( A089633 )
%o A211344 (MATLAB)
%o A211344 Seq = sym(zeros(55,1)) ;
%o A211344 Filledlines = 0 ;
%o A211344 for m=1:10
%o A211344     for n=1:m
%o A211344         Sum = sym(0) ;
%o A211344         for k=0:2^m-1
%o A211344             if mod(  floor( k/2^(m-n) )  ,2) == 0
%o A211344                Sum = Sum + 2^sym(k) ;
%o A211344             end
%o A211344         end
%o A211344         Seq( Filledlines + n ) = Sum ;
%o A211344     end
%o A211344     Filledlines = Filledlines + m ;
%o A211344 end
%o A211344 (Python)
%o A211344 from itertools import count, islice
%o A211344 def A211344_gen(): # generator of terms
%o A211344     return (sum((bool(~(m:=(1<<t)-(1<<k)-1)&m-i)^1)<<i for i in range((1<<t)-(1<<k))) for t in count(1) for k in range(t-1, -1, -1))
%o A211344 A211344_list = list(islice(A211344_gen(),20)) # _Chai Wah Wu_, May 03 2023
%o A211344 (Python)
%o A211344 def arity_and_atom_to_integer(arity, atom):
%o A211344     result = 0
%o A211344     max_place = (1 << arity) - (1 << atom) - 1
%o A211344     for exponent in range(max_place + 1):
%o A211344         if not bool(~max_place & max_place - exponent):
%o A211344             place_value = 1 << exponent
%o A211344             result += place_value
%o A211344     return result
%o A211344 def A211344(n, k):
%o A211344     return arity_and_atom_to_integer(n, n-k-1) # _Tilman Piesk_, Jan 25 2025
%Y A211344 A001317, A089633, A051179 (left diagonal)
%K A211344 nonn,tabl
%O A211344 0,2
%A A211344 _Tilman Piesk_, Jul 24 2012