login
This site is supported by donations 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. 11
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

Multiplicity of factor 7 in the prime factorization of n; 7-adic valuation of n.

The p-adic valuation nu_p(n) (Greek nu in the standard literature) of n for primes p has the property that nu_p(n)=0 if n mod p <>0, nu_p(p)=1, nu_p(0)=0, and nu_p(n) = 1+ nu_p(n-n/p) if nu_p(n-p) <>0.

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

FORMULA

If n=7 then a(n)=1; else if a(n-7) <> 0 then a(n) = 1 + a(n-n/7); else a(n)=0.

G.f.: sum(x^(7^k)/(1-x^(7^k)), k=1..infinity). See A112765. - Wolfdieter Lang, Jun 18 2014

EXAMPLE

For n=147 = 3*7*7, 147 is divisible by 7^2, so a(147)=2.

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 *)

PROG

(MATLAB)

% Input:

%  n: an integer

% Output:

%  m: max power of 7 such that 7^m divides n

%  M: 1-by-K matrix where M(i) is the max power of 7 such that 7^M(i) divides n

function [m, M] = Omega7(n)

  M = NaN*zeros(1, n);

  M(1:6)=0; M(7)=1;

    for k=8:n

      if M(n-7)~=0

        M(k)=M(k-k/7)+1;

      else

        M(k)=0;

      end

    end

    m=M(end);

end

(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: A280618 A089807 A089810 * A216577 A096562 A096563

Adjacent sequences:  A214408 A214409 A214410 * A214412 A214413 A214414

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 | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 21 18:00 EDT 2018. Contains 316427 sequences. (Running on oeis4.)