Collatz related sequence...

David Wasserman dwasserm at earthlink.com
Fri Feb 4 04:46:58 CET 2005


Dear Jim Caprioli,

Let a(n) be the largest power of two that divides n.  Then your function is
f(n) = a(n - 171) mod 256.

 - David


%I A006519 M0162
%S A006519 1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,16,1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,32,1,2,
%T A006519 1,4,1,2,1,8,1,2,1,4,1,2,1,16,1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,64,1,2,1,4,
%U A006519 1,2,1,8,1,2,1,4,1,2,1,16,1,2,1,4,1,2,1,8,1,2,1,4,1,2,1,32,1,2,1,4,1,2
%N A006519 Highest power of 2 dividing n.
%C A006519 Least positive k such that m^k+1 divides m^n+1(with fixed base m). - Vladimir Baltic (baltic(AT)galeb.etf.bg\
  .ac.yu), Mar 25 2002
%C A006519 To construct the sequence: start with 1, concatenate 1,1, and double last term gives 1,2. Concatenate those \
  2 terms, 1,2,1,2 and double last term 1,2,1,2 ->1,2,1,4. Concatenate those 4 terms: 1,2,1,4,1,2,1,4 and double last t\
  erm -> 1,2,1,4,1,2,1,8 etc. - Benoit Cloitre (abcloitre(AT)wanadoo.fr), Dec 17 2002
%C A006519 a(n)=GCD(seq(binomial(2*n,2*m+1)/2,m=0..n-1)) (odd numbered entries of even numbered rows of Pascal's triang\
  le A007318 divided by 2), where GCD denotes the greatest common divisor of a set of numbers. Due to the symmetry of t\
  he rows it suffices to consider m=0..floor((n-1)/2). Wolfdieter Lang (wolfdieter.lang_AT_physik_DOT_uni-karlsruhe_DOT\
  _de), Jan 23 2004
%C A006519 Equals the continued fraction expansion of a constant x (cf. A100338) such that the continued fraction expan\
  sion of 2*x interleaves this sequence with 2's: contfrac(2*x) = [2; 1,2, 2,2, 1,2, 4,2, 1,2, 2,2, 1,2, 8,2,...].
%C A006519 Simon Plouffe (plouffe(AT)math.uqam.ca) observes that this sequence and A003484 (Radon function) are very si\
  milar, the difference being all zeros except for every 16-th term (see A101119 for non-zero differences). Dec 02, 200\
  4.
%H A006519 Beeler, M., Gosper, R. W. and Schroeppel, R., <a href="http://www.inwap.com/pdp10/hbaker/hakmem/hacks.html#i\
  tem175">Item 175 in Beeler, M., Gosper, R. W., and Schroeppel, R. HAKMEM. MIT AI Memo 239, Feb. 29, 1972</a>
%H A006519 R. Stephan, <a href="http://www.research.att.com/~njas/sequences/somedcgf.html">Some divide-and-conquer sequ\
  ences ...</a>
%H A006519 R. Stephan, <a href="http://www.research.att.com/~njas/sequences/dcgftable.ps">Table of generating functions\
  </a>
%H A006519 R. Stephan, <a href="http://arXiv.org/abs/math.CO/0307027">Divide-and-conquer generating functions. I. Eleme\
  ntary sequences</a>
%H A006519 E. W. Weisstein, <a href="http://mathworld.wolfram.com/EvenPart.html">Link to a section of The World of Math\
  ematics.</a>
%F A006519 a(n) = n AND -n (where "AND" is bitwise) - Marc LeBrun (mlb(AT)well.com), Sep 25 2000
%F A006519 Also: a(n)=gcd[2^n,n]. - Labos E. (labos(AT)ana1.sote.hu), Apr 22 2003
%F A006519 Multiplicative with a(p^e) = p^e if p = 2; 1 if p > 2. - David W. Wilson (davidwwilson(AT)comcast.net), Aug \
  01, 2001.
%F A006519 G.f.: sum(k>=0, 2^k*x^2^k/(1-x^2^(k+1))). - Ralf Stephan, May 6 2003
%e A006519 2^3 divides 24, but 2^4 does not divide 24, so a(24)=8.
%p A006519 with(numtheory): for n from 1 to 200 do if n mod 2 = 1 then printf(`%d,`,1) else printf(`%d,`,2^ifactors(n)[\
  2][1][2]) fi; od:
%t A006519 f[n_] := Block[{k = 0}, While[Mod[n, 2^k] == 0, k++ ]; 2^(k - 1)]; Table[ f[n], {n, 102}] (from RGWv Nov 17 \
  2004)
%o A006519 (PARI) a(n)=2^valuation(n,2)
%Y A006519 Cf. A007814.
%Y A006519 Partial sums are in A006520, second partial sums in A022560.
%Y A006519 Cf. A100338.
%Y A006519 Cf. A003484, A101119.
%Y A006519 Adjacent sequences: A006516 A006517 A006518 this_sequence A006520 A006521 A006522
%Y A006519 Sequence in context: A084236 A068057 A003484 this_sequence A055975 A087258 A076775
%K A006519 nonn,easy,nice,mult
%O A006519 1,2
%A A006519 njas, Simon Plouffe (plouffe(AT)math.uqam.ca)






More information about the SeqFan mailing list