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.

A161842 Partial sums of A161841.

Original entry on oeis.org

2, 4, 6, 10, 12, 16, 18, 22, 26, 30, 32, 38, 40, 44, 48, 54, 56, 62, 64, 70, 74, 78, 80, 88, 92, 96, 100, 106, 108, 116, 118, 124, 128, 132, 136, 146, 148, 152, 156, 164, 166, 174, 176, 182, 188, 192, 194, 204, 208, 214, 218, 224, 226, 234, 238, 246
Offset: 1

Views

Author

Omar E. Pol, Jun 23 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[2*Ceiling[DivisorSigma[0, Range[100]]/2]] (* Paolo Xausa, Feb 05 2025 *)
  • PARI
    a(n) = sum(i=1, n, floor(n/i)) + sqrtint(n) \\ David A. Corneth, Dec 17 2020
    
  • PARI
    first(n) = {my(res = vector(n), t = 0); for(i = 1, n, t+=(numdiv(i)+issquare(i)); res[i] = t ); res } \\ David A. Corneth, Dec 17 2020

Formula

a(n) = 2*A094820(n).
a(n) = Sum_{i=1..n} (1 + A008836(i))*floor(n/i). - Enrique Pérez Herrero, Jul 10 2012
a(n) ~ (log(n) + 2*gamma - 1)*n + sqrt(n), where gamma is the Euler-Mascheroni constant A001620. - Vaclav Kotesovec, Jul 01 2021

