Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A051064
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A051064 3^a(n) exactly divides 3n. Or, 3-adic valuation of 3n. +0
9
1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 5, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 1, 2, 1, 1, 2 (list; graph; listen)
OFFSET

1,3

COMMENT

a(n) is the Hamming distance between n and n-1 in ternary representation. - DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 29 2004

Also : 3^a(n) divides exactly 4^n-1 - Benoit Cloitre (benoit7848c(AT)orange.fr), Oct 25 2004

Generalized Ruler Function for k=3 - Frank Ruskey (http://www.cs.uvic.ca/~ruskey/) and Chris Deugau (deugaucj(AT)uvic.ca)

REFERENCES

Letter from Gary W. Adamson concerning Prouhet-Thue-Morse sequence, Nov. 11, 1999.

LINKS

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

FORMULA

Multiplicative with a(p^e) = e+1 if p = 3; 1 if p <> 3. - Vladeta Jovovic (vladeta(AT)eunet.rs), Aug 24 2002

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

Fixed point of the morphism : 1 -> 112; 2 -> 113; 3 -> 114; 4 -> 115; ...; starting from a(1) = 1. a(3n+1) = a(3n+2) = 1; a(3n) = 1 + a(n). - DELEHAM Philippe (kolotoko(AT)wanadoo.fr), Mar 29 2004

a(n)=(-1)*sum_{d divides n} mu(3d)*tau(n/d) - Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 21 2007

EXAMPLE

3^2 | 3*6 = 18, so a(6) = 2.

MATHEMATICA

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

PROGRAM

(PARI) a(n)=if(n<1, 0, 1+valuation(n, 3))

CROSSREFS

a(n) = A007949(n)+1 = A004128(n)-A004128(n-1).

Cf. A001511, A007949. Partial sums give A004128.

Sequence in context: A162320 A136610 A101022 this_sequence A153096 A078770 A072038

Adjacent sequences: A051061 A051062 A051063 this_sequence A051065 A051066 A051067

KEYWORD

nonn,easy,nice,mult

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com), Gary W. Adamson

EXTENSIONS

More terms from James A. Sellers (sellersj(AT)math.psu.edu), Dec 11 1999

More terms from Vladeta Jovovic (vladeta(AT)eunet.rs), Aug 24 2002

page 1

Search completed in 1.145 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 23 17:09 EST 2009. Contains 167438 sequences.


AT&T Labs Research