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

A161700 a(n) is the sum of the elements on the antidiagonal of the difference table of the divisors of n.

Original entry on oeis.org

1, 3, 5, 7, 9, 13, 13, 15, 19, 17, 21, 28, 25, 21, 41, 31, 33, 59, 37, 21, 53, 29, 45, 39, 61, 33, 65, 49, 57, 171, 61, 63, 77, 41, 117, 61, 73, 45, 89, -57, 81, 309, 85, 105, 167, 53, 93, -80, 127, 61, 113, 133, 105, 321, 173, 183, 125, 65, 117, -1039, 121, 69, 155, 127, 201, 333, 133, 189, 149, -69, 141, 117, 145, 81, 317, 217, 269
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2009, Jun 20 2009

Keywords

Comments

a(p^k) = p^(k+1) - (p-1)^(k+1) if p is prime. - Robert Israel, May 18 2016

Examples

			n=12: A000005(12)=6;
EDP(12,x) = (x^5 - 5*x^4 + 5*x^3 + 5*x^2 + 114*x + 120)/120 = A161701(x) is the interpolating polynomial for {(0,1),(1,2),(2,3),(3,4),(4,6),(5,12)},
{EDP(12,x): 0<=x<6} = {1, 2, 3, 4, 6, 12} = divisors of 12,
a(12) = EDP(12,6) = 28.
From _Peter Luschny_, May 18 2016: (Start)
a(40) = -57 because the sum of the elements on the antidiagonal of DTD(40) is -57.
The DTD(40) is:
[   1    2    4   5  8  10  20  40]
[   1    2    1   3  2  10  20   0]
[   1   -1    2  -1  8  10   0   0]
[  -2    3   -3   9  2   0   0   0]
[   5   -6   12  -7  0   0   0   0]
[ -11   18  -19   0  0   0   0   0]
[  29  -37    0   0  0   0   0   0]
[ -66    0    0   0  0   0   0   0]
(End)
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
    local D, nD;
    D:= sort(convert(numtheory:-divisors(n),list));
    nD:= nops(D);
    CurveFitting:-PolynomialInterpolation([$0..nD-1],D, nD)
    end proc:
    map(f, [$1..100]); # Robert Israel, May 18 2016
  • Mathematica
    a[n_] := (d = Divisors[n]; t = Table[Differences[d, k], {k, 0, lg = Length[d]}]; Sum[t[[lg - k + 1, k]], {k, 1, lg}]);
    Array[a, 77] (* Jean-François Alcover, Jan 25 2018 *)
  • Sage
    def A161700(n):
        D = divisors(n)
        T = matrix(ZZ, len(D))
        for (m, d) in enumerate(D):
            T[0, m] = d
            for k in range(m-1, -1, -1) :
                T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
        return sum(T[k,len(D)-k-1] for k in range(len(D)))
    print([A161700(n) for n in range(1,78)]) # Peter Luschny, May 18 2016

Formula

a(n) = EDP(n,tau(n)) with tau = A000005 and EDP(n,x) = interpolating polynomial for the divisors of n.
EDP(n,A000005(n) - 1) = n;
EDP(n,1) = A020639(n);
EDP(n,0) = 1;
EDP(n,k) = A027750(A006218(n-1)+k+1), 0<=k < A000005(n).

Extensions

New name from Peter Luschny, May 18 2016

A161706 a(n) = (-11*n^5 + 145*n^4 - 635*n^3 + 1115*n^2 - 494*n + 120)/120.

Original entry on oeis.org

1, 2, 4, 5, 10, 20, 21, -27, -201, -626, -1486, -3035, -5608, -9632, -15637, -24267, -36291, -52614, -74288, -102523, -138698, -184372, -241295, -311419, -396909, -500154, -623778, -770651, -943900, -1146920, -1383385, -1657259, -1972807
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 6} = divisors of 20:
a(n) = A027750(A006218(19) + k + 1), 0 <= k < A000005(20).

Examples

			Differences of divisors of 20 to compute the coefficients of their interpolating polynomial, see formula:
  1     2     4     5    10    20
     1     2     1     5    10
        1    -1     4     5
          -2     5     1
              7    -4
               -11
		

Crossrefs

