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

A060872 Sum of d*d' over all unordered pairs (d,d') with d*d' = n.

Original entry on oeis.org

1, 2, 3, 8, 5, 12, 7, 16, 18, 20, 11, 36, 13, 28, 30, 48, 17, 54, 19, 60, 42, 44, 23, 96, 50, 52, 54, 84, 29, 120, 31, 96, 66, 68, 70, 180, 37, 76, 78, 160, 41, 168, 43, 132, 135, 92, 47, 240, 98, 150, 102, 156, 53, 216, 110, 224, 114, 116, 59, 360, 61, 124, 189, 256
Offset: 1

Views

Author

N. J. A. Sloane, May 04 2001

Keywords

Comments

a(n) is also the sum of all parts of all partitions of n into consecutive parts that differ by 2. - Omar E. Pol, May 05 2020

Examples

			a(4)=8 because pairs of factors are 1*4 and 2*2 and 1*4 + 2*2 = 8.
For n = 16 there are three partitions of 16 into consecutive parts that differ by 2 (including 16 as a valid partition). They are [16], [9, 7] and [7, 5, 3, 1]. The sum of the parts is [16] + [9 + 7] + [7 + 5 + 3 + 1] = 48, so a(16) = 48. - _Omar E. Pol_, May 05 2020
		

Crossrefs

First differences of A083356.

Programs

  • Magma
    [n*Ceiling(DivisorSigma(0, n)/2): n in [1..70]]; // Vincenzo Librandi, Apr 12 2017
    
  • Mathematica
    Table[ n * Ceiling[ DivisorSigma[0, n] /2 ], {n, 1, 73} ]
  • PARI
    a(n) = n*ceil(numdiv(n)/2); \\ Michel Marcus, Jul 12 2023
  • Python
    from sympy import divisor_count
    def A060872(n): return n*(divisor_count(n)+1>>1) # Chai Wah Wu, Jul 11 2023
    

Formula

a(n) = n * ceiling( d(n)/2) where d is the number of divisors function.
G.f.: x*f'(x), where f(x) = Sum_{k>=1} x^k^2/(1 - x^k). - Ilya Gutkovskiy, Apr 10 2017
a(n) = n*A038548(n). - Omar E. Pol, May 05 2020
Dirichlet g.f.: (zeta(2*s-2) + zeta(s-1)^2)/2. - Vaclav Kotesovec, Oct 21 2024

Extensions

More terms from Robert G. Wilson v, Jun 23 2001

A079667 a(n) = (1/2) * Sum_{d divides n} abs(n/d-d).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 6, 9, 8, 12, 10, 16, 12, 18, 16, 21, 16, 27, 18, 28, 24, 30, 22, 40, 24, 36, 32, 42, 28, 50, 30, 49, 40, 48, 36, 65, 36, 54, 48, 66, 40, 72, 42, 70, 60, 66, 46, 92, 48, 77, 64, 84, 52, 96, 60, 92, 72, 84, 58, 126, 60, 90, 82, 105, 72, 120, 66, 112, 88, 114, 70
Offset: 1

Views

Author

Vladeta Jovovic, Jan 25 2003

Keywords

Comments

