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-10 of 31 results. Next

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

A078703 Number of ways of subtracting twice a triangular number from a perfect square to obtain the integer n.

Original entry on oeis.org

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

Views

Author

R. L. Coffman, K. W. McLaughlin and R. J. Dawson (robert.l.coffman(AT)uwrf.edu), Dec 19 2002

Keywords

Comments

Also number of symmetric unimodal consecutive integer sequences that sum to the integer n (e.g., 4+5+6+5+4 = 24 = n). Also number of double trapezoidal arrangements of n objects, denoted SDT(n); i.e., the number of ways to arrange n objects into symmetrically-placed, congruent isosceles trapezoids adjoined at overlapping largest bases.
Also number of divisors of 4*n-1 of form 4*k+1 (or 4*k+3). - Vladeta Jovovic, Jan 05 2004. Therefore a(n) is one half of the number of divisors of A004767(n-1) (numbers 3 (mod 4)). - Wolfdieter Lang, Jul 29 2016

Examples

			SDT(34) = 4 since we have 34 or 11+12+11 or 6+7+8+7+6 or 2+3+4+5+6+5+4+3+2, Also 4*34 - 1 = 135 = (3^3)*(5^1) so that r1=3 and r2=1 (p1=3 and p2=5), resulting in SDT(34) = (3+1)*(1+1)/2 = 4.
a(4) = 2 since 4 = 2^2 - 2*0 = 4^2 - 2*6. Also A034178(4*4 - 1) = 2 since 15 = 4^2 - 1^2 = 8^2 - 7^2. - _Michael Somos_, May 11 2011
G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + 2*x^7 + x^8 + 2*x^9 + 2*x^10 + x^11 + ...
Number of divisors of numbers 3 (mod 4) (see the Jovovic Jan 05 2004 comment): a(16) = 3 from the 2*3 = 6 divisors [1, 3, 7, 9, 21, 63] of 63 = A004767(15), being 1, -1, -1, 1, 1, -1 (mod 4). - _Wolfdieter Lang_, Jul 29 2016
		

Crossrefs

Programs

  • Mathematica
    (* This defines SDT(n): *)
    SDT[n_] := Length[Cases[Range[1, n], j_ /; Cases[Range[1, j], k_ /; Plus @@ Join[Range[k, j], Range[j - 1, k, -1]] == n] != {}]] The restricted factorization technique for obtaining SDT(n) is encoded as follows: SDT[n_] := (Times @@ Cases[FactorInteger[4 n - 1], {p_, r_} -> r + 1])/2
    Rest[ CoefficientList[ Series[ Sum[x^k/(1 - x^(4k - 1)), {k, 111}], {x, 0, 110}], x]] (* Robert G. Wilson v, Sep 20 2005 *)
    a[ n_] := If[ n < 1, 0, With[{m = 4 n - 1}, Sum[1 - Sign@Mod[m - k^2, 2 k], {k, Sqrt@m}]]]; (* Michael Somos, Aug 01 2016 *)
    a[n_] := DivisorSigma[0, 4*n - 1]/2; Array[a, 100] (* Amiram Eldar, Dec 26 2022 *)
  • PARI
    {a(n) = if( n<1, 0, n = 4*n-1; sum(k=1, sqrtint(n), 0 == (n - k^2) % (2*k)))}; /* Michael Somos, Aug 01 2016 */

Formula

a(n) = ((r1 + 1)*(r2 + 1)*...*(rk + 1))/2, where ((p1^r1)*(p2^r2)*...*(pk^rk)) is the factorization of 4*n - 1 into (odd) primes.
G.f.: Sum_{n>0} x^n/(1-x^(4*n-1)). - Vladeta Jovovic, Jan 05 2004
a(n) = A034178(4*n - 1). - Michael Somos, May 11 2011
G.f.: Sum_{n >= 1} x^(3*n-2)/(1 - x^(4*n-3)). - Peter Bala, Jan 08 2021
From Amiram Eldar, Dec 26 2022: (Start)
a(n) = A000005(A004767(n-1))/2.
Sum_{k=1..n} a(k) = (log(n) + 2*gamma - 1 + 4*log(2))*n/4 + O(n^(1/3)*log(n)), where gamma is Euler's constant (A001620). (End)
G.f.: Sum_{n >= 1} x^(n^2)/(1-x^(2*n-1)) (conjecture). - Joerg Arndt, Jan 04 2024

A094728 Triangle read by rows: T(n,k) = n^2 - k^2, 0 <= k < n.

Original entry on oeis.org