Programs

  • Magma
    [(-11*n^5 + 145*n^4 - 635*n^3 + 1115*n^2 - 494*n + 120)/120: n in [0..50]]; // Vincenzo Librandi, Dec 27 2010
    
  • Maple
    A161706:=n->(-11*n^5 + 145*n^4 - 635*n^3 + 1115*n^2 - 494*n + 120)/120: seq(A161706(n), n=0..50); # Wesley Ivan Hurt, Jul 16 2017
  • Mathematica
    CoefficientList[Series[(1 - 4*x + 7*x^2 - 9*x^3 + 15*x^4 - 21*x^5)/(1 - x)^6, {x, 0, 50}], x] (* G. C. Greubel, Jul 16 2017 *)
  • PARI
    a(n)=(-11*n^5+145*n^4-635*n^3+1115*n^2-494*n+120)/120 \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    def A161706(n): return (n*(n*(n*(n*(145 - 11*n) - 635) + 1115) - 494) + 120)//15>>3 # Chai Wah Wu, Oct 23 2023

Formula

a(n) = C(n,0) + C(n,1) + C(n,2) - 2*C(n,3) + 7*C(n,4) - 11*C(n,5).
G.f.: (1-4*x+7*x^2-9*x^3+15*x^4-21*x^5)/(1-x)^6. - Colin Barker, Apr 25 2012

A161710 a(n) = (-6*n^7 + 154*n^6 - 1533*n^5 + 7525*n^4 - 18879*n^3 + 22561*n^2 - 7302*n + 2520)/2520.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 24, 39, -2, -295, -1308, -3980, -9996, -22150, -44808, -84483, -150534, -256001, -418588, -661806, -1016288, -1521288, -2226376, -3193341, -4498314, -6234123, -8512892, -11468896, -15261684, -20079482, -26142888
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 8} = divisors of 24:
a(n) = A027750(A006218(23) + k + 1), 0 <= k < A000005(24).

Examples

			Differences of divisors of 24 to compute the coefficients of their interpolating polynomial, see formula:
1 ... 2 ... 3 ... 4 ... 6 ... 8 .. 12 .. 24
.. 1 ... 1 ... 1 ... 2 ... 2 ... 4 .. 12
..... 0 ... 0 ... 1 ... 0 ... 2 ... 8
........ 0 ... 1 .. -1 ... 2 ... 6
........... 1 .. -2 ... 3 ... 4
............. -3 ... 5 ... 1
................. 8 .. -4
.................. -12.
		

Crossrefs

Programs

  • Magma
    [(-6*n^7 + 154*n^6 - 1533*n^5 + 7525*n^4 - 18879*n^ 3 + 22561*n^2 - 7302*n + 2520)/2520: n in [0..40]]; // Vincenzo Librandi, Jul 17 2011
    
  • Mathematica
    Table[(-6n^7+154n^6-1533n^5+7525n^4-18879n^3+22561n^2-7302n+2520)/2520,{n,0,40}] (* or *) LinearRecurrence[{8,-28,56,-70,56,-28,8,-1},{1,2,3,4,6,8,12,24},40] (* Harvey P. Dale, Jul 15 2012 *)
  • PARI
    a(n)=(-6*n^7+154*n^6-1533*n^5+7525*n^4-18879*n^3+22561*n^2-7302*n+2520)/2520 \\ Charles R Greathouse IV, Sep 24 2015
  • Python
    A161710_list, m = [1], [-12, 80, -223, 333, -281, 127, -23, 1]
    for _ in range(1,10**2):
        for i in range(7):
            m[i+1]+= m[i]
        A161710_list.append(m[-1]) # Chai Wah Wu, Nov 09 2014
    

Formula

a(n) = C(n,0) + C(n,1) + C(n,4) - 3*C(n,5) + 8*C(n,6) - 12*C(n,7).
G.f.: (1-6*x+15*x^2-20*x^3+16*x^4-12*x^5+18*x^6-24*x^7)/(1-x)^8. - Bruno Berselli, Jul 17 2011
a(0)=1, a(1)=2, a(2)=3, a(3)=4, a(4)=6, a(5)=8, a(6)=12, a(7)=24, a(n)=8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+ 8*a(n-7)- a(n-8). - Harvey P. Dale, Jul 15 2012

A161713 a(n) = (-n^5 + 15*n^4 - 65*n^3 + 125*n^2 - 34*n + 40)/40.

Original entry on oeis.org

1, 2, 4, 7, 14, 28, 49, 71, 79, 46, -70, -329, -812, -1624, -2897, -4793, -7507, -11270, -16352, -23065, -31766, -42860, -56803, -74105, -95333, -121114, -152138, -189161, -233008, -284576, -344837, -414841, -495719, -588686, -695044
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 6} = divisors of 28:
a(n) = A027750(A006218(27) + k + 1), 0 <= k < A000005(28).

