login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A214411 The maximum exponent k of 7 such that 7^k divides n. 19
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,49
COMMENTS
7-adic valuation of n.
LINKS
Dario T. de Castro, P-adic Order of Positive Integers via Binomial Coefficients, INTEGERS, Electronic J. of Combinatorial Number Theory, Vol. 22, Paper A61, 2022.
FORMULA
G.f.: Sum_{k>=1} x^(7^k)/(1-x^(7^k)). See A112765. - Wolfdieter Lang, Jun 18 2014
If n == 0 (mod 7) then a(n) = 1 + a(n/7), otherwise a(n) = 0. - M. F. Hasler, Mar 05 2020
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/6. - Amiram Eldar, Jan 17 2022
a(n) = 7*Sum_{j=1..floor(log(n)/log(7))} frac(binomial(n, 7^j)*7^(j-1)/n). - Dario T. de Castro, Jul 12 2022
EXAMPLE
n=147 = 3*7*7 is divisible by 7^2, so a(147)=2.
MAPLE
seq(padic:-ordp(n, 7), n=1..100); # Robert Israel, Mar 05 2020
MATHEMATICA
mek[n_]:=Module[{k=Ceiling[Log[7, n]]}, While[!Divisible[n, 7^k], k--]; k]; Array[ mek, 140] (* Harvey P. Dale, Mar 27 2017 *)
IntegerExponent[Range[150], 7] (* Suggested by Amiram Eldar *) (* Harvey P. Dale, Mar 07 2020 *)
PROG
(PARI) a(n)=valuation(n, 7) \\ Charles R Greathouse IV, Jul 17 2012
(PARI) A=vector(1000); for(i=1, log(#A+.5)\log(7), forstep(j=7^i, #A, 7^i, A[j]++)); A \\ Charles R Greathouse IV, Jul 17 2012
CROSSREFS
Cf. A007814 (2-adic), A007949 (3-adic), A112765 (5-adic), A082784.
Sequence in context: A347714 A089807 A089810 * A324179 A216577 A096562
KEYWORD
nonn,easy
AUTHOR
Redjan Shabani, Jul 16 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 02:22 EDT 2024. Contains 371767 sequences. (Running on oeis4.)