1, 4, 3, 9, 8, 5, 16, 15, 12, 7, 25, 24, 21, 16, 9, 36, 35, 32, 27, 20, 11, 49, 48, 45, 40, 33, 24, 13, 64, 63, 60, 55, 48, 39, 28, 15, 81, 80, 77, 72, 65, 56, 45, 32, 17, 100, 99, 96, 91, 84, 75, 64, 51, 36, 19, 121, 120, 117, 112, 105, 96, 85, 72, 57, 40, 21
Offset: 1

Views

Author

Reinhard Zumkeller, May 24 2004

Keywords

Comments

(T(n,k) mod 4) <> 2, see A042965, A016825.
All numbers m occur A034178(m) times.
The row polynomials T(n,x) appear in the calculation of the column g.f.s of triangle A120070 (used to find the frequencies of the spectral lines of the hydrogen atom).

Examples

			n=3: T(3,x) = 9+8*x+5*x^2.
Triangle begins:
   1;
   4,  3;
   9,  8,  5;
  16, 15, 12,  7;
  25, 24, 21, 16,  9;
  36, 35, 32, 27, 20, 11;
  49, 48, 45, 40, 33, 24, 13;
  64, 63, 60, 55, 48, 39, 28, 15;
  81, 80, 77, 72, 65, 56, 45, 32, 17;
  ... etc. - _Philippe Deléham_, Mar 07 2013
		

Crossrefs

Programs

  • Magma
    [n^2-k^2: k in [0..n-1], n in [1..15]]; // G. C. Greubel, Mar 12 2024
    
  • Mathematica
    Table[n^2 - k^2, {n,12}, {k,0,n-1}]//Flatten (* Michael De Vlieger, Nov 25 2015 *)
  • SageMath
    flatten([[n^2-k^2 for k in range(n)] for n in range(1,16)]) # G. C. Greubel, Mar 12 2024

Formula

Row polynomials: T(n,x) = n^2*Sum_{m=0..n} x^m - Sum_{m=0..n} m^2*x^m = Sum_{k=0..n-1} T(n,k)*x^k, n >= 1.
T(n, k) = A004736(n,k)*A094727(n,k).
T(n, 0) = A000290(n).
T(n, 1) = A005563(n-1) for n>1.
T(n, 2) = A028347(n) for n>2.
T(n, 3) = A028560(n-3) for n>3.
T(n, 4) = A028566(n-4) for n>4.
T(n, n-1) = A005408(n).
T(n, n-2) = A008586(n-1) for n>1.
T(n, n-3) = A016945(n-2) for n>2.
T(n, n-4) = A008590(n-2) for n>3.
T(n, n-5) = A017329(n-3) for n>4.
T(n, n-6) = A008594(n-3) for n>5.
T(n, n-8) = A008598(n-2) for n>7.
T(A005408(k), k) = A000567(k).
Sum_{k=0..n} T(n, k) = A002412(n) (row sums).
From G. C. Greubel, Mar 12 2024: (Start)
Sum_{k=0..n-1} (-1)^k * T(n, k) = A000384(floor((n+1)/2)).
Sum_{k=0..floor((n-1)/2)} T(n-k, k) = A128624(n).
Sum_{k=0..floor((n-1)/2)} (-1)^k*T(n-k, k) = (1/2)*n*(n+1 - (-1)^n*cos(n*Pi/2)). (End)
G.f.: x*(1 - 3*x^2*y + x*(1 + y))/((1 - x)^3*(1 - x*y)^2). - Stefano Spezia, Aug 04 2025

A068314 Smallest integer that can be expressed as the sum of consecutive odd numbers in exactly n ways.

Original entry on oeis.org

1, 9, 45, 96, 144, 240, 768, 480, 720, 960, 2304, 1440, 5184, 3600, 2880, 3360, 36864, 5040, 3145728, 6720, 11520, 61440, 14400, 10080, 25920, 245760, 25200, 26880, 9437184, 20160, 12884901888, 30240, 184320, 3932160, 103680, 40320
Offset: 1

Views

Author

Naohiro Nomoto, Feb 26 2002

Keywords

Comments

The sequence continues: ?,30240,184320,3932160,103680,40320,?,129600,737280,60480,176400,80640,?,430080,100800 where ? is a value > 20000000. A value always exists since 3*(2^(i+1)) is an upper bound for the i-th term (i odd) and 5*3*(2^((i+2)/2)) is an upper bound for i even. Based on these limits, the bounds on the 31st, 37th and 43rd terms are 12884901888, 824633720832 and 52776558133248 respectively. - Larry Reeves (larryr(AT)acm.org), Dec 18 2002
Also the smallest integer that can be expressed as a difference of squares in exactly n ways. - J. M. Bergot, May 09 2019

