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.

A371908 a(n) = 2-adic valuation of A008336(2*n).

This page as a plain text file.
%I A371908 #16 Jun 04 2024 07:40:12
%S A371908 0,1,3,2,5,4,2,1,5,4,2,1,4,3,1,0,5,4,2,1,4,3,1,0,4,3,1,0,3,2,0,1,7,6,
%T A371908 4,3,0,1,3,2,6,5,3,2,5,4,2,1,6,5,3,4,1,0,2,1,5,4,2,1,4,3,1,0,7,6,4,3,
%U A371908 0,1,3,2,6,5,3,2,5,4,2,1,6,5,3,2,5,4,2
%N A371908 a(n) = 2-adic valuation of A008336(2*n).
%C A371908 Aside from initial 0, first 50 terms agree with A371905: A371905(50) = 3 while a(51) = 5.
%H A371908 Michael De Vlieger, <a href="/A371908/b371908.txt">Table of n, a(n) for n = 1..10000</a>
%F A371908 a(n) = A007814(A008336(2*n)).
%e A371908 Let b(n) = A008336(n) and let f(x) = A007814(x).
%e A371908 a(1) = 0 since b(2*1) = 1 and f(b(2)) = 0.
%e A371908 a(2) = 1 since b(2*2) = 6 and f(b(4)) = 1.
%e A371908 a(3) = 3 since b(2*3) = 120 and f(b(6)) = 3, etc.
%t A371908 k = 1; nn = 240; p[_] := 0; r = 0; q = Prime[k];
%t A371908 {0}~Join~Reap[
%t A371908     Do[If[AnyTrue[#, p[#1] < #2 & @@ # &],
%t A371908         Map[p[#1] += #2 & @@ # &, #],
%t A371908         Map[p[#1] -= #2 & @@ # &, #] ] &@
%t A371908         Map[{PrimePi[#1], #2} & @@ # &, FactorInteger[n]];
%t A371908       If[Divisible[n, q], Sow[p[k] ] ], {n, nn}] ][[-1, 1]]
%o A371908 (Python)
%o A371908 from itertools import count, islice
%o A371908 def A371908_gen(): # generator of terms
%o A371908     m = 1
%o A371908     for n in count(1,2):
%o A371908         a, b = divmod(m,n)
%o A371908         m = m*n if b else a
%o A371908         yield (~m&m-1).bit_length()
%o A371908         a, b = divmod(m,n+1)
%o A371908         m = m*(n+1) if b else a
%o A371908 A371908_list = list(islice(A371908_gen(),20)) # _Chai Wah Wu_, Apr 15 2024
%Y A371908 Cf. A007814, A008336, A371905, A372095, A372840.
%K A371908 nonn,easy
%O A371908 1,3
%A A371908 _Michael De Vlieger_, Apr 11 2024