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

A016032 Least positive integer that is the sum of two squares of positive integers in exactly n ways.

Original entry on oeis.org

2, 50, 325, 1105, 8125, 5525, 105625, 27625, 71825, 138125, 5281250, 160225, 1221025, 2442050, 1795625, 801125, 446265625, 2082925, 41259765625, 4005625, 44890625, 30525625, 61051250, 5928325, 303460625, 53955078125, 35409725, 100140625, 1289367675781250
Offset: 1

Views

Author

Keywords

Examples

			a(0) = 1 as 1 is the least positive integer not expressible as the sum of two squared positives.
a(1) = 2 from 2 = 1^2 + 1^2.
a(2) = 50 from 50 = 1^2 + 7^2 = 5^2 + 5^2.
		

References

  • A. Beiler, Recreations in the Theory of Numbers, Dover, pp. 140-141.

Crossrefs

Cf. A018825, A048610, A025284-A025293 (first entries).
See A000446, A124980 and A093195 for other versions.

Programs

Formula

a(n) = min(2*A018782(2n-1), A018782(2n), A018782(2n+1)).

Extensions

Corrected and extended by Jud McCranie
Definition improved by several correspondents, Nov 12 2007

A093195 Least number which is the sum of two distinct nonzero squares in exactly n ways.

Original entry on oeis.org

5, 65, 325, 1105, 8125, 5525, 105625, 27625, 71825, 138125, 126953125, 160225, 1221025, 3453125, 1795625, 801125, 446265625, 2082925, 41259765625, 4005625, 44890625, 30525625, 30994415283203125, 5928325, 303460625, 53955078125, 35409725, 100140625
Offset: 1

Views

Author

Lekraj Beedassy, Apr 22 2004

Keywords

Comments

An algorithm to compute the n-th term of this sequence: Write each of 2n and 2n+1 as products of their divisors in all possible ways and in decreasing order. For each product, equate each divisor in the product to (a1+1)(a2+1)...(ar+1), so that a1 >= a2 >= a3 >= ... >= ar, and solve for the ai. Evaluate A002144(1)^a1 * A002144(2)^a2 * ... * A002144(r)^ar for each set of values determined above, then the smaller of these products is the least integer to have precisely n partitions into a sum of two distinct positive squares. [Ant King, Dec 14 2009; May 26 2010]

Crossrefs

Cf. A002144, A018782, A054994, A025302-A025311 (first entries). See A016032, A000446 and A124980 for other versions.

Programs

  • PARI
    b(k)=my(c=0);for(i=1,sqrtint((k-1)\2),if(issquare(k-i^2),c+=1));c \\ A025441
    for(n=1,10,k=1;while(k,if(b(k)==n,print1(k,", ");break);k+=1)) \\ Derek Orr, Mar 20 2019

Formula

a(n) = min(A018782(2n), A018782(2n+1)).

Extensions

More terms from Ant King, Dec 14 2009 and Feb 07 2010

A018782 Smallest k such that circle x^2 + y^2 = k passes through exactly 4n integer points.

Original entry on oeis.org

1, 5, 25, 65, 625, 325, 15625, 1105, 4225, 8125, 9765625, 5525, 244140625, 203125, 105625, 27625, 152587890625, 71825, 3814697265625, 138125, 2640625, 126953125, 2384185791015625, 160225, 17850625, 3173828125, 1221025, 3453125
Offset: 1

Views

Author

Keywords

Comments

a(n) is least term of A054994 with exactly n divisors. - Ray Chandler, Jan 05 2012
From Jianing Song, Apr 24 2021: (Start)
a(n) is the smallest k such that A004018(k) = 4n.
Also a(n) is the smallest index of n in A002654.
a(n) is the smallest term in A004613 that has exactly n divisors.
This is a subsequence of A054994. (End)

Examples

			4225 = 5^2 * 13^2 is the smallest number all of whose prime factors are congruent to 1 modulo 4 with exactly 9 divisors, so a(9) = 4225. - _Jianing Song_, Apr 24 2021
		

Crossrefs