Examples

			45 = 45 = 13+15+17 = 5+7+9+11+13, 45 is the smallest number expressible in 3 ways, so a(3)=45.
		

Crossrefs

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Dec 18 2002
Further terms from Don Reble, Sep 08 2006

A257408 Values of n such that there is exactly 1 solution to x^2 - y^2 = n with x > y >= 0.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 11, 12, 13, 17, 19, 20, 23, 28, 29, 31, 37, 41, 43, 44, 47, 52, 53, 59, 61, 67, 68, 71, 73, 76, 79, 83, 89, 92, 97, 101, 103, 107, 109, 113, 116, 124, 127, 131, 137, 139, 148, 149, 151, 157, 163, 164, 167, 172, 173, 179, 181, 188, 191, 193
Offset: 1

Views

Author

Colin Barker, Apr 22 2015

Keywords

Comments

The terms a(1)=1 and a(3)=4 are the only squares in this sequence. - M. F. Hasler, Apr 22 2015

Examples

			13 is in the sequence because there is only 1 solution to x^2 - y^2 = 13, namely (x,y) = (7,6).
		

Crossrefs

Programs

  • Mathematica
    r[n_] := Reduce[x^2 - y^2 == n && x > y >= 0, {x, y}, Integers]; Reap[For[n = 1, n < 200, n++, If[r[n][[0]] === And, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Apr 22 2015 *)
  • PARI
    is(n)=A034178(n)==1 \\ M. F. Hasler, Apr 22 2015

A257409 Values of n such that there are exactly 2 solutions to x^2 - y^2 = n, with x > y >= 0.

Original entry on oeis.org

9, 15, 16, 21, 24, 25, 27, 32, 33, 35, 36, 39, 40, 49, 51, 55, 56, 57, 60, 65, 69, 77, 84, 85, 87, 88, 91, 93, 95, 100, 104, 108, 111, 115, 119, 121, 123, 125, 129, 132, 133, 136, 140, 141, 143, 145, 152, 155, 156, 159, 161, 169, 177, 183, 184, 185, 187, 196
Offset: 1

Views

Author

Colin Barker, Apr 22 2015

Keywords

Comments

A subsequence of A058957. Terms in the latter but not here are 45, 48, 63, 64, 72, 75, 80, 81, 96, 99, ... - M. F. Hasler, Apr 22 2015

Examples

			9 is in the sequence because there are 2 solutions to x^2 - y^2 = 9, namely (x,y) = (3,0), (5,4).
		

Crossrefs

Programs

  • Mathematica
    r[n_] := Reduce[x^2 - y^2 == n && x > y >= 0, {x, y}, Integers]; Reap[For[n = 1, n < 200, n++, rn = r[n]; If[rn[[0]] === Or && Length[rn] == 2, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Apr 22 2015 *)
  • PARI
    is_A257409(n)={A034178(n)==2} \\ M. F. Hasler, Apr 22 2015

A257411 Values of n such that there are exactly 4 solutions to x^2 - y^2 = n with x > y >= 0.

Original entry on oeis.org

96, 105, 120, 135, 160, 165, 168, 189, 195, 216, 224, 231, 255, 256, 264, 273, 280, 285, 297, 312, 345, 351, 352, 357, 375, 385, 399, 408, 416, 420, 429, 435, 440, 455, 456, 459, 465, 483, 512, 513, 520, 540, 544, 552, 555, 561, 595, 608, 609, 615, 616, 621
Offset: 1

Views

Author

Colin Barker, Apr 22 2015

Keywords

Examples

			96 is in the sequence because there are 4 solutions to x^2 - y^2 = 96, namely (x,y) = (10,2), (11,5), (14,10), (25,23).
		

Crossrefs

Programs

A257417 Values of n such that there are exactly 10 solutions to x^2 - y^2 = n with x > y >= 0.

Original entry on oeis.org

960, 1344, 1728, 2112, 2240, 2496, 2592, 2835, 3240, 3264, 3520, 3648, 4160, 4416, 4455, 4536, 4928, 5265, 5440, 5568, 5824, 5952, 6080, 6144, 6237, 6885, 7104, 7128, 7360, 7371, 7616, 7695, 7872, 8000, 8256, 8424, 8512, 9024, 9152, 9280, 9315, 9639, 9920
Offset: 1

Views

Author

Colin Barker, Apr 22 2015

Keywords

Examples

			960 is in the sequence because there are 10 solutions to x^2 - y^2 = 960, namely (x,y) = (31,1), (32,8), (34,14), (38,22), (46,34), (53,43), (64,56), (83,77), (122,118), (241,239).
		

Crossrefs

Programs

A100073 Number of representations of n as the difference of two positive squares.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 2, 0, 1, 2, 1, 0, 2, 1, 1, 0, 1, 2, 2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 1, 1, 3, 0, 1, 3, 1, 0, 2, 1, 1, 0, 2, 2, 2, 0, 1, 2, 1, 0, 3, 2, 2, 0, 1, 1, 2, 0, 1, 3, 1, 0, 3, 1, 2, 0, 1, 3, 2, 0, 1, 2, 2, 0, 2, 2, 1, 0, 2, 1, 2, 0, 2, 4, 1, 0, 3, 1, 1, 0, 1, 2, 4
Offset: 1

Views

Author

T. D. Noe, Nov 02 2004

Keywords

Comments

Note that for odd n, a(n) = 1 iff n is a prime, or a prime squared.
A decomposition n = a^2 - b^2 = (a-b)(a+b) = d*(n/d) is given for each divisor d less than (as to exclude b = 0) but having the same parity as n/d. For even n this implies that d and n/d must be even, i.e., 4 | n. This leads to the given formula, a(n) = floor(numdiv(n)/2) for odd n, floor(numdiv(n/4)/2) for n = 4k, 0 else. - M. F. Hasler, Jul 10 2018
a(n) is the number of self-conjugate partitions of n into parts of 2 different sizes, i.e., the order of the set of partitions obtained by the intersection of the partitions in A000700 and A002133. See A270060. - R. J. Mathar, Jun 15 2022

Examples

			a(15) = 2 because 15 = 16 - 1 = 64 - 49.
		

Crossrefs

Cf. A056924 (number of divisors of n that are less than sqrt(n)), A016825 (numbers not the difference of two squares), A034178 (number of representations of n as the difference of two squares).

Programs

  • Maple
    A100073:= proc(n)
      if n::odd then floor(numtheory:-tau(n)/2)
      elif (n/2)::odd then 0
      else floor(numtheory:-tau(n/4)/2)
      fi
    end proc:
    map(A100073, [$1..200]); # Robert Israel, Jul 10 2018
  • Mathematica
    nn=150; a=Table[0, {nn}]; Do[y=x-1; While[d=x^2-y^2; d<=nn&&y>0, a[[d]]++; y-- ], {x, 1+nn/2}]; a
  • PARI
    a(n) = if (n % 2, ceil((numdiv(n)-1)/2), if (!(n%4),  ceil((numdiv(n/4)-1)/2), 0)); \\ Michel Marcus, Mar 07 2016
    
  • PARI
    A100073(n)=if(bittest(n,0),numdiv(n)\2,!bittest(n,1),numdiv(n\4)\2) \\ or shorter: a(n)=if(n%4!=2,numdiv(n\4^!(n%2))\2) \\ - M. F. Hasler, Jul 10 2018

Formula

a(n) = A056924(n) for odd n, a(n) = A056924(n/4) if 4|n, otherwise a(n) = 0.

A257410 Values of n such that there are exactly 3 solutions to x^2 - y^2 = n with x > y >= 0.

Original entry on oeis.org

45, 48, 63, 64, 72, 75, 80, 81, 99, 112, 117, 128, 147, 153, 171, 175, 176, 180, 200, 207, 208, 243, 245, 252, 261, 272, 275, 279, 300, 304, 324, 325, 333, 363, 368, 369, 387, 392, 396, 423, 425, 464, 468, 475, 477, 496, 507, 531, 539, 549, 575, 588, 592
Offset: 1

Views

Author

Colin Barker, Apr 22 2015

Keywords

Examples

			45 is in the sequence because there are 3 solutions to x^2 - y^2 = 45, namely (x,y) = (7,2),(9,6),(23,22).
		

Crossrefs

Programs

  • Mathematica
    r[n_] := Reduce[x^2 - y^2 == n && x > y >= 0, {x, y}, Integers]; Reap[For[n = 1, n < 600, n++, rn = r[n]; If[rn[[0]] === Or && Length[rn] == 3, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Apr 22 2015 *)
  • PARI
    is_A257410(n)={A034178(n)==3} \\ M. F. Hasler, Apr 22 2015
Showing 1-10 of 31 results. Next