Examples

			Differences of divisors of 28 to compute the coefficients of their interpolating polynomial, see formula:
  1     2     4     7    14    28
     1     2     3     7    14
        1     1     4     7
           0     3     3
              3     0
                -3
		

Crossrefs

Programs

  • Magma
    [(-n^5 + 15*n^4 - 65*n^3 + 125*n^2 - 34*n + 40)/40: n in [0..40]]; // Vincenzo Librandi, Jul 17 2011
    
  • Mathematica
    Table[(-n^5+15n^4-65n^3+125n^2-34n)/40+1,{n,0,40}] (* or *) LinearRecurrence[{6,-15,20,-15,6,-1},{1,2,4,7,14,28},40] (* Harvey P. Dale, Jan 14 2014 *)
  • PARI
    a(n)=(-n^5+15*n^4-65*n^3+125*n^2-34*n+40)/40 \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    def A161713(n): return n*(n*(n*(n*(15 - n) - 65) + 125) - 34)//40 + 1 # Chai Wah Wu, Dec 16 2021

Formula

a(n) = C(n,0) + C(n,1) + C(n,2) + 3*C(n,4) - 3*C(n,5).
G.f.: -(-1+4*x-7*x^2+7*x^3-7*x^4+7*x^5)/(-1+x)^6. - R. J. Mathar, Jun 18 2009
a(0)=1, a(1)=2, a(2)=4, a(3)=7, a(4)=14, a(5)=28, a(n)=6*a(n-1)- 15*a(n-2)+ 20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6). - Harvey P. Dale, Jan 14 2014

A161715 a(n) = (50*n^7 - 1197*n^6 + 11333*n^5 - 53655*n^4 + 132125*n^3 - 156828*n^2 + 73212*n + 5040)/5040.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 15, 30, 171, 886, 3359, 10143, 26072, 59502, 123931, 240048, 438261, 761754, 1270123, 2043641, 3188202, 4840994, 7176951, 10416034, 14831391, 20758446, 28604967, 38862163, 52116860, 69064806, 90525155, 117456180
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 8} = divisors of 30:
a(n) = A027750(A006218(29) + k + 1), 0 <= k < A000005(30).

Examples

			Differences of divisors of 30 to compute the coefficients of their interpolating polynomial, see formula:
  1     2     3     5     6    10    15    30
     1     1     2     1     4     5    15
        0     1    -1     3     1    10
           1    -2     4    -2     9
             -3     6    -6    11
                 9   -12    17
                  -21    29
                      50
		

Crossrefs

Programs

  • Magma
    [(50*n^7 - 1197*n^6 + 11333*n^5 - 53655*n^4 + 132125*n^3 - 156828*n^2 + 73212*n + 5040)/5040: n in [0..40]]; // Vincenzo Librandi, Jul 17 2011
    
  • Mathematica
    CoefficientList[Series[(1-6*x+15*x^2-19*x^3+8*x^4+18*x^5-51*x^6+84*x^7)/(-1+x)^8, {x, 0, 50}], x] (* G. C. Greubel, Jul 16 2017 *)
  • PARI
    x='x+O('x^50); Vec((1 -6*x +15*x^2 -19*x^3 +8*x^4 +18*x^5 -51*x^6 +84*x^7) /(-1+x)^8) \\ G. C. Greubel, Jul 16 2017
  • Python
    A161710_list, m = [1], [50, -321, 864, -1249, 1024, -452, 85, 1]
    for _ in range(1,10**2):
        for i in range(7):
            m[i+1]+= m[i]
        A161710_list.append(m[-1]) # Chai Wah Wu, Nov 09 2014
    

Formula

a(n) = C(n,0) + C(n,1) + C(n,3) - 3*C(n,4) + 9*C(n,5) - 21*C(n,6) + 50*C(n,7).
G.f.: (1-6*x+15*x^2-19*x^3+8*x^4+18*x^5-51*x^6+84*x^7)/(-1+x)^8. - R. J. Mathar, Jun 18 2009
a(n) = 8*a(n-1)-28*a(n-2)+56*a(n-3)-70*a(n-4)+56*a(n-5)-28*a(n-6)+8*a(n-7)-a(n-8). - Wesley Ivan Hurt, Apr 26 2021

