A080572 Number of ordered pairs (i,j), 0 <= i,j < n, for which (i & j) is nonzero, where & is the bitwise AND operator.
0, 0, 1, 2, 7, 8, 15, 24, 37, 38, 49, 62, 81, 98, 121, 146, 175, 176, 195, 216, 247, 272, 307, 344, 387, 420, 463, 508, 559, 608, 663, 720, 781, 782, 817, 854, 909, 950, 1009, 1070, 1141, 1190, 1257, 1326, 1405, 1478, 1561, 1646, 1737, 1802, 1885, 1970, 2065, 2154
Offset: 0
References
- C. Fu, H. Fu and W. Liao, A new construction for a critical set in special Latin squares, Proceedings of the Twenty-sixth Southeastern International Conference on Combinatorics, Graph Theory and Computing (Boca Raton, Florida, 1995), Congressus Numerantium, Vol. 110 (1995), pp. 161-166.
- D. R. Stinson and G. H. J. van Rees, Some large critical sets, Proceedings of the Eleventh Manitoba Conference on Numerical Mathematics and Computing (Winnipeg, Manitoba, 1981), Congressus Numerantium, Vol. 34 (1982), pp. 441-456.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..10000
- R. Bean, Three problems on partial Latin squares, Problem 418 (BCC19,2), Discrete Math., 293 (2005), 314-315.
- J. M. Dover, On two OEIS conjectures, arXiv:1606.08033 [math.CO], 2016.
- Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 29.
Crossrefs
Programs
-
Maple
f:=proc(n) option remember; local t; if n <= 1 then 0 elif (n mod 2) = 0 then 3*f(n/2)+(n/2)^2 else t:=(n-1)/2; f(t)+2*f(t+1)+t^2-1; fi; end; [seq(f(n),n=0..100)]; # N. J. A. Sloane, Jul 01 2017
-
Mathematica
a[0] = a[1] = 0; a[n_] := a[n] = If[EvenQ[n], 3*a[n/2] + n^2/4, 2*a[(n-1)/2 + 1] + a[(n-1)/2] + (1/4)*(n-1)^2 - 1]; Array[a, 60, 0] (* Jean-François Alcover, Dec 09 2017, from Dover's formula *) Table[Length[Select[Tuples[Range[n-1],2],Intersection[Position[Reverse[IntegerDigits[#[[1]],2]],1],Position[Reverse[IntegerDigits[#[[2]],2]],1]]!={}&]],{n,0,20}] (* Gus Wiseman, Mar 30 2019 *)
Formula
a(0)=a(1)=0, a(2n) = 3a(n)+n^2, a(2n+1) = a(n)+2a(n+1)+n^2-1. This was proved by Jeremy Dover. - Ralf Stephan, Dec 08 2004
a(n) = (A325104(n) - n)/2. - Gus Wiseman, Mar 30 2019
Comments