login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007949 Greatest k such that 3^k divides n. Or, 3-adic valuation of n. 37
0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 3, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 4, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 1, 0, 0, 1 (list; graph; refs; listen; history; internal format)
OFFSET

1,9

COMMENTS

a(n) mod 2 = 1 - A014578(n). [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Oct 04 2008]

REFERENCES

K. Atanassov, On the 61-st, 62-nd and the 63-rd Smarandache Problems, Notes on Number Theory and Discrete Mathematics, Sophia, Bulgaria, Vol. 4 (1998), No. 4, 175-182.

K. Atanassov, On Some of Smarandache's Problems, American Research Press, 1999, 16-21.

F. Q. Gouvea, p-Adic Numbers, Springer-Verlag, 1993; see p. 23.

F. Smarandache, Only Problems, not Solutions!, Xiquan Publ., Phoenix-Chicago, 1993.

M. Vassilev-Missana and K. Atanassov, Some Representations related to n!, Notes on Number Theory and Discrete Mathematics, Vol. 4 (1998), No. 4, 148-153.

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

K. Atanassov, On Some of Smarandache's Problems

M. L. Perez et al., eds., Smarandache Notions Journal

F. Smarandache, Only Problems, Not Solutions!.

FORMULA

a(n) = if n > 0 modulo 3 then 0 else 1 + a(n/3). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Aug 12 2001

a(n)=A051064(n)-1. G.f.: Sum(k>=1, x^3^k/(1-x^3^k)))). - Ralf Stephan (ralf(AT)ark.in-berlin.de), Apr 12 2002

Fixed point of the morphism : 0 -> 001; 1 -> 002; 2 -> 003; 3 -> 004; 4 -> 005; etc...; starting from a(1) = 0. - DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 29 2004

Totally additive with a(p) = 1 if p = 3, 0 otherwise.

$v_{m}(n)=\displaystyle\sum\limits_{r=1}^{\infty}\frac{r}{m^{r+1}} \sum_{j=1}^{(m-1)} \sum\limits_{k=0}^{(m^{r+1}-1)}e^{\frac{2k\pi i(n+(m-j)m^{r})}{m^{r+1}}}$ - This formula is for the general case, for this specific one set $m=3$ [From A.Neves (ammdneves(AT)gmail.com), Oct 04 2010]

MAPLE

A007949 := proc(n) option remember; if n mod 3 > 0 then 0 else A007949(n/3)+1; fi; end;

MATHEMATICA

p=3; Array[ If[ Mod[ #, p ]==0, Select[ FactorInteger[ # ], Function[ q, q[ [ 1 ] ]==p ], 1 ][ [ 1, 2 ] ], 0 ]&, 81 ]

Nest[ Function[ l, {Flatten[(l /. {0 -> {0, 0, 1}, 1 -> {0, 0, 2}, 2 -> {0, 0, 3}, 3 -> {0, 0, 4}}) ]}], {0}, 5] (from Robert G. Wilson v Mar 03 2005)

Contribution from Zak Seidov (zakseidov(AT)yahoo.com), Apr 15 2010: (Start)

(*1*)IntegerExponent[Range[200], 3]

(*2*)Table[If[Mod[n, 3]>0, 0, 1+b[n/3]], {n, 200}] (End)

PROG

(PARI) a(n)=valuation(n, 3)

(Haskell)

a007949 n = length $ takeWhile ((== 0) . (mod n)) $ iterate (* 3) 3

-- Reinhard Zumkeller, May 14 2011

CROSSREFS

Partial sums give A054861. Cf. A080278, A001511.

Cf. A122841, A007814, A112765.

Sequence in context: A203945 A015692 A016232 * A191265 A078595 A078128

Adjacent sequences:  A007946 A007947 A007948 * A007950 A007951 A007952

KEYWORD

nonn,easy

AUTHOR

R. Muller

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 13 05:39 EST 2012. Contains 205436 sequences.