A161704 a(n) = (3*n^5 - 35*n^4 + 145*n^3 - 235*n^2 + 152*n + 30)/30.

Original entry on oeis.org

1, 2, 3, 6, 9, 18, 59, 190, 513, 1186, 2435, 4566, 7977, 13170, 20763, 31502, 46273, 66114, 92227, 125990, 168969, 222930, 289851, 371934, 471617, 591586, 734787, 904438, 1104041, 1337394, 1608603, 1922094, 2282625, 2695298, 3165571, 3699270
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 17 2009

Keywords

Comments

{a(k): 0 <= k < 6} = divisors of 18:
a(n) = A027750(A006218(17) + k + 1), 0 <= k < A000005(18).

Examples

			Differences of divisors of 18 to compute the coefficients of their interpolating polynomial, see formula:
  1     2     3     6     9    18
     1     1     3     3     9
        0     2     0     6
           2    -2     6
             -4     8
                12
		

Crossrefs

Programs

  • Magma
    [(3*n^5 - 35*n^4 + 145*n^3 - 235*n^2 + 152*n + 30)/30: n in [0..50]]; // Vincenzo Librandi, Dec 27 2010
    
  • Maple
    A161704:=n->(3*n^5 - 35*n^4 + 145*n^3 - 235*n^2 + 152*n + 30)/30: seq(A161704(n), n=0..50); # Wesley Ivan Hurt, Jul 16 2017
  • Mathematica
    CoefficientList[Series[(1 - 4*x + 6*x^2 - 2*x^3 - 7*x^4 + 18*x^5)/(x - 1)^6, {x, 0, 50}], x] (* G. C. Greubel, Jul 16 2017 *)
  • PARI
    a(n)=n*(3*n^4-35*n^3+145*n^2-235*n+152)/30+1

Formula

a(n) = C(n,0) + C(n,1) + 2*C(n,3) - 4*C(n,4) + 12*C(n,5).
G.f.: ( 1-4*x+6*x^2-2*x^3-7*x^4+18*x^5 ) / (x-1)^6. - R. J. Mathar, Jul 12 2016

A161857 a(n) is the sum of the first column of the difference table of the divisors of n.

Original entry on oeis.org

1, 2, 3, 3, 5, 4, 7, 4, 7, 4, 11, 4, 13, 4, 11, 5, 17, 12, 19, -3, 13, 4, 23, -4, 21, 4, 15, 3, 29, 38, 31, 6, 17, 4, 31, -5, 37, 4, 19, -42, 41, 76, 43, 15, 27, 4, 47, -66, 43, -4, 23, 21, 53, 68, 43, 34, 25, 4, 59, -434, 61, 4, 9, 7, 49, 60, 67, 33, 29, -54, 71, 24, 73, 4, 59, 39, 69
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 20 2009

Keywords

Comments

Let DTD(n) denote the difference table of the divisors of n. The sum of the first row of DTD(n) is sigma(n) = A000203(n). a(n) is the sum of the first column of DTD(n). - Peter Luschny, May 18 2016

Examples

			The DTD of 65 is:
[  1   5  13  65]
[  4   8  52]
[  4  44]
[ 40]
sigma(65) = 1 + 5 + 13 + 65 = 84.
a(65) = 1 + 4 + 4 + 40 = 49.
		

Crossrefs

Row sums of A161856.

Programs

  • Mathematica
    a[n_] := Module[{dd = Divisors[n]}, If[n==1, 1, Sum[Differences[dd,k][[1]], {k, 0, Length[dd]-1}]]]; Array[a, 100] (* Jean-François Alcover, Jun 17 2019 *)
    Table[Total[Table[Differences[Divisors[k],n],{n,0,DivisorSigma[0,k]-1}][[;;,1]]],{k,80}] (* Harvey P. Dale, Aug 04 2025 *)
  • Sage
    def A161857(n):
        D = divisors(n)
        T = matrix(ZZ, len(D))
        for (m, d) in enumerate(D):
            T[0, m] = d
            for k in range(m-1, -1, -1) :
                T[m-k, k] = T[m-k-1, k+1] - T[m-k-1, k]
        return sum(T.column(0))
    print([A161857(n) for n in range(1,78)]) # Peter Luschny, May 18 2016

Formula

a(n) = SUM(A161856(A006218(n-1)+i): 1<=i<=A000005(n)), n>1.

Extensions

New name from Peter Luschny, May 18 2016
Showing 1-7 of 7 results.