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.

Previous Showing 31-40 of 45 results. Next

A063665 Number of ways 1/n can be written as 1/x^2 + 1/y^2 with y >= x >= 1.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Henry Bottomley, Jul 25 2001

Keywords

Comments

Number of ordered pairs (x,y), with n = (x^2)(y^2)/(x^2 + y^2) and y >= x > 0. - Antti Karttunen, Nov 07 2018

Examples

			a(90)=1 since 1/90 = 1/10^2 + 1/30^2
a(98)=2 since 1/98 = 1/10^2 + 1/70^2 = 1/14^2 + 1/14^2.
a(14400) = 3 since 1/14400 = 1/130^2 + 1/312^2 = 1/136^2 + 1/255^2 = 1/150^2 + 1/200^2. - _Antti Karttunen_, Nov 07 2018
		

Crossrefs

Programs

  • PARI
    A063665(n) = { my(s=0); for(x=1,n,for(y=x,n,if((n*(x*x+y*y)) == (x*x*y*y), s++))); (s); }; \\ Antti Karttunen, Nov 07 2018
    
  • PARI
    A063665(n) = { my(s=0,y); for(x=sqrtint(n),n,my(x2=x*x); if((x2>n)&&issquare((n*x2)/(x2-n),&y)&&(1==denominator(y))&&(y>=x),s++)); (s); }; \\ Antti Karttunen, Nov 07 2018

Extensions

Definition clarified by Antti Karttunen, Nov 07 2018

A216283 Number of nonnegative solutions to the equation x^2+5*y^2 = n.

Original entry on oeis.org

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

Views

Author

V. Raman, Sep 03 2012

Keywords

Comments

Records occur at 1, 9, 81, 189, 441, 1449, 3969, 12789, 13041, 30429, ... - Antti Karttunen, Aug 23 2017

Examples

			For n = 9, there are two solutions: 9 = 3^2 + 5*(0^2) = 2^2 + 5*(1^2), thus a(9) = 2.
For n = 81, there are three solutions: 81  = 9^2 + 5*(0^2) = 6^2 + 5*(3^2) = 1^2 + 5*(4^2), thus a(81) = 3.
		

Crossrefs

Cf. A033718 (all solutions x^2+5*y^2 = n).
Cf. A020669 (positions of nonzeros).

Programs

  • PARI
    N=666;  x='x+O('x^N);
    T(x)=sum(n=0,ceil(sqrt(N)),x^(n*n));
    Vec(T(x)*T(x^5))
    /* Joerg Arndt, Sep 21 2012 */
    
  • Scheme
    (define (A216283 n) (cond ((< n 2) 1) (else (let loop ((k (A000196 n)) (s 0)) (if (< k 0) s (let ((x (- n (* k k)))) (loop (- k 1) (+ s (if (zero? (modulo x 5)) (A010052 (/ x 5)) 0))))))))) ;; Antti Karttunen, Aug 23 2017

Formula

G.f. T(x) * T(x^5) where T(x) = sum(n>=0, x^(n^2) ). - Joerg Arndt, Sep 21 2012

Extensions

Examples from Antti Karttunen, Aug 23 2017

A216278 Number of solutions to the equation x^2+2y^2 = n with x and y > 0.

Original entry on oeis.org

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

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • Mathematica
    r[n_] := Reduce[x > 0 && y > 0 && x^2 + 2 y^2 == n, Integers];
    a[n_] := Which[rn = r[n]; rn === False, 0, Head[rn] === And, 1, Head[rn] === Or, Length[rn], True, -1];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Jun 24 2017 *)

A216279 Number of solutions to the equation x^2+5y^2 = n with x and y > 0.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Crossrefs

