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 16 results. Next

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

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

A328151 a(n) is the smallest nonnegative integer k where exactly n ordered pairs of positive integers (x, y) exist such that x^2 + y^2 = k.

Original entry on oeis.org

0, 2, 5, 50, 65, 1250, 325, 31250, 1105, 8450, 8125, 19531250, 5525, 488281250, 105625, 211250, 27625, 305175781250, 71825, 7629394531250, 138125, 5281250, 126953125, 4768371582031250, 160225, 35701250, 1221025, 2442050, 3453125
Offset: 0

Views

Author

Felix Fröhlich, Oct 05 2019

Keywords

Comments

a(n) is the smallest nonnegative i such that A063725(i) = n.
If a(n) exists, then a(n) is of the form 2*m^2 if and only if n is odd. - Chai Wah Wu, Jun 28 2024

Examples

			For n = 3: The sums of the two members of each of the pairs (1, 49), (25, 25) and (49, 1) is 50 and 50 is the smallest nonnegative integer where exactly 3 such pairs exist, so a(3) = 50.
		

Crossrefs

Programs

  • PARI
    a063725(n) = if(n==0, return(0)); my(f=factor(n)); prod(i=1, #f~, if(f[i, 1]%4==1, f[i, 2]+1, f[i, 2]%2==0 || f[i, 1]==2)) - issquare(n) \\ after Charles R Greathouse IV in A063725
    a(n) = for(x=0, oo, if(a063725(x)==n, return(x)))
    
  • Python
    # uses Python code from A063725
    from itertools import count
    def A328151(n): return next(m for m in ((k**2<<1) if n&1 else k for k in count(0)) if A063725(m)==n) # Chai Wah Wu, Jun 28 2024

Formula

Conjecture: a(2k) = A093195(k) for k >= 1, a(2k+1) = 2*A006339(k)^2 for k >= 0. - Jon E. Schoenfield, Jan 23 2022

Extensions

a(13)-a(22) from Bert Dobbelaere, Oct 20 2019
a(23)-a(28) from Chai Wah Wu, Jun 28 2024

A332989 a(n) is the smallest number writable in n different ways as the sum of two distinct nonzero pentagonal numbers.

Original entry on oeis.org

6, 211, 2999, 13352, 205427, 250927, 1134927, 2177527, 5002427, 6422352, 17349697, 30135652, 45997927, 55075502, 168570052, 130917177, 101275552, 249483677, 441561407, 433742427, 771789552, 1546505052, 1316582177, 1701923302, 2288827477, 1073520852, 3110207127
Offset: 1

Views

Author

Olivier Gérard, Mar 05 2020

Keywords

Comments

I conjecture this sequence is infinite.

Examples

			211 can be written 35 + 176 and 1 + 210;
2999 can be written 852 + 2147, 247 + 2752, 117 + 2882;
13352 = P(52) + P(79) = P(29) + P(90) = P(17) + (93) = P(10) + P(94).
		

Crossrefs

Cf. A093195 (analog sequence for perfect squares).

Programs

  • PARI
    a(n) = for(k=1, oo, if(sum(i=1, sqrt(1+12*k)\6, sqrt(1+24*k+12*i-36*i*i)%6==5)==n, return(k))); \\ Jinyuan Wang, Mar 06 2020

Extensions

Name clarified by Jinyuan Wang, Mar 06 2020
Terms a(12) and beyond from Giovanni Resta, Mar 08 2020

A350241 a(n) is the smallest number which can be represented as the sum of n distinct nonzero squares in exactly n ways, or 0 if no such number exists.

Original entry on oeis.org

1, 65, 101, 142, 175, 255, 316, 380, 501, 625, 794, 995, 1155, 1456, 1696, 2012, 2373, 2709, 3118, 3566, 4158, 4608, 5211, 5852, 6500, 7221, 8065, 8906, 9766, 11089, 11855, 12868, 14020, 15337, 16601, 17854, 19255, 20840, 22364, 23964, 25813, 27665, 29650, 31635
Offset: 1

Views

Author

Ilya Gutkovskiy, Dec 21 2021

Keywords

Examples

			For n = 2: 65 = 1^2 + 8^2 = 4^2 + 7^2.
For n = 3: 101 = 1^2 + 6^2 + 8^2 = 2^2 + 4^2 + 9^2 = 4^2 + 6^2 + 7^2.
		

Crossrefs

Extensions

More terms from Jinyuan Wang, Dec 21 2021

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

A374141 a(n) is the smallest number which can be represented as the sum of two distinct nonzero hexagonal numbers in exactly n ways, or -1 if no such number exists.

Original entry on oeis.org

7, 384, 4995, 51106, 204805, 483031, 2443431, 4674256, 10476781, 17272531, 25600656, 60765331, 90406956, 206602126, 332808531, 481676406, 303826656, 435211156, 789949306, 1406495106, 2260173906, 2704798281, 3220562556, 4435869181, 5165053156, 5309576106, 9818788281
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 28 2024

Keywords

Examples

			a(2) = 384 = 6 + 378 = 153 + 231.
		

Crossrefs

Programs

  • Python
    # see linked program

Extensions

a(9)-a(27) from Michael S. Branicky, Jun 29 2024

A374094 a(n) is the smallest nonnegative integer k where there are exactly n solutions to x^2 + x*y + y^2 = k with 0 < x < y.

Original entry on oeis.org

0, 7, 91, 637, 1729, 31213, 12103, 405769, 53599, 157339, 593047
Offset: 0

Views

Author

Seiichi Manyama, Jun 28 2024

Keywords

Comments

a(n) is the smallest nonnegative k such that A374092(k) = n.
a(11) > 10^8. - Robert Israel, Jun 28 2024

Crossrefs

Programs

  • Maple
    N:= 10^6:
    V:= Array(0..N):
    for x from 1 to floor(sqrt(N/3)) do
      for y from x+1 do
         v:= x^2 + x*y + y^2;
         if v > N then break fi;
         V[v]:= V[v]+1;
    od od:
    W:= Array(0..10);
    for i from 1 to N while count < 11 do
      v:= V[i];
      if W[v] = 0 then W[v]:= i; count:= count+1 fi
    od:
    0, seq(W[i],i=1..10); # Robert Israel, Jun 28 2024
  • Python
    from itertools import count
    from sympy.abc import x,y
    from sympy.solvers.diophantine.diophantine import diop_quadratic
    def A374094(n): return next(m for m in count(0) if sum(1 for d in diop_quadratic(x*(x+y)+y**2-m) if 0Chai Wah Wu, Jun 28 2024

Formula

a(n) <= 13 * 7^(n-1).

A374142 a(n) is the smallest number which can be represented as the sum of two distinct nonzero heptagonal numbers in exactly n ways, or -1 if no such number exists.

Original entry on oeis.org

8, 617, 8726, 255575, 1339801, 2419165, 9402323, 25764500, 35486953, 144568133, 385495261, 735503569, 638279039, 1183071664, 1571634527, 4449717748, 3584182298, 3871587494, 5693954599, 27084640649, 24205505111, 32489035067, 31973745058, 38935021406, 47570693867, 44749048300, 53075499329
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 28 2024

Keywords

Examples

			a(2) = 617 = 1 + 616 = 148 + 469.
		

Crossrefs

Programs

  • Python
    # see linked program

Extensions

a(8)-a(27) from Michael S. Branicky, Jun 29 2024
Showing 1-10 of 16 results. Next