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 A275019 #43 Sep 13 2024 06:54:43 %S A275019 0,2,1,2,0,3,2,3,0,2,1,2,0,4,3,4,0,2,1,2,0,3,2,3,0,2,1,2,0,5,4,5,0,2, %T A275019 1,2,0,3,2,3,0,2,1,2,0,4,3,4,0,2,1,2,0,3,2,3,0,2,1,2,0,6,5,6,0,2,1,2, %U A275019 0,3,2,3,0,2,1,2,0,4,3,4,0,2,1,2,0,3,2,3,0,2,1,2,0,5,4,5,0,2,1,2,0,3,2,3,0,2,1,2,0,4 %N A275019 2-adic valuation of tetrahedral numbers C(n+2,3) = n(n+1)(n+2)/6 = A000292(n). %C A275019 The subsequence of every other term (a(2n-1), n >= 1) is the ruler sequence A007814 = (0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, ...), in particular every fourth term is zero. The nonzero terms among them, a(4n-1) = A007814(2n) (n >= 1) have both their neighbors equal to one more than themselves, a(4n-2) = a(4n) = a(4n-1) + 1 = A007814(2n) + 1. %H A275019 Robert Israel, <a href="/A275019/b275019.txt">Table of n, a(n) for n = 1..10000</a> %F A275019 From _Robert Israel_, Dec 04 2016: (Start) %F A275019 a(n) = A007814(n) + A007814(n+1) + A007814(n+2) - 1. %F A275019 G.f.: (1+x+x^2)*Sum_{k>=1} x^(2^k-2)/(1-x^(2^k)) - 1/(1-x). (End) %F A275019 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 2. - _Amiram Eldar_, Sep 13 2024 %p A275019 seq(padic:-ordp(n*(n+1)*(n+2)/6,2),n=1..100); # _Robert Israel_, Dec 04 2016 %t A275019 a[n_] := IntegerExponent[n*(n+1)*(n+2)/6, 2]; Array[a, 100] (* _Amiram Eldar_, Sep 13 2024 *) %o A275019 (PARI) a(n)=valuation(n*(n+1)*(n+2)/6,2) %o A275019 (Magma) [Valuation(n*(n+1)*(n+2)/6, 2): n in [1..100]]; // _Vincenzo Librandi_, Dec 04 2016 %o A275019 (Python) %o A275019 def A275019(n): return (~(m:=n*(n+1)*(n+2)//6)& m-1).bit_length() # _Chai Wah Wu_, Jul 07 2022 %Y A275019 Cf. A000292, A007814. %K A275019 nonn %O A275019 1,2 %A A275019 _M. F. Hasler_, Dec 03 2016