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-3 of 3 results.

A187203 The bottom entry in the absolute difference triangle 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, 4, 18, 1, 8, 6, 22, 2, 16, 8, 8, 3, 28, 4, 30, 1, 8, 12, 24, 1, 36, 14, 8, 0, 40, 4, 42, 3, 20, 18, 46, 1, 36, 0, 8, 3, 52, 8, 36, 0, 8, 24, 58, 3, 60, 26, 4, 1, 40, 12, 66, 3, 8, 2, 70, 4, 72, 32, 32, 3
Offset: 1

Views

Author

Omar E. Pol, Aug 01 2011

Keywords

Comments

Note that if n is prime then a(n) = n - 1.
Where records occurs gives the odd noncomposite numbers (A006005).
First differs from A187202 at a(14).
It is important to note that at each step in the process, the absolute differences are taken, and not just at the end. This sequence is therefore not abs(A187202) as I mistakenly assumed at first. - Alonso del Arte, Aug 01 2011

Examples

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

Crossrefs

Programs

  • Haskell
    a187203 = head . head . dropWhile ((> 1) . length) . iterate diff . divs
       where divs n = filter ((== 0) . mod n) [1..n]
             diff xs = map abs $ zipWith (-) (tail xs) xs
    -- Reinhard Zumkeller, Aug 02 2011
  • Mathematica
    Table[d = Divisors[n]; While[Length[d] > 1, d = Abs[Differences[d]]]; d[[1]], {n, 100}] (* T. D. Noe, Aug 01 2011 *)
    Table[Nest[Abs[Differences[#]]&,Divisors[n],DivisorSigma[0,n]-1],{n,100}]//Flatten (* Harvey P. Dale, Nov 07 2022 *)
  • PARI
    A187203(n)={ for(i=2,#n=divisors(n), n=abs(vecextract(n,"^1")-vecextract(n,"^-1"))); n[1]}  \\ M. F. Hasler, Aug 01 2011
    

Extensions

Edited by Omar E. Pol, May 14 2016

A187207 Irregular triangle read by rows in which row n lists the k=A000005(n) divisors of n in decreasing order, followed by the lists of their absolute differences up to order k-1.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 2, 4, 2, 1, 2, 1, 1, 5, 1, 4, 6, 3, 2, 1, 3, 1, 1, 2, 0, 2, 7, 1, 6, 8, 4, 2, 1, 4, 2, 1, 2, 1, 1, 9, 3, 1, 6, 2, 4, 10, 5, 2, 1, 5, 3, 1, 2, 2, 0, 11, 1, 10, 12, 6, 4, 3, 2, 1, 6, 2, 1, 1, 1, 4, 1, 0, 0, 3, 1, 0, 2, 1, 1, 13, 1, 12, 14, 7, 2, 1, 7, 5, 1, 2, 4, 2
Offset: 1

Views

Author

Omar E. Pol, Aug 02 2011

Keywords

Examples

			Triangle begins:
[1];
[2, 1], [1];
[3, 1], [2];
[4, 2, 1], [2, 1], [1];
[5, 1], [4];
[6, 3, 2, 1], [3, 1, 1], [2, 0], [2];
[7, 1], [6];
[8, 4, 2, 1], [4, 2, 1], [2, 1], [1];
[9, 3, 1], [6, 2], [4];
[10, 5, 2, 1], [5, 3, 1], [2, 2], [0];
The terms of each row can form a regular triangle, for example row 10:
10, 5, 2, 1;
. 5, 3, 1;
.   2, 2;
.    0;
		

Crossrefs

Row n has length A184389(n) = A000217(A000005(n)). Row sums give A187215. Last terms of rows give A187203. Columns 1,2 give: A000027, A032742.

Programs

  • Maple
    with(numtheory):
    DD:= l-> [seq(abs(l[i]-l[i-1]), i=2..nops(l))]:
    T:= proc(n) local l;
          l:= sort([divisors(n)[]], `>`);
          seq((DD@@i)(l)[], i=0..nops(l)-1);
        end:
    seq(T(n), n=1..20); # Alois P. Heinz, Aug 03 2011
  • Mathematica
    row[n_] := (dd = Divisors[n]; Table[Differences[dd, k] // Reverse // Abs, {k, 0, Length[dd]-1}]); Table[row[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, May 18 2016 *)

A187209 Sum of all terms of triangle of absolute differences of the divisors of n.

Original entry on oeis.org

0, 1, 2, 4, 4, 9, 6, 11, 12, 13, 10, 24, 12, 21, 30, 26, 16, 43, 18, 40, 40, 37, 22, 59, 40, 45, 50, 52, 28, 89, 30, 57, 60, 61, 86, 90, 36, 69, 70, 103, 40, 125, 42, 88, 140, 85, 46, 128, 84, 97, 90, 106, 52, 165, 130, 113, 100, 109, 58, 201
Offset: 1

Views

Author

Omar E. Pol, Aug 04 2011

Keywords

Comments

Note that if n is prime then a(n) = n - 1.

Examples

			a(10) = 13 because the divisors of 10 are 1, 2, 5, 10; the triangle of absolute differences is
1, 3, 5;
. 2, 2;
.   0;
and the sum of the terms of triangle is 1+3+5+2+2+0 = 13.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[Flatten[NestList[Abs[Differences[#]]&,Differences[Divisors[ n]], DivisorSigma[0,n]-1]]],{n,60}] (* Harvey P. Dale, Aug 10 2011 *)

Formula

a(n) = A187215(n) - A000203(n).
Showing 1-3 of 3 results.