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.
%I A005061 #180 Apr 30 2025 11:09:09 %S A005061 0,1,7,37,175,781,3367,14197,58975,242461,989527,4017157,16245775, %T A005061 65514541,263652487,1059392917,4251920575,17050729021,68332056247, %U A005061 273715645477,1096024843375,4387586157901,17560804984807,70274600998837,281192547174175,1125052618233181 %N A005061 a(n) = 4^n - 3^n. %C A005061 Number of 2 X n binary arrays with a path of adjacent 1's from top row to bottom row, see A359576. - _R. H. Hardin_, Mar 21 2002 %C A005061 Number of binary vectors (x_1, x_2, ..., x_{2n}) such that in at least one of the disjoint pairs (x_1, x_2), (x_3, x_4), ..., (x_{2n-1}, x_{2n}) both x_{2i-1} and x_{2i} are both 1. Equivalently, number of solutions (x_1, ..., x_n) to the equation x_1*x_2 + x_3*x_4 + x_5*x_6 + ... +x_{2n-1}*x_{2n} = 1 in base-2 lunar arithmetic. - _N. J. A. Sloane_, Apr 23 2011 %C A005061 a(n)/4^n is the probability that two randomly selected (with replacement) subsets of [n] will have at least one element in common if the probability of selection is equal for all subsets. - _Geoffrey Critzer_, May 09 2009 %C A005061 This sequence is also the second column of the Sheffer triangle A143495 (3-restricted Stirling2 numbers). (See the e.g.f. given below.) - _Wolfdieter Lang_, Oct 08 2011 %C A005061 Also, the number of numbers with at most n digits whose largest digit equals 3. See A255463 for the first differences (i.e., ...with exactly n digits...). - _M. F. Hasler_, May 03 2015 %C A005061 If 2^k | n then a(2^k) | a(n). - _Bernard Schott_, Oct 08 2020 %C A005061 a(n) is the number of ordered n-tuples with elements from {0,1,2,3} in which any of these elements, say 0, appears at least once. For example, a(2)=7 since 01,10,02,20,03,30,00 are the ordered 2-tuples that contain 0. - _Enrique Navarrete_, Apr 05 2021 %C A005061 a(n) is the number of n-digit numbers whose smallest decimal digit is 6. - _Stefano Spezia_, Nov 15 2023 %H A005061 Vincenzo Librandi, <a href="/A005061/b005061.txt">Table of n, a(n) for n = 0..300</a> %H A005061 David Applegate, Marc LeBrun, and N. J. A. Sloane, <a href="http://arxiv.org/abs/1107.1130">Dismal Arithmetic</a>, arXiv:1107.1130 [math.NT], 2011. [Note: we have now changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing] %H A005061 Dominique Désérable, <a href="https://doi.org/10.1007/978-3-031-78757-7_6">Versatile Topology for Two-Dimensional Cellular Automata</a>, Advances in Cellular Automata, Emergence, Complexity and Computation (ECC Vol 52) Springer, Cham (2025), Ch. 6, pp. 151-186. %H A005061 John Elias, <a href="/A005061/a005061.png">Illustration of initial terms: Unfolded Sierpinski triangle or 3-branches tree in square configuration</a> %H A005061 Samuele Giraudo, <a href="http://arxiv.org/abs/1603.01040">Pluriassociative algebras I: The pluriassociative operad</a>, arXiv:1603.01040 [math.CO], 2016. %H A005061 Vladeta Jovovic and G. Kilibarda, <a href="https://doi.org/10.4213/dm398">On the number of Boolean functions in the Post classes F^{mu}_8</a>, Diskretnaya Matematika, 11 (1999), no. 4, 127-138 (Russian, translated in Discrete Mathematics and Applications, 9, (1999), no. 6). %H A005061 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PowerFractionalParts.html">Power Fractional Parts</a> %H A005061 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (7,-12). %H A005061 <a href="/index/Di#dismal">Index entries for sequences related to dismal (or lunar) arithmetic</a> %F A005061 a(n) = 4*a(n-1) + 3^(n-1) for n>=1. - Xavier Acloque, Oct 20 2003 %F A005061 Binomial transform of A001047. - _Ross La Haye_, Sep 17 2005 %F A005061 From _Mohammad K. Azarian_, Jan 14 2009: (Start) %F A005061 G.f.: 1/(1-4*x)-1/(1-3*x). %F A005061 E.g.f.: exp(4*x)-exp(3*x). (End) %F A005061 a(n) = 2^n * Sum_{i=0...n} binomial(n,i)*(2^i-1)/2^i. - _Geoffrey Critzer_, May 09 2009 %F A005061 a(n) = 7*a(n-1) - 12*a(n-2) for n>=2. - _Bruno Berselli_, Jan 25 2011 %F A005061 From _Joe Slater_, Jan 15 2017: (Start) %F A005061 a(n) = 3*a(n-1) + 4^(n-1) for n>=0. %F A005061 a(n+1) = Sum_{k=0..n} 4^(n-k) * 3^k. (End) %F A005061 a(n) = -a(-n) * 12^n for all n in Z. - _Michael Somos_, Jan 22 2017 %e A005061 G.f. = x + 7*x^2 + 37*x^3 + 175*x^4 + 781*x^5 + 3367*x^6 + 14197*x^7 + ... %p A005061 seq(4^n - 3^n, n=0..10^2); # _Muniru A Asiru_, Feb 06 2018 %t A005061 Table[4^n - 3^n, {n, 0, 20}] (* _Vladimir Joseph Stephan Orlovsky_, Dec 21 2008 *) %t A005061 LinearRecurrence[{7,-12},{0,1},30] (* _Harvey P. Dale_, May 04 2012 *) %t A005061 Table[Numerator[1-(3/4)^n],{n,0,20}] (* see link Wolfram Mathworld - _Fred Daniel Kline_, Feb 05 2018 *) %o A005061 (Magma) [4^n - 3^n: n in [0..25]]; // _Vincenzo Librandi_, Jun 03 2011 %o A005061 (PARI) a(n)=1<<(n+n)-3^n \\ _Charles R Greathouse IV_, Jun 16 2011 %o A005061 (GAP) List([0..10^2], n->4*n - 3^n); # _Muniru A Asiru_, Feb 06 2018 %o A005061 (Python) %o A005061 def a(n): return 4**n - 3**n %o A005061 print([a(n) for n in range(23)]) # _Michael S. Branicky_, Sep 01 2021 %Y A005061 Cf. A001047, A002250, A005060, A005062, A143495, A255463 (first differences), A359576. %Y A005061 Array column A047969(n-1, 3), or triangle's subdiagonal A047969(n+2, n-1), for n >= 1. %K A005061 nonn,easy %O A005061 0,3 %A A005061 _N. J. A. Sloane_