Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A130849
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A130849 If m = p_1^e_1 * p_2^e_2 * ... * p_k^e^k, n = p_1^f_1 * p_2^f_2 * ... * p_k^f^k we define d(m, n) = Sum[ Abs[e_i - f_i], {i, 1, k}] to be the multiplicative distance between m and n. The numbers in the sequence are half the sum of the antidiagonals of the table (A130836) of distances between integers using this metric. +0
2
0, 1, 1, 4, 2, 7, 4, 9, 8, 15, 6, 19, 13, 16, 13, 28, 15, 32, 17, 28, 27, 40, 16, 41, 34, 39, 30, 55, 28, 59, 34, 53, 50, 59, 32, 75, 57, 64, 41, 84, 47, 88, 55, 66, 72, 97, 42, 97, 71, 90, 70, 113, 65, 104, 67, 104, 97, 128, 56, 133, 103, 102, 82, 129, 89, 150, 99, 130, 100 (list; graph; listen)
OFFSET

1,4

FORMULA

a(n) = 1/2 * Sum[d(n-i, i+1), {i, 0, n-1}]

EXAMPLE

d(3, 1) = 1

d(2, 2) = 0

d(1, 3) = 1

So a(3) = 1/2 * (1 + 0 + 1) = 1

MATHEMATICA

MultDistance[m_, n_] := Module[{ mfac = FactorInteger[m], nfac = FactorInteger[ n]}, Plus @@ Map[(If[Length[ # ] == 1, #[[1, 2]], Abs[ #[[1, 2]] - #[[2, 2]]]]) &, Split[ Sort[Flatten[{mfac, nfac}, 1]], (#1[[1]] == #2[[1]]) &]]] DiagSum[n_] := 1/2 Sum[MultDistance[n - i, i + 1], {i, 0, n - 1}] Table[DiagSum[j], {j, 1, 1000}]

PROGRAM

(PARI) multDist(m, n)={my(f=vecsort(concat(factor(m)[, 1], factor(n)[, 1]), , 8)); sum(i=1, #f, abs(valuation(m, f[i])-valuation(n, f[i])))}; a(n)={sum(i=0, (n/2, multDist(n-i, i+1))};

CROSSREFS

Equals half the antidiagonal sums of A130836.

Sequence in context: A026213 A123684 A002949 this_sequence A138754 A021963 A131914

Adjacent sequences: A130846 A130847 A130848 this_sequence A130850 A130851 A130852

KEYWORD

nonn,easy

AUTHOR

Jacob Woolcutt (woolcutt(AT)gmail.com), Jul 21 2007

EXTENSIONS

Program and corrections by Charles R Greathouse IV (charles.greathouse(AT)case.edu), Sep 02 2009

page 1

Search completed in 0.002 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 December 15 00:47 EST 2009. Contains 170825 sequences.


AT&T Labs Research