A038548 Number of divisors of n that are at most sqrt(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 3, 1, 3, 1, 3, 2, 2, 1, 4, 2, 2, 2, 3, 1, 4, 1, 3, 2, 2, 2, 5, 1, 2, 2, 4, 1, 4, 1, 3, 3, 2, 1, 5, 2, 3, 2, 3, 1, 4, 2, 4, 2, 2, 1, 6, 1, 2, 3, 4, 2, 4, 1, 3, 2, 4, 1, 6, 1, 2, 3, 3, 2, 4, 1, 5, 3, 2, 1, 6, 2, 2, 2, 4, 1, 6, 2, 3, 2, 2, 2, 6, 1, 3, 3, 5, 1, 4, 1, 4, 4
Offset: 1

Views

Author

Keywords

Comments

Number of ways to arrange n identical objects in a rectangle, modulo rotation.
Number of unordered solutions of x*y = n. - Colin Mallows, Jan 26 2002
Number of ways to write n-1 as n-1 = x*y + x + y, 0 <= x <= y <= n. - Benoit Cloitre, Jun 23 2002
Also number of values for x where x+2n and x-2n are both squares (e.g., if n=9, then 18+18 and 18-18 are both squares, as are 82+18 and 82-18 so a(9)=2); this is because a(n) is the number of solutions to n=k(k+r) in which case if x=r^2+2n then x+2n=(r+2k)^2 and x-2n=r^2 (cf. A061408). - Henry Bottomley, May 03 2001
Also number of sums of sequences of consecutive odd numbers or consecutive even numbers including sequences of length 1 (e.g., 12 = 5+7 or 2+4+6 or 12 so a(12)=3). - Naohiro Nomoto, Feb 26 2002
Number of partitions whose consecutive parts differ by exactly two.
a(n) depends only on prime signature of n (cf. A025487). So a(24) = a(375) since 24=2^3*3 and 375=3*5^3 both have prime signature (3,1). - Christian G. Bower, Jun 06 2005
Also number of partitions of n such that if k is the largest part, then each of the parts 1,2,...,k-1 occurs exactly twice. Example: a(12)=3 because we have [3,3,2,2,1,1],[2,2,2,2,2,1,1] and [1,1,1,1,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Mar 07 2006
a(n) is also the number of nonnegative integer solutions of the Diophantine equation 4*x^2 - y^2 = 16*n. For example, a(24)=4 because there are 4 solutions: (x,y) = (10,4), (11,10), (14,20), (25,46). - N-E. Fahssi, Feb 27 2008
a(n) is the number of even divisors of 2*n that are <= sqrt(2*n). - Joerg Arndt, Mar 04 2010
First differences of A094820. - John W. Layman, Feb 21 2012
a(n) = #{k: A027750(n,k) <= A000196(n)}; a(A008578(n)) = 1; a(A002808(n)) > 1. - Reinhard Zumkeller, Dec 26 2012
Row lengths of the tables in A161906 and A161908. - Reinhard Zumkeller, Mar 08 2013
Number of positive integers in the sequence defined by x_0 = n, x_(k+1) = (k+1)*(x_k-2)/(k+2) or equivalently by x_k = n/(k+1) - k. - Luc Rousseau, Mar 03 2018
Expanding the first comment: Number of rectangles with area n and integer side lengths, modulo rotation. Also number of 2D grids of n congruent squares, in a rectangle, modulo rotation (cf. A000005 for rectangles instead of squares; cf. A034836 for the 3D case). - Manfred Boergens, Jun 08 2021
Number of divisors of n that have an even number of prime divisors (counted with multiplicity), or in other words, number of terms of A028260 that divide n. - Antti Karttunen, Apr 17 2022

Examples

			a(4) = 2 since 4 = 2 * 2 = 4 * 1. Also A034178(4*4) = 2 since 16 = 4^2 - 0^2 = 5^2 - 3^2. - _Michael Somos_, May 11 2011
x + x^2 + x^3 + 2*x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + 2*x^9 + 2*x^10 + x^11 + ...
		

References

  • George E. Andrews and Kimmo Eriksson, Integer Partitions, Cambridge Univ. Press, 2004, page 18, exer. 21, 22.

Crossrefs

Different from A068108. Records give A038549, A004778, A086921.
Cf. A066839, A033676, row sums of A303300.
Inverse Möbius transform of A065043.
Cf. A244664 (Dgf at s=2), A244665 (Dgf at s=3).

Programs

Formula

a(n) = ceiling(d(n)/2), where d(n) = number of divisors of n (A000005).
a(2k) = A034178(2k) + A001227(k). a(2k+1) = A034178(2k+1). - Naohiro Nomoto, Feb 26 2002
G.f.: Sum_{k>=1} x^(k^2)/(1-x^k). - Jon Perry, Sep 10 2004
Dirichlet g.f.: (zeta(s)^2 + zeta(2*s))/2. - Christian G. Bower, Jun 06 2005 [corrected by Vaclav Kotesovec, Aug 19 2019]
a(n) = (A000005(n) + A010052(n))/2. - Omar E. Pol, Jun 23 2009
a(n) = A034178(4*n). - Michael Somos, May 11 2011
2*a(n) = A161841(n). - R. J. Mathar, Mar 07 2021
a(n) = A000005(n) - A056924(n) = A056924(n) + A010052(n) = Sum_{d|n} A065043(d). - Antti Karttunen, Apr 17 2022
Sum_{k=1..n} a(k) ~ n*log(n)/2 + (gamma - 1/2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022

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

Views

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

A161840 Number of noncentral divisors of n.

Original entry on oeis.org

0, 0, 0, 2, 0, 2, 0, 2, 2, 2, 0, 4, 0, 2, 2, 4, 0, 4, 0, 4, 2, 2, 0, 6, 2, 2, 2, 4, 0, 6, 0, 4, 2, 2, 2, 8, 0, 2, 2, 6, 0, 6, 0, 4, 4, 2, 0, 8, 2, 4, 2, 4, 0, 6, 2, 6, 2, 2, 0, 10, 0, 2, 4, 6, 2, 6, 0, 4, 2, 6, 0, 10, 0, 2, 4, 4, 2, 6, 0, 8, 4, 2, 0, 10, 2, 2, 2, 6, 0, 10, 2, 4, 2, 2, 2, 10, 0, 4, 4, 8
Offset: 1

Views

Author

Omar E. Pol, Jun 21 2009

Keywords

Comments

Noncentral divisors in the following sense: if we sort the divisors of n in natural order, there is one "central", median divisor if the number of divisors tau(n) = A000005(n) is odd, and there are two "central" divisors if tau(n) is even. a(n) is the number of divisors not counting the median or two central divisors.

Examples

			The divisors of 4 are 1, 2, 4 so the noncentral divisors of 4 are 1, 4 because its central divisor is 2.
The divisors of 12 are 1, 2, 3, 4, 6, 12 so the noncentral divisors of 12 are 1, 2, 6, 12 because its central divisors  are 3, 4.
		

Crossrefs

Programs

Formula

a(n) = tau(n)-2 + (tau(n) mod 2), tau = A000005.
a(n) = A000005(n) - A049240(n) - 1.
a(n) = A000005(n) + A010052(n) - 2.
a(n) = A000005(n) - A169695(n).
For n >= 2, a(n) = A200213(n) + 2*A010052(n). - Antti Karttunen, Jul 07 2017
a(n) = 2*A072670(n-1). - Omar E. Pol, Jul 08 2017
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 3), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 14 2024

Extensions

More terms from R. J. Mathar, Jul 04 2009

A161904 Array read by rows in which row n list the divisors of n, but if n is a square then the square root of n appears repeated. Also, the divisors appear as pairs (a,b), where a <= b, such that a*b = n.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jun 23 2009

Keywords

Comments

Row lengths are 2*A038548(n). - R. J. Mathar Jun 28 2009

Examples

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

Crossrefs

See also A161901 for another version.

Extensions

Keyword tabf added by R. J. Mathar, Jun 28 2009

A132106 a(n) = 1 + floor(sqrt(n)) + Sum_{i=1..n} floor(n/i).

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 17, 19, 23, 27, 31, 33, 39, 41, 45, 49, 55, 57, 63, 65, 71, 75, 79, 81, 89, 93, 97, 101, 107, 109, 117, 119, 125, 129, 133, 137, 147, 149, 153, 157, 165, 167, 175, 177, 183, 189, 193, 195, 205, 209, 215, 219, 225, 227, 235, 239, 247, 251, 255, 257, 269
Offset: 0

Views

Author

Richard C. Schroeppel, Oct 31 2007

Keywords

Comments

Matches first 8 odd primes.

Crossrefs

Cf. A000196, A006218, A161841 (first differences).

Programs

  • Mathematica
    a[n_]:=1+2Sum[Ceiling[DivisorSigma[0,k]/2],{k,n-1}]; Array[a,61] (* Stefano Spezia, Jan 06 2025 *)
  • PARI
    a(n) = 1 + sqrtint(n) + sum(i=1, n, n\i); \\ Michel Marcus, Jun 17 2021
    
  • Python
    from math import isqrt
    def A132106(n): return (lambda m: 2*(sum(n//k for k in range(1, m+1)))+m*(1-m)+1)(isqrt(n)) # Chai Wah Wu, Oct 08 2021

Formula

a(n) = 1 + Sum_{i=1..n} A161841(i) for n > 0. - Christian Krause, Jun 17 2021
a(n) = 1 + A000196(n) + A006218(n). - Vaclav Kotesovec, Jul 01 2021
Showing 1-6 of 6 results.