Also, Sum_{i|n, sqrt(n)

References

  • H. J. S. Smith, Report on the Theory of Numbers, reprinted in Vol. 1 of his Collected Math. Papers, Chelsea, NY, 1979, see p. 323.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, Abs[n/# - #] &, # <= Sqrt[n] &], {n, 71}] (* Michael De Vlieger, Mar 17 2021 *)
  • PARI
    a(n)=if(n<2, 0, sumdiv(n,d, abs(n/d-d))/2) /* Michael Somos, Nov 19 2005 */
    
  • SageMath
    def A079667(n): return sum(n//d - d for d in divisors(n) if d*d <= n)
    print([A079667(n) for n in range(1, 72)])  # Peter Luschny, Jan 01 2024

Formula

a(n) = A070038(n) - A066839(n).
G.f.: Sum_{k>0} x^(k^2+k)/(1-x^k)^2 . - Michael Somos, Nov 19 2005

A161901 Array read by rows in which row n lists the divisors of n, but if n is a square then the square root of n appears twice.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 2, 2, 4, 1, 5, 1, 2, 3, 6, 1, 7, 1, 2, 4, 8, 1, 3, 3, 9, 1, 2, 5, 10, 1, 11, 1, 2, 3, 4, 6, 12, 1, 13, 1, 2, 7, 14, 1, 3, 5, 15, 1, 2, 4, 4, 8, 16, 1, 17, 1, 2, 3, 6, 9, 18, 1, 19, 1, 2, 4, 5, 10, 20, 1, 3, 7, 21
Offset: 1

Author

Omar E. Pol, Jun 23 2009

Keywords

Comments

Row n has length A161841(n). Row sums give A060866. - Omar E. Pol, Jan 06 2014

Examples

			Array begins:
....... 1,1;
....... 1,2;
....... 1,3;
..... 1,2,2,4;
....... 1,5;
..... 1,2,3,6;
....... 1,7;
..... 1,2,4,8;
..... 1,3,3,9;
..... 1,2,5,10;
....... 1,11;
... 1,2,3,4,6,12;
....... 1,13;
..... 1,2,7,14;
..... 1,3,5,15;
... 1,2,4,4,8,16;
		

Crossrefs

Programs

  • Mathematica
    dsr[n_]:=If[IntegerQ[Sqrt[n]],Sort[Join[{Sqrt[n]},Divisors[n]]],Divisors[ n]]; Array[ dsr,30]//Flatten (* Harvey P. Dale, Sep 27 2020 *)

Extensions

Keyword tabf added by R. J. Mathar, Jun 28 2009
Definition clarified by Harvey P. Dale, Sep 27 2020

A057246 s=0; d is divisor of n [here d <= n/d]; if gcd(d,n/d)=1 or gcd(d,n/d)=d then s=s+d+(n/d); [if d=n/d then s=s+d]: The sequence contains composite n for which s = 2*n.

Original entry on oeis.org

6, 28, 6966, 15066
Offset: 1

Author

Naohiro Nomoto, Sep 21 2000

Keywords

Comments

s(n) is a vaguely unitary analog of A060866. - R. J. Mathar, Oct 24 2011
No more terms up to 10^9. - Michel Marcus, Feb 24 2016

Examples

			a(2)=28, gcd(1,28)=gcd(4,28/4)=1, gcd(2,28/2)=2, 1+28+4+7+2+14=56. 56-28=28.
		

Programs

  • Mathematica
    f[ n_Integer ] := (ds = Divisors[ n ]; sq = N[ Sqrt[ n ] ]; l = 1; While[ ds[[ l ] ] <= sq, l++ ]; l = l - 1; ds = Take[ ds, l ]; s = 1; k = 2; While[ k <= l, If[ GCD[ ds[[ k ] ], n/ds[[ k ] ] ] == 1 || GCD[ ds[[ k ] ], n/ds[[ k ] ] ] == ds[[ k ] ], s = s + ds[[ k ] ] + n/ds[[ k ] ] ]; k++ ]; If[ ds[[ -1 ] ] == n/ds[[ -1 ] ], s = s - d ]; s) Do[ If[ ! PrimeQ[ n ] && f[ n ] == n, Print[ n ] ], {n, 2, 33429000} ] (* Robert G. Wilson v, Nov 09 2000 *)
  • PARI
    is(n)=my(s,g);fordiv(n,d,if(d^2Charles R Greathouse IV, Oct 23 2011

A238288 Triangle read by rows T(n,k), n>=1, k>=1, in which column k lists the positive integers interleaved with k-1 zeros, but starting from 2*k at row k^2.

Original entry on oeis.org

2, 3, 4, 5, 4, 6, 0, 7, 5, 8, 0, 9, 6, 10, 0, 6, 11, 7, 0, 12, 0, 0, 13, 8, 7, 14, 0, 0, 15, 9, 0, 16, 0, 8, 17, 10, 0, 8, 18, 0, 0, 0, 19, 11, 9, 0, 20, 0, 0, 0, 21, 12, 0, 9, 22, 0, 10, 0, 23, 13, 0, 0, 24, 0, 0, 0, 25, 14, 11, 10, 26, 0, 0, 0, 10
Offset: 1

Author

Omar E. Pol, Mar 02 2014

Keywords

Comments

Row sums give A060866.
If n is a square then the row sum gives n^(1/2) + A000203(n) otherwise the row sum gives A000203(n).
Row n has length A000196(n).
Row n has only one positive term iff n is a noncomposite number (A008578).
If the first element of every column is divided by 2 then we have the triangle A237273 whose row sums give A000203.
It appears that there are only eight rows that do not contain zeros. The indices of these rows are in A018253.

Examples

			Triangle begins:
2;
3;
4;
5,   4;
6,   0;
7,   5;
8,   0;
9,   6;
10,  0,  6;
11,  7,  0;
12,  0,  0;
13,  8,  7;
14,  0,  0;
15,  9,  0;
16,  0,  8;
17, 10,  0,  8;
18,  0,  0,  0;
19, 11,  9,  0;
20,  0,  0,  0;
21, 12,  0,  9;
22,  0, 10,  0;
23, 13,  0,  0;
24,  0,  0,  0;
25, 14, 11, 10;
26,  0,  0,  0,  10;
27, 15,  0,  0,   0;
28,  0, 12,  0,   0;
29, 16,  0, 11,   0;
30,  0,  0,  0,   0;
31, 17, 13,  0,  11;
...
		

A349005 a(n) = Sum_{d|n, d^2>=n} 1+d+n/d.

Original entry on oeis.org

3, 4, 5, 11, 7, 14, 9, 17, 18, 20, 13, 31, 15, 26, 26, 38, 19, 42, 21, 45, 34, 38, 25, 64, 38, 44, 42, 59, 31, 76, 33, 66, 50, 56, 50, 102, 39, 62, 58, 94, 43, 100, 45, 87, 81, 74, 49, 129, 66, 96, 74, 101, 55, 124, 74, 124, 82, 92, 61, 174, 63, 98, 107, 139, 86, 148
Offset: 1

Author

Michel Marcus, Nov 05 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, 1 + # + n/# &, #^2 >= n &]; Array[a, 100] (* Amiram Eldar, Nov 05 2021 *)
  • PARI
    a(n) = sumdiv(n, d, if (d^2>=n, d+1+n/d));

Formula

a(n) = A060866(n) + A038548(n).
Showing 1-6 of 6 results.