cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A187202 The bottom entry in the difference table of the divisors of n.

This page as a plain text file.
%I A187202 #55 Jan 09 2017 02:55:14
%S A187202 1,1,2,1,4,2,6,1,4,0,10,1,12,-2,8,1,16,12,18,-11,8,-6,22,-12,16,-8,8,
%T A187202 -3,28,50,30,1,8,-12,28,-11,36,-14,8,-66,40,104,42,13,24,-18,46,-103,
%U A187202 36,-16,8,21,52,88,36,48,8,-24,58,-667,60,-26,-8,1,40,72
%N A187202 The bottom entry in the difference table of the divisors of n.
%C A187202 Note that if n is prime then a(n) = n - 1.
%C A187202 Note that if n is a power of 2 then a(n) = 1.
%C A187202 a(A193671(n)) > 0; a(A187204(n)) = 0; a(A193672(n)) < 0. [_Reinhard Zumkeller_, Aug 02 2011]
%C A187202 First differs from A187203 at a(14). - _Omar E. Pol_, May 14 2016
%C A187202 From _David A. Corneth_, May 20 2016: (Start)
%C A187202 The bottom of the difference table of the divisors of n can be expressed in terms of the divisors of n and use of Pascal's triangle. Suppose a, b, c, d and e are the divisors of n. Then the difference table is as follows (rotated for ease of reading):
%C A187202 a
%C A187202 . . b-a
%C A187202 b . . . . c-2b+a
%C A187202 . . c-b . . . . . d-3c+3b-a
%C A187202 c . . . . d-2c+b . . . . . . e-4d+6c-4b+a
%C A187202 . . d-c . . . . . e-3d+3c-b
%C A187202 d . . . . e-2d+c
%C A187202 . . e-d
%C A187202 e
%C A187202 From here we can see Pascal's triangle occurring. Induction can be used to show that it's the case in general.
%C A187202 (End)
%H A187202 T. D. Noe, <a href="/A187202/b187202.txt">Table of n, a(n) for n = 1..10000</a>
%F A187202 a(n) = Sum_{k=0..d-1} (-1)^k*binomial(d-1,k)*D[d-k], where D is a sorted list of the d = A000005(n) divisors of n. - _N. J. A. Sloane_, May 01 2016
%F A187202 a(2^k) = 1.
%e A187202 a(18) = 12 because the divisors of 18 are 1, 2, 3, 6, 9, 18, and the difference triangle of the divisors is:
%e A187202 1 . 2 . 3 . 6 . 9 . 18
%e A187202 . 1 . 1 . 3 . 3 . 9
%e A187202 . . 0 . 2 . 0 . 6
%e A187202 . . . 2 .-2 . 6
%e A187202 . . . .-4 . 8
%e A187202 . . . . . 12
%e A187202 with bottom entry a(18) = 12.
%e A187202 Note that A187203(18) = 4.
%p A187202 f:=proc(n) local k,d,lis; lis:=divisors(n); d:=nops(lis);
%p A187202 add( (-1)^k*binomial(d-1,k)*lis[d-k], k=0..d-1); end;
%p A187202 [seq(f(n),n=1..100)]; # _N. J. A. Sloane_, May 01 2016
%t A187202 Table[d = Divisors[n]; Differences[d, Length[d] - 1][[1]], {n, 100}] (* _T. D. Noe_, Aug 01 2011 *)
%o A187202 (PARI) A187202(n)={ for(i=2,#n=divisors(n), n=vecextract(n,"^1")-vecextract(n,"^-1")); n[1]}  \\ _M. F. Hasler_, Aug 01 2011
%o A187202 (Haskell)
%o A187202 a187202 = head . head . dropWhile ((> 1) . length) . iterate diff . divs
%o A187202    where divs n = filter ((== 0) . mod n) [1..n]
%o A187202          diff xs = zipWith (-) (tail xs) xs
%o A187202 -- _Reinhard Zumkeller_, Aug 02 2011
%Y A187202 Cf. A000005, A007318, A027750, A187203, A273102.
%K A187202 easy,sign
%O A187202 1,3
%A A187202 _Omar E. Pol_, Aug 01 2011
%E A187202 Edited by _N. J. A. Sloane_, May 01 2016