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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

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, -3, 28, 50, 30, 1, 8, -12, 28, -11, 36, -14, 8, -66, 40, 104, 42, 13, 24, -18, 46, -103, 36, -16, 8, 21, 52, 88, 36, 48, 8, -24, 58, -667, 60, -26, -8, 1, 40, 72
Offset: 1

Views

Author

Omar E. Pol, Aug 01 2011

Keywords

Comments

Note that if n is prime then a(n) = n - 1.
Note that if n is a power of 2 then a(n) = 1.
a(A193671(n)) > 0; a(A187204(n)) = 0; a(A193672(n)) < 0. [Reinhard Zumkeller, Aug 02 2011]
First differs from A187203 at a(14). - Omar E. Pol, May 14 2016
From David A. Corneth, May 20 2016: (Start)
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):
a
. . b-a
b . . . . c-2b+a
. . c-b . . . . . d-3c+3b-a
c . . . . d-2c+b . . . . . . e-4d+6c-4b+a
. . d-c . . . . . e-3d+3c-b
d . . . . e-2d+c
. . e-d
e
From here we can see Pascal's triangle occurring. Induction can be used to show that it's the case in general.
(End)

Examples

			a(18) = 12 because the divisors of 18 are 1, 2, 3, 6, 9, 18, and the difference triangle of the divisors is:
1 . 2 . 3 . 6 . 9 . 18
. 1 . 1 . 3 . 3 . 9
. . 0 . 2 . 0 . 6
. . . 2 .-2 . 6
. . . .-4 . 8
. . . . . 12
with bottom entry a(18) = 12.
Note that A187203(18) = 4.
		

Crossrefs

Programs

  • Haskell
    a187202 = head . head . dropWhile ((> 1) . length) . iterate diff . divs
       where divs n = filter ((== 0) . mod n) [1..n]
             diff xs = zipWith (-) (tail xs) xs
    -- Reinhard Zumkeller, Aug 02 2011
  • Maple
    f:=proc(n) local k,d,lis; lis:=divisors(n); d:=nops(lis);
    add( (-1)^k*binomial(d-1,k)*lis[d-k], k=0..d-1); end;
    [seq(f(n),n=1..100)]; # N. J. A. Sloane, May 01 2016
  • Mathematica
    Table[d = Divisors[n]; Differences[d, Length[d] - 1][[1]], {n, 100}] (* T. D. Noe, Aug 01 2011 *)
  • PARI
    A187202(n)={ for(i=2,#n=divisors(n), n=vecextract(n,"^1")-vecextract(n,"^-1")); n[1]}  \\ M. F. Hasler, Aug 01 2011
    

Formula

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
a(2^k) = 1.

Extensions

Edited by N. J. A. Sloane, May 01 2016

A187204 Numbers n such that the bottom entry in the difference table of the divisors of n is 0.

Original entry on oeis.org

10, 171, 1947, 2619, 265105, 478834027, 974622397, 11373118351
Offset: 1

Views

Author

Omar E. Pol, Aug 01 2011

Keywords

Comments

Numbers n such that A187202(n) = 0.
11373118351 and 1756410942451 are also in the sequence (not necessarily the next two terms). - Donovan Johnson, Aug 05 2011
For every integer m, does there exist a prime p such that abs(A187202(r * m)) > abs(A187202(q * m)) and sign(A187202(r * m)) = sign(A187202(q * m)), and q >= p is prime and prime r > q? - David A. Corneth, Apr 08 2017
No other terms up to 3*10^9. - Michel Marcus, Apr 09 2017
a(9) > 6*10^10. 138662735650982521 and 168248347462416481 are also terms. - Giovanni Resta, Apr 12 2017

Examples

			10 has divisors 1, 2, 5, 10. The third difference of these numbers is 0.  This is the only possible number having 2 prime factors of the form p*q. The other terms have factorization 171 = 3^2*19, 1947 = 3*11*59, 2619 = 3^3*97, and 265105 = 5*37*1433.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a187204 n = a187204_list !! (n-1)
    a187204_list = map (+ 1) $ elemIndices 0 $ map a187202 [1..]
    -- Reinhard Zumkeller, Aug 02 2011
    
  • Mathematica
    t = {}; Do[d = Divisors[n]; If[Differences[d, Length[d]-1] == {0}, AppendTo[t, n]], {n, 10^4}]; t (* T. D. Noe, Aug 01 2011 *)
  • PARI
    is(n) = my(d=divisors(n)); !sum(i=1, #d, binomial(#d-1,i-1)*d[i]*(-1)^i) \\ David A. Corneth, Apr 08 2017

Extensions

Suggested by T. D. Noe in the "history" of A187203.
a(6)-a(7) from Donovan Johnson, Aug 03 2011
a(8) from Giovanni Resta, Apr 11 2017
Showing 1-2 of 2 results.