Programs

  • Mathematica
    (* This program is not convenient to compute huge terms - A054994 is assumed to be computed with maxTerm = 10^16 *) a[n_] := Catch[ For[k = 1, k <= Length[A054994], k++, If[DivisorSigma[0, A054994[[k]]] == n, Throw[A054994[[k]]]]]]; Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Jan 21 2013, after Ray Chandler *)
  • PARI
    primelist(d,r,l) = my(v=vector(l), i=0); if(l>0, forprime(p=2, oo, if(Mod(p,d)==r, i++; v[i]=p; if(i==l, break())))); v
    prodR(n, maxf)=my(dfs=divisors(n), a=[], r); for(i=2, #dfs, if( dfs[i]<=maxf, if(dfs[i]==n, a=concat(a, [[n]]), r=prodR(n/dfs[i], min(dfs[i], maxf)); for(j=1, #r, a=concat(a, [concat(dfs[i], r[j])]))))); a
    A018782(n)=my(pf=prodR(n, n), a=1, b, v=primelist(4, 1, bigomega(n))); for(i=1, #pf, b=prod(j=1, length(pf[i]), v[j]^(pf[i][j]-1)); if(bJianing Song, Apr 25 2021, following R. J. Mathar's program for A005179.

Formula

A000446(n) = min(a(2n-1), a(2n)) for n > 1.
A124980(n) = min(a(2n-1), a(2n)).
A016032(n) = min(2*a(2n-1), a(2n), a(2n+1)).
A093195(n) = min(a(2n), a(2n+1)).
From Jianing Song, Apr 24 2021: (Start)
If the factorization of n into primes is n = Product_{i=1..r} p_i with p_1 >= p_2 >= ... >= p_r, then a(n) <= (q_1)^((p_1)-1) * (q_2)^((p_2)-1) * ... * (q_r)^((p_r)-1), where q_1 < q_2 < ... < q_r are the first r primes congruent to 1 modulo 4. The smallest n such that the equality does not hold is n = 16.
a(n) <= 5^(n-1) for all n, where the equality holds if and only if n = 1 or n is a prime.
a(p*q) = 5^(p-1) * 13^(q-1) for primes p >= q. (End)

A000446 Smallest number that is the sum of 2 squares (allowing zeros) in exactly n ways.

Original entry on oeis.org

0, 25, 325, 1105, 4225, 5525, 203125, 27625, 71825, 138125, 2640625, 160225, 17850625, 1221025, 1795625, 801125, 1650390625, 2082925, 49591064453125, 4005625, 44890625, 2158203125, 30525625, 5928325, 303460625, 53955078125
Offset: 1

Views

Author

Keywords

Comments

Could start with a(0) = 3: the smallest nonnegative integer that can be written as sum of two squares in 0 ways. - M. F. Hasler, Jul 05 2024

Examples

			a(1) = 0 because 0 is the smallest integer which is uniquely a unique sum of two squares, namely 0^2 + 0^2.
a(2) = 25 from 25 = 5^2 + 0^2 = 3^2 + 4^2.
a(3) = 325 from 325 = 1^2 + 18^2 = 6^2 + 17^2 = 10^2 + 15^2.
a(4) = 1105 from 1105 = 4^2 + 33^2 = 9^2 + 32^2 = 12^2 + 31^2 = 23^2 + 24^2.
		

Crossrefs

Cf. A000448 (similar, but "in at least n ways").
See A016032, A093195 and A124980 for other versions.

Programs

Formula

An algorithm to compute the n-th term of this sequence for n>1: Write each of 2n and 2n-1 as products of their divisors, in decreasing order and in all possible ways. Equate each divisor in the product to (a1+1)(a2+1)...(ar+1), so that a1>=a2>=a3>=...>=ar, and solve for the ai. Evaluate A002144(1)^a1 x A002144(2)^a2 x ... x A002144(r)^ar for each set of values determined above, then the smaller of these products is the least integer to have precisely n partitions into a sum of two squares. [Ant King, Oct 07 2010]
a(n) = min(A018782(2n-1), A018782(2n)) for n > 1.
a(n) = A124980(n) for n > 1. - M. F. Hasler, Jul 07 2024

Extensions

Better description and more terms from David W. Wilson, Aug 15 1996
Definition improved by several correspondents, Nov 12 2007
Showing 1-4 of 4 results.