Programs

  • PARI
    a(n)=sum(k=1,sqrtint((n-1)\5), issquare(n-5*k^2)) \\ Charles R Greathouse IV, Jun 06 2016
    
  • PARI
    list(lim)=my(v=vector(lim\1),t); for(y=1,sqrtint((#v-1)\5), t=5*y^2; for(x=1,sqrtint(#v-t), v[x^2+t]++)); v \\ Charles R Greathouse IV, Jun 06 2016

A216280 Number of nonnegative solutions to the equation x^4 + y^4 = n.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Comments

The first n with a(n) > 1 is 635318657 = 41 * 113 * 241 * 569, with a(635318657) = 2. Izadi, Khoshnam, & Nabardi show that for any n with a(n) > 1, the elliptic curve y^2 = x^3 - nx has rank at least 3. According to gp, y^2 = x^3 - 635318657x has analytic rank 4 (and first nonzero derivative around 35741.7839). - Charles R Greathouse IV, Jan 12 2017

Crossrefs

Cf. A004831 (positions of nonzero terms).

Programs

  • Mathematica
    Reap[For[n = 1, n <= 1000, n++, r = Reduce[0 <= x <= y && x^4 + y^4 == n, {x, y}, Integers]; sols = Which[r === False, 0, r[[0]] == And, 1, r[[0]] == Or, Length[r], True, Print[n, " ", r]]; If[sols != 0, Print[n, " ", sols, " ", r]]; Sow[sols]]][[2, 1]] (* Jean-François Alcover, Feb 22 2019 *)
  • PARI
    a(n)=my(t=thue(thueinit('x^4+1,1),n)); sum(i=1,#t, t[i][1]>=0 && t[i][2]>=t[i][1]) \\ Charles R Greathouse IV, Jan 12 2017
    
  • PARI
    first(n)=my(T=thueinit('x^4+1,1),v=vector(n),t); for(k=1,n, t=thue(T,k); v[k]=sum(i=1,#t, t[i][1]>=0 && t[i][2]>=t[i][1])); v \\ Charles R Greathouse IV, Jan 12 2017

Extensions

Offset added by Charles R Greathouse IV, Jan 12 2017

A274567 Least number k such that k^2-1 is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

3, 81, 51, 291, 1251, 339, 62499, 1971, 5201, 5001, 175781251, 7299
Offset: 1

Views

Author

Altug Alkan, Jun 28 2016

Keywords

Comments

a(11) > 25*10^5 if it exists. - Chai Wah Wu, Jul 23 2020
From David A. Corneth, Jul 23 2020: (Start)
a(13) <= 17578125001, a(17) <= 610351562499. (End)

Examples

			a(2) = 81 because 81^2 - 1 = 28^2 + 76^2 = 44^2 + 68^2.
		

Crossrefs

Extensions

a(10) from Chai Wah Wu, Jul 22 2020

A336542 Primitive integers for the number of ways k to write as a sum of two squares.

Original entry on oeis.org

1, 2, 5, 10, 25, 50, 65, 125, 130, 250, 325, 625, 650, 1105, 1250, 1625, 2210, 3125, 3250, 4225, 5525, 6250, 8125, 8450, 11050, 15625, 16250, 21125, 27625, 31250, 32045, 40625, 42250, 55250, 64090, 71825, 78125, 81250, 105625, 138125, 143650, 156250, 160225, 203125, 211250
Offset: 1

Views

Author

David A. Corneth, Jul 24 2020

Keywords

Comments

The number of ways to write k as a number of two squares only depends on the parity of the multiplicity of 2, the parity of the multiplicity of a prime of the form 4*m + 3 and the multiplicity of a prime of the form 4*m+1 (See A025426). Terms in this sequence have no prime factors of the form 4*m + 3.

Examples

			650 = 2*5*13 is in the sequence as its prime factors are 2 or of the form 4*m + 1. It's the least positive integer of the form 2*p*q where p and q are distinct and each of the form 4*m+1.
		

Crossrefs

A211339 Number of integer pairs (x,y) such that 1 < x <= y <= n and x^2 + y^2 <= n.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 7, 7, 8, 8, 8, 8, 8, 9, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 19, 19, 20, 21, 21, 21, 21, 21, 22, 22, 22, 23, 23, 23, 23, 25, 25, 25, 26, 26, 26, 26, 27, 28, 29
Offset: 1

Views

Author

Clark Kimberling, Apr 08 2012

Keywords

Comments

Partial sums of A025426.
For a guide to related sequences, see A211266.

Crossrefs

Cf. A211266.

Programs

  • Mathematica
    a = 1; b = n; z1 = 120;
    t[n_] := t[n] = Flatten[Table[x^2 + y^2, {x, a, b - 1}, {y, x, b}]]
    c[n_, k_] := c[n, k] = Count[t[n], k]
    TableForm[Table[c[n, k], {n, 1, 10}, {k, 1, 2 n}]]
    Table[c[n, n], {n, 1, z1}]   (* A025426 *)
    c1[n_, m_] := c1[n, m] = Sum[c[n, k], {k, a, m}]
    Table[c1[n, n], {n, 1, z1}]  (* A211339 *)

Formula

a(n) = -1/2(-1 + floor(sqrt(n/2)))(floor(sqrt(n/2))) + Sum_{k=1..floor(sqrt(n/2))} floor(sqrt(n - k^2)). - Nicholas Stearns, Apr 03 2017

A217463 a(n) is the sum of total number of positive integer solutions to each of a^2 + b^2 = n, a^2 + 2*b^2 = n, a^2 + 3*b^2 = n and a^2 + 7*b^2 = n. (Order does not matter for the equation a^2+b^2 = n).

Original entry on oeis.org

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

Views

Author

V. Raman, Oct 04 2012

Keywords

Comments

Note: For the equation a^2 + b^2 = n, if there are two solutions (a,b) and (b,a), then they will be counted only once.
The sequences A216501 and A216671 give how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to.
1, 2, 3, 7 are the first four numbers, with the class number 1.
"If a composite number C is of the form a^2 + kb^2 for some integers a & b, then every prime factor of C raised to an odd power is of the form c^2 + kd^2 for some integers c & d."
This statement is only true for k = 1, 2, 3.
For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
A number can be written as a^2 + b^2 if and only if it has no prime factor congruent to 3 (mod 4) raised to an odd power.
A number can be written as a^2 + 2b^2 if and only if it has no prime factor congruent to 5 (mod 8) or 7 (mod 8) raised to an odd power.
A number can be written as a^2 + 3b^2 if and only if it has no prime factor congruent to 2 (mod 3) raised to an odd power.
A number can be written as a^2 + 7b^2 if and only if it has no prime factor congruent to 3 (mod 7) or 5 (mod 7) or 6 (mod 7) raised to an odd power, and the exponent of 2 is not 1.

References

  • David A. Cox, Primes of the Form x^2 + n y^2, Wiley, 1989.

Crossrefs

Cf. A217869 (related sequence of this when the order does matter for the equation a^2 + b^2 = n).
Cf. A216501 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a > 0, b > 0).
Cf. A216671 (how many of the four k values, k = 1, 2, 3, 7 does the equation a^2 + k*b^2 = n have a solution to, with a >= 0, b >= 0).
Cf. A025426 (number of solutions to n = a^2+b^2 (when the solutions (a, b) and (b, a) are being counted as the same) with a > 0, b > 0).
Cf. A216278 (number of solutions to n = a^2+2*b^2 with a > 0, b > 0).
Cf. A092573 (number of solutions to n = a^2+3*b^2 with a > 0, b > 0).
Cf. A216511 (number of solutions to n = a^2+7*b^2 with a > 0, b > 0).

Programs

  • PARI
    for(n=1,100,sol=0;for(x=1,100,if(issquare(n-x*x)&&n-x*x>0&&x*x<=n-x*x,sol++);if(issquare(n-2*x*x)&&n-2*x*x>0,sol++);if(issquare(n-3*x*x)&&n-3*x*x>0,sol++);if(issquare(n-7*x*x)&&n-7*x*x>0,sol++));printf(sol","))

A273279 Least perfect power that is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

8, 125, 3125, 4225, 1953125, 48828125, 105625, 274625, 762939453125, 2640625, 476837158203125, 17850625, 1221025, 34328125, 186264514923095703125, 1650390625, 446265625, 1160290625, 41259765625, 4291015625, 45474735088646411895751953125, 30525625
Offset: 1

Views

Author

Altug Alkan, May 19 2016

Keywords

Comments

Least m^k that is the sum of two nonzero squares in exactly n ways where m > 0 and k >= 2.
Terms of this sequence are 2^3, 5^3, 5^5, 65^2, 5^10, 5^11, 325^2, 65^3, ...
Prime powers that are listed in this sequence are 2^3, 5^3, 5^5, 5^10, 5^11, ...

Examples

			8 is a term because 8 = 2^3 = 2^2 + 2^2.
125 is a term because 125 = 5^3 = 2^2 + 11^2 = 5^2 + 10^2.
3125 is a term because 3125 = 5^5 = 10^2 + 55^2 = 25^2 + 50^2 = 38^2 + 41^2.
		

Crossrefs

Programs

  • Mathematica
    p = Select[Prime@ Range@ 90, Mod[#, 4] == 1 &]; f[w_] := Times @@ (Take[p, Length@w]^Reverse[w]); c[w_] := Floor[(1/2) Times @@ (w+1)];r[w_] := Block[{v, k = If[Length@w == 1, 1,2]}, While[(v = cn[k w]) < trg, k++]; If[v == trg, b = Min[b, f[k*w]]]; If[cn[w] < trg, r[Append[w, 1]]; v=w; v[[-1]]++; r[v]]]; a[1]=8; a[n_] := (b=Infinity; trg = n; r[{2}]; r[{1, 1}]; b); Array[a, 50] (* Giovanni Resta, May 19 2016 *)

Extensions

a(9)-a(22) from Giovanni Resta, May 19 2016
Previous Showing 31-40 of 45 results. Next