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.

User: Michael Engling

Michael Engling's wiki page.

Michael Engling has authored 3 sequences.

A193280 Triangle read by rows: row n contains, in increasing order, all the distinct sums of distinct proper divisors of n.

Original entry on oeis.org

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

Author

Michael Engling, Jul 20 2011

Keywords

Comments

Row n > 1 contains A193279(n) terms. In row n the first term is 1 and the last term is sigma(n) - n (= A000203(n) - n). Row 1 contains 0 because 1 has no proper divisors.

Examples

			Row 10 is 1,2,3,5,6,7,8 the possible sums obtained from the proper divisors 1, 2, and 5 of 10.
Triangle starts:
  0;
  1;
  1;
  1,2,3;
  1;
  1,2,3,4,5,6;
  1;
  1,2,3,4,5,6,7;
  1,3,4;
  1,2,3,5,6,7,8;
  1;
  1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16;
		

Crossrefs

Programs

  • Maple
    with(linalg): print(0); for n from 2 to 12 do dl:=convert(numtheory[divisors](n) minus {n}, list): t:=nops(dl): print(op({seq(innerprod(dl, convert(2^t+i, base, 2)[1..t]), i=1..2^t-1)})): od: # Nathaniel Johnston, Jul 23 2011

A193279 Number of distinct sums of distinct proper divisors of n.

Original entry on oeis.org

0, 1, 1, 3, 1, 6, 1, 7, 3, 7, 1, 16, 1, 7, 7, 15, 1, 21, 1, 22, 7, 7, 1, 36, 3, 7, 7, 28, 1, 42, 1, 31, 7, 7, 7, 55, 1, 7, 7, 50, 1, 54, 1, 31, 27, 7, 1, 76, 3, 31, 7, 31, 1, 66, 7, 64, 7, 7, 1, 108, 1, 7, 29, 63, 7, 78, 1, 31, 7, 72, 1, 123, 1, 7, 31, 31
Offset: 1

Author

Michael Engling, Jul 20 2011

Keywords

Comments

a(n)=1 if and only if n is prime.
a(n)=n-1 if n is a power of 2.
a(n)=n if n is an even perfect number (is the converse true?)
Note: the count excludes an empty subset of proper divisors that would give 0 as a sum. - Antti Karttunen, Mar 07 2018

Crossrefs

Cf. A193280.
Cf. A119347 (allows also n to be included in the sums), A378447 (differences).

Programs

  • Maple
    with(linalg): a:=proc(n) local dl,t: dl:=convert(numtheory[divisors](n) minus {n}, list): t:=nops(dl): return nops({seq(innerprod(dl, convert(2^t+i, base, 2)[1..t]), i=1..2^t-1)}): end: seq(a(n), n=1..76); # Nathaniel Johnston, Jul 23 2011
  • Mathematica
    a[n_] := Module[{d = Most @ Divisors[n], x}, Count[CoefficientList[Product[1 + x^i, {i, d}], x], ?(# > 0 &)] - 1]; Array[a, 100] (* _Amiram Eldar, Jun 13 2020 *)
  • PARI
    \\ Slow and naive:
    A193279(n) = if(1==n,0,my(pds = (divisors(n)[1..(numdiv(n)-1)]), maxsum = vecsum(pds), sums = vector(maxsum), psetsiz = (2^length(pds))-1, k = 0, s); for(i=1,psetsiz,s = vecsum(choosebybits(pds,i)); if(!sums[s],k++;sums[s]++)); (k)); \\ Antti Karttunen, Mar 07 2018
    
  • PARI
    A193279(n) = { my(p=1); fordiv(n, d, if(dAntti Karttunen, Nov 29 2024
    
  • PARI
    A193279(n) = { my(c=[0]); fordiv(n,d, if(dA119347) - Antti Karttunen, Nov 29 2024

A166540 Number of ways to place 2 nonattacking kings on an n X n X n raumschach board.

Original entry on oeis.org

0, 0, 0, 193, 1548, 6714, 21280, 55395, 125748, 257908, 489024, 870885, 1473340, 2388078, 3732768, 5655559, 8339940, 12009960, 16935808, 23439753, 31902444, 42769570, 56558880, 73867563, 95379988, 121875804, 154238400, 193463725, 240669468, 297104598, 364159264
Offset: 0

Author

Michael Engling, Oct 16 2009

Keywords

Comments

We consider that kings "attack" any square that differs by at most one in any combination of the indices from its current space. A logical extension of sequence A061995.

Crossrefs

Programs

  • Magma
    [0] cat [(n^6 -(3*n-2)^3)/2: n in [1..35]]; // G. C. Greubel, Apr 03 2019
    
  • Mathematica
    LinearRecurrence[{7,-21,35,-35,21,-7,1}, {0, 0, 0, 193, 1548, 6714, 21280, 55395}, 35] (* G. C. Greubel, May 16 2016; a(7) appended by Georg Fischer, Apr 03 2019 *)
  • PARI
    {a(n) = if(n==0,0, (n^6 -(3*n-2)^3)/2)}; \\ G. C. Greubel, Apr 03 2019
    
  • Python
    # Two non-attacking kings in n x n x n cubic "board" .
    m=int(input('What\'s the biggest board to investigate? '))
    for n in range (0, m+1):
        sum=0
        for x1 in range (1, n+1):
          for y1 in range (1, n+1):
            for z1 in range (1, n+1):
              for x2 in range (1, n+1):
                for y2 in range (1, n+1):
                  for z2 in range (1, n+1):
                    if abs(x1-x2)>1 or abs(y1-y2)>1 or abs(z1-z2)>1:
                      sum=sum+1
        sum=sum//2
        print(n, sum)
    
  • Sage
    [0]+[(n^6 -(3*n-2)^3)/2 for n in (1..35)] # G. C. Greubel, Apr 03 2019

Formula

a(n) = (n^6 - (3*n-2)^3) / 2 = (n^6)/2 - (27*n^3)/2 + 27*n^2 - 18*n + 4 for n>0. - Andrew Woods, Aug 30 2011
G.f.: x^3*(193 +197*x -69*x^2 +35*x^3 +4*x^4)/(1-x)^7. - Colin Barker, Jan 09 2013
E.g.f.: (8 -8*x +4*x^2 +63*x^3 +65*x^4 +15*x^5 +x^6)*exp(x)/2 -4. - G. C. Greubel, Apr 03 2019