login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130849 a(n) is half the sum of the terms in the n-th antidiagonal of the table A130836. 1

%I #17 Sep 20 2018 08:16:14

%S 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,

%T 30,55,28,59,34,53,50,59,32,75,57,64,41,84,47,88,55,66,72,97,42,97,71,

%U 90,70,113,65,104,67,104,97,128,56,133,103,102,82,129,89,150,99,130,100

%N a(n) is half the sum of the terms in the n-th antidiagonal of the table A130836.

%F a(n) = 1/2 * Sum_{i=0..n-1} d(n-i, i+1) where, if m = Sum_{k} p_k^e^k, and n = Sum_{k} p_k^f^k, then d(m, n) = Sum_{i=1..k} abs(e_i - f_i), the multiplicative distance between m and n.

%e d(3, 1) = 1

%e d(2, 2) = 0

%e d(1, 3) = 1

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

%t 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}]

%o (PARI) multDist(m, n) = {if (m==n, 0, my(f=vecsort(concat(factor(m)[, 1], factor(n)[, 1]),, 8)); sum(i=1, #f, abs(valuation(m, f[i])-valuation(n, f[i]))))};

%o a(n)={sum(i=0, (n-1)/2, multDist(n-i, i+1))}; \\ edited by _Michel Marcus_, Sep 20 2018

%Y Equals half the antidiagonal sums of A130836.

%K nonn,easy

%O 1,4

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

%E Program and corrections by _Charles R Greathouse IV_, Sep 02 2009

%E Edited by _Michel Marcus_, Sep 20 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)