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-8 of 8 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)

A124980 Smallest strictly positive number decomposable in n different ways as a sum of two squares.

Original entry on oeis.org

1, 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, 35409725, 100140625
Offset: 1

Views

Author

Artur Jasinski, Nov 15 2006

Keywords

Comments

The number must be strictly positive, but one of the squares may be zero, as we see from a(1) = 1 = 1^2 + 0^2 and a(2) = 25 = 3^2 + 4^2 = 5^0 + 0^2. - M. F. Hasler, Jul 07 2024

Examples

			a(3) = 325 is decomposable in 3 ways: 15^2 + 10^2 = 17^2 + 6^2 = 18^2 + 1^2.
		

Crossrefs

See A016032, A000446 and A093195 for other versions.

Programs

  • PARI
    A124980(n)={for(a=1, oo, A000161(a)==n && return(a))} \\ R. J. Mathar, Nov 29 2006, edited by M. F. Hasler, Jul 07 2024
    
  • PARI
    PD(n, L=n, D=Vecrev(divisors(n)[^1])) = { if(n>1, concat(vector(#D, i, if(D[i] > L, [], D[i] < n, [concat(D[i], P) | P <- PD(n/D[i], D[i])], [[n]]))), [[]])}
    apply( {A124980(n)=vecmin([prod(i=1, #a, A002144(i)^(a[i]-1)) | a<-concat([PD(n*2,n), PD(n*2-1)])])}, [1..44]) \\ M. F. Hasler, Jul 07 2024
    
  • Python
    from sympy import divisors, isprime, prod
    def PD(n, L=None): return [[]] if n==1 else [
        [d]+P for d in divisors(n)[:0:-1] if d <= (L or n) for P in PD(n//d, d)]
    A2144=lambda upto=999: filter(isprime, range(5, upto, 4))
    def A124980(n):
        return min(prod(a**(f-1) for a,f in zip(A2144(), P))
                   for P in PD(n*2, n)+PD(n*2-1)) # M. F. Hasler, Jul 07 2024

Formula

a(n) = A000446(n), n > 1. - R. J. Mathar, Jun 15 2008
a(n) = min(A018782(2n-1), A018782(2n)).
a(n) = min { k > 0 | A000161(k) = n }. - M. F. Hasler, Jul 07 2024

Extensions

More terms from R. J. Mathar, Nov 29 2006
Edited and extended by Ray Chandler, Jan 07 2012

A000448 Smallest number that is the sum of 2 squares in at least n ways.

Original entry on oeis.org

0, 25, 325, 1105, 4225, 5525, 27625, 27625, 71825, 138125, 160225, 160225, 801125, 801125, 801125, 801125, 2082925, 2082925, 4005625, 4005625, 5928325, 5928325, 5928325, 5928325, 29641625, 29641625, 29641625, 29641625, 29641625, 29641625, 29641625, 29641625
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000446 (smallest number that is the sum of 2 squares in exactly n ways).

Formula

a(n) = min { A000446(k) ; k >= n }. - M. F. Hasler, Jul 06 2024

Extensions

Extended by Ray Chandler, Jan 13 2012

A085625 Numbers that are the sum of 2 squares in exactly 2 ways.

Original entry on oeis.org

25, 50, 65, 85, 100, 125, 130, 145, 169, 170, 185, 200, 205, 221, 225, 250, 260, 265, 289, 290, 305, 338, 340, 365, 370, 377, 400, 410, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 629, 676, 680, 685, 689, 697, 730
Offset: 1

Views

Author

Hugo Pfoertner, Jul 09 2003

Keywords

Comments

Wells erroneously writes that this sequence begins as 50, 65, 85, 145, ... . - Stefano Spezia, Sep 07 2024

Examples

			a(3) = 65 because 65 = 8^2 + 1^2 = 7^2 + 4^2;
a(4) = 85 because 85 = 9^2 + 2^2 = 7^2 + 6^2.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 125.

Crossrefs

Programs

  • Mathematica
    Select[Range[730], Length[PowersRepresentations[#,2,2]]==2 &] (* Stefano Spezia, Sep 07 2024 *)

Formula

n such that A000161(n) = 2.

A255018 Smallest number that is the sum of 3 nonnegative cubes in exactly n ways.

Original entry on oeis.org

4, 0, 216, 5104, 13896, 161568, 1259712, 2016496, 2562624, 14926248, 58995000, 34012224, 150547032, 471960000, 119095488, 1259712000, 952763904, 5159780352, 3974344704, 2176782336, 10077696000, 2985984000, 36330467328, 30723115968, 23887872000, 17414258688, 72825163776, 75686967000
Offset: 0

Views

Author

Alex Ratushnyak, Feb 25 2015

Keywords

Examples

			a(0) = 4 because the smallest number that cannot be represented as a sum of 3 nonnegative cubes is 4.
a(1) = 0 is the sum of three 0's.
a(2) = 216 = 3^3 + 4^3 + 5^3 = 6^3 + 0 + 0.
a(3) = 5104 = 1 + 12^3 + 15^3 = 2^3 + 10^3 + 16^3 = 9^3 + 10^3 + 15^3.
		

Crossrefs

Programs

  • Python
    TOP = 6000000
    a = [0]*TOP
    for b in range(TOP):
      b3 = b**3
      if b3*3>=TOP: break
      for c in range(b,TOP):
        c3 = b3 + c**3
        if c3>=TOP: break
        for d in range(c,TOP):
          res = c3 + d**3
          if res>=TOP: break
          a[res] += 1
    m = max(a)
    r = [-1] * (m+1)
    for i in range(TOP):
        if r[a[i]]==-1:  r[a[i]]=i
    print(r)

Extensions

More terms from Rémy Sigrist, Jul 14 2020

A374275 Smallest k such that k can be written in exactly n ways as x^2 + 3*x*y + y^2 with 0 <= x <= y.

Original entry on oeis.org

2, 0, 121, 2299, 6061, 43681, 66671, 33659659, 187891, 1266749, 8067191, 639533521, 2066801
Offset: 0

Views

Author

Seiichi Manyama, Jul 02 2024

Keywords

Comments

a(n) is the smallest nonnegative k such that A374276(k) = n.
a(14) = 36735721.
a(15) = 153276629.
a(16) = 7703531.
a(18) = 39269219.
a(20) = 250082921.
a(24) = 84738841.
a(32) = 454508329.

Crossrefs

Showing 1-8 of 8 results.