login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Highest power of 8 dividing n.
1

%I #30 Dec 31 2022 03:41:10

%S 1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,

%T 1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,64,1,1,1,1,

%U 1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1

%N Highest power of 8 dividing n.

%C The generalized binomial coefficients produced by this sequence provide an analog to Kummer's Theorem using arithmetic in base 8.

%H Antti Karttunen, <a href="/A268355/b268355.txt">Table of n, a(n) for n = 1..65537</a>

%H Tyler Ball, Tom Edgar, and Daniel Juda, <a href="http://dx.doi.org/10.4169/math.mag.87.2.135">Dominance Orders, Generalized Binomial Coefficients, and Kummer's Theorem</a>, Mathematics Magazine, Vol. 87, No. 2, April 2014, pp. 135-143.

%H Tom Edgar and Michael Z. Spivey, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL19/Edgar/edgar3.html">Multiplicative functions, generalized binomial coefficients, and generalized Catalan numbers</a>, Journal of Integer Sequences, Vol. 19 (2016), Article 16.1.6.

%F a(n) = 8^valuation(n,8).

%F a(n) = 8^A244413(n).

%F G.f.: Sum_{m>=0} 8^m * Sum_{j=1..7} x^(j*8^m)/(1-x^(8^(m+1))). - _Robert Israel_, Feb 03 2016

%F From _Amiram Eldar_, Dec 31 2022: (Start)

%F Multiplicative with a(2^e) = 2^(3*floor(e/3)), and a(p^e) = 1 if p >= 3.

%F Dirichlet g.f.: zeta(s)*(8^s-1)/(8^s-8).

%F Sum_{k=1..n} a(k) ~ (7/(24*log(2)))*n*log(n) + (9/16 + 7*(gamma-1)/(24*log(2)))*n, where gamma is Euler's constant (A001620). (End)

%e Since 16 = 8 * 2, a(16) = 8. Likewise, since 8 does not divide 15, a(15) = 1.

%p seq(8^floor(padic:-ordp(n,2)/3), n=1..100); # _Robert Israel_, Feb 03 2016

%t 8^Table[IntegerExponent[n, 8], {n, 150}] (* _Vincenzo Librandi_, Feb 03 2016 *)

%o (Sage) [8^valuation(i, 8) for i in [1..100]]

%o (PARI) a(n) = 8^valuation(n, 8); \\ _Michel Marcus_, Feb 05 2016

%o (Python)

%o def A268355(n): return (m:=(~n&n-1))+1>>(m.bit_length()%3) # _Chai Wah Wu_, Jul 09 2022

%Y Cf. A001620, A006519, A038500, A234957, A244413, A234959.

%K nonn,easy,mult

%O 1,8

%A _Tom Edgar_, Feb 02 2016

%E Keyword:mult added by _Andrew Howroyd_, Jul 20 2018