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 21-29 of 29 results.

A273238 Least number k such that k^3 is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

2, 5, 25, 50, 125, 625, 1250, 65, 15625, 31250, 78125, 390625, 781250, 325, 9765625, 19531250, 48828125, 244140625, 488281250, 1625, 6103515625, 12207031250, 30517578125, 4225, 8450, 8125, 3814697265625, 7629394531250, 19073486328125, 95367431640625
Offset: 1

Views

Author

Altug Alkan, May 18 2016

Keywords

Examples

			a(1) = 2 because 2^3 = 2^2 + 2^2.
a(2) = 5 because 5^3 = 5^2 + 10^2 = 2^2 + 11^2.
a(3) = 25 because 25^3 = 35^2 + 120^2 = 44^2 + 117^2 = 75^2 + 100^2.
		

Crossrefs

Programs

  • Mathematica
    Function[t, FirstPosition[t, #] & /@ Range@ 8]@ Map[Length@ Select[ PowersRepresentations[#^3, 2, 2], ! MemberQ[#, 0] &] &, Range[2 10^3]] // Flatten (* Michael De Vlieger, May 18 2016 *)
    (* code for first 100 terms *) nR[n_] := (SquaresR[2, n] + Plus @@ Pick[{-4, 4}, IntegerQ /@ Sqrt[{n, n/2}]])/8; c[w_] := Floor[1/2 Times @@ (3 w + 1)]; q[1] = 2; q[n_] := Min[Reap[Do[ x = Times @@ (Take[{5, 13, 17, 29}, Length[e]]^e); If[c[e] == n && nR[x^3] == n, Sow[x]]; If[c[e] + 1 == n && nR[8 x^3] == n, Sow[2 x]], {e, Join[Transpose[{ Range@ 80}], Join @@ (IntegerPartitions[#, 4] & /@ Range[21]) ]}]][[2, 1]]]; Array[q, 100] (* Giovanni Resta, May 18 2016 *)
  • PARI
    A025426(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)/2
    a(n)=my(k=1); while(A025426(k++^3)!=n, ); k
    first(n)=my(v=vector(n),t,k); while(1, t=A025426(k++^3); if(t>0 && t<=n && v[t]==0, v[t]=k; if(factorback(v), return(v)))) \\ Charles R Greathouse IV, May 18 2016

Extensions

a(10)-a(30) from Giovanni Resta, May 18 2016

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

A274686 Least number k such that k-th triangular number is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

4, 40, 25, 145, 625, 169, 31249, 985, 2600, 2500, 87890625, 3649, 384199200, 15625, 33124, 6409
Offset: 1

Views

Author

Altug Alkan, Jul 02 2016

Keywords

Comments

From Robert Israel, Jul 04 2016: (Start)
Least k such that A025426(A000217(k)) = n.
A025426(A000217(18463134765625))=17, but I don't know if this is minimal. (End)
a(18) = 24649, a(20) = 40000, a(21) = 250000. 25*10^6, 25*10^8, 25*10^12 are not terms. Are there other terms of the form 25*10^(2k)? - Chai Wah Wu, Jul 23 2020

Examples

			a(2) = 40 because 40*41 / 2 = 820 = 6^2 + 28^2 = 12^2 + 26^2.
		

Crossrefs

Extensions

a(11)-a(16) from Giovanni Resta, Jul 04 2016

A350040 Number of integer-sided right triangles with hypotenuse A009003(n).

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Dec 11 2021

Keywords

Comments

a(n) mod 3 = 1 for 95.3% of the first 13211 terms, including the 70% where a(n) = 1, and only 4.7% account for the other numbers. Theorem 7 of A. Tripathi (see link below) provides the explanation that 2, 3, 5, 6, etc. are so rare. The term 8 will appear for the first time when the hypotenuse is A006339(8) = 390625. - Ruediger Jehn, Jan 13 2022
All positive integers eventually appear in this sequence. - Charles R Greathouse IV, Jan 13 2022
The normal value of a(n) is roughly log(n)^(log(3)/2). For any fixed k, the asymptotic density of n such that a(n) <= k is 0. The typical a(n) is of the form (x*3^y-1)/2 with x small (because most numbers have only a few primes with exponents > 1). - Charles R Greathouse IV, Jan 13 2022

Crossrefs

Programs

  • PARI
    is_A009003(n)=setsearch(Set(factor(n)[, 1]%4), 1);
    f(n) = {my(f = factor(n/(2^valuation(n, 2)))); (prod(k=1, #f~, if ((f[k, 1] % 4) == 1, 2*f[k, 2] + 1, 1)) - 1)/2; } \\ A046080
    lista(nn) = apply(f, select(is_A009003, [1..nn])); \\ Michel Marcus, Jan 13 2022
    
  • PARI
    A046080(n,f=factor(n))=prod(k=if(f[1,1]==2,2,1), #f~, if (f[k,1]%4 == 1, 2*f[k,2] + 1, 1))\2; \\ doesn't handle n = 1, not relevant here
    upto(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); forfactored(n=5,lim, if(u[n[1]], listput(v, A046080(0,n[2])))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
    
  • PARI
    upto(lim)=my(v=List()); forfactored(n=5,lim\=1, if(vecmin(n[2][,1]%4)==1, listput(v, prod(k=if(n[2][1,1]>2,1,2),#n[2]~, if (n[2][k,1]%4 == 1, 2*n[2][k,2] + 1, 1))\2))); Vec(v) \\ Charles R Greathouse IV, Jan 13 2022

A374805 a(n) is the smallest positive integer whose square can be represented as the sum of 3 distinct nonzero squares in exactly n ways, or -1 if no such number exists.

Original entry on oeis.org

1, 7, 15, 23, 31, 21, 33, 39, 49, 45, 79, 57, 95, 103, 75, 69, 127, 87, 63, 151, 93, 167, 111, 123, 99, 187, 117, 105, 161, 241, 141, 135, 153, 247, 271, 283, 177, 183, 165, 275, 147, 171, 323, 219
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 20 2024

Keywords

Examples

			a(3) = 23: 23^2 = 3^2 + 6^2 + 22^2 = 3^2 + 14^2 + 18^2 = 6^2 + 13^2 + 18^2.
		

Crossrefs

Extensions

a(35)-a(43) from Michael S. Branicky, Jul 21 2024

A094197 First integral ladder to be largest perpendicular-corner-bending for exactly n distinct pairs of integral corridor widths.

Original entry on oeis.org

125, 15625, 1953125, 274625, 30517578125, 3814697265625, 34328125, 59604644775390625, 7450580596923828125, 4291015625, 116415321826934814453125, 75418890625, 1349232625
Offset: 1

Views

Author

Lekraj Beedassy, May 25 2004

Keywords

Comments

In general the largest-bending ladder L across perpendicular corner where corridors of widths M and N meet,is given by L^(2/3)=M^(2/3)+ N^(2/3).

Examples

			a(4)=274625 because this is the smallest largest-integral-bending-ladder in 4 distinct stances, viz. with corridor width pairs (4096, 250047), (15625, 216000), (35937, 175616), (59319, 140608).
		

Crossrefs

Cf. A088896.

Formula

a(n)=d^3, where d=A006339(n).

A273545 Least number k such that k*n is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

2, 25, 975, 1105, 1625, 16575, 739375, 27625, 71825, 27625, 58093750, 480675, 93925, 8547175, 1077375, 801125, 76765625, 2082925, 783935546875, 801125, 942703125, 23740234375, 1404178750, 17784975, 12138425, 8300781250, 106229175, 700984375, 221252441406250
Offset: 1

Views

Author

Altug Alkan, May 26 2016

Keywords

Examples

			a(2) = 25 because 25*2 = 50 is the least even number that is the sum of two nonzero squares in exactly 2 ways; 50 = 1^2 + 7^2 = 5^2 + 5^2.
		

Crossrefs

Programs

  • Mathematica
    nR[n_] := (SquaresR[2, n] + Plus @@ Pick[{-4, 4}, IntegerQ /@ Sqrt[{n, n/2}]])/8; a[n_] := Block[{k=1}, While[nR[n * k] != n, k++]; k]; Array[a, 10] (* Giovanni Resta, May 27 2016 *)

Extensions

a(6)-a(29) from Giovanni Resta, May 26 2016

A273787 Least number k such that A001844(k) (sums of two consecutive squares) is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

1, 6, 21, 23, 221, 78, 7278, 153, 703, 1653, 6695846, 496, 670758346, 8346, 1471, 1081
Offset: 1

Views

Author

Altug Alkan, May 30 2016

Keywords

Comments

a(18) = 1978, a(20) = 4596, a(21) = 304153, a(22) = 137903, a(24) = 2628. - Chai Wah Wu, Feb 13 2018

Examples

			a(2) = 6 from 6^2 + 7^2 = 2^2 + 9^2.
a(3) = 21 from 21^2 + 22^2 = 5^2 + 30^2 = 14^2 + 27^2.
a(4) = 23 form 23^2 + 24^2 = 4^2 + 33^2 = 9^2 + 32^2 = 12^2 + 31^2.
		

Crossrefs

Programs

  • PARI
    A025426(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f~, if(f[i, 1]%4>1, if(f[i, 2]%2, return(0)), t*=f[i, 2]+1)); if(t%2, t-(-1)^v, t)/2
    a(n)=my(k=1); while(A025426(2*k*(k+1)+1)!=n, k++); k \\ Charles R Greathouse IV, Jun 03 2016

Extensions

a(10)-a(14) from Giovanni Resta, Jun 03 2016
a(15)-a(16) from Chai Wah Wu, Feb 13 2018

A375335 a(n) is the smallest positive integer whose square can be represented as the sum of n distinct nonzero squares in exactly n ways, or -1 if no such integer exists.

Original entry on oeis.org

1, 1, 25, 23, 17
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 12 2024

Keywords

Comments

a(6) = 16, a(10) = 25; a(5) > 500, a(7..9) > 100 if not -1 - Michael S. Branicky, Aug 13 2024

Examples

			a(2) = 25: 25^2 =  7^2 + 24^2
                = 15^2 + 20^2.
.
a(3) = 23: 23^2 = 3^2 +  6^2 + 22^2
                = 3^2 + 14^2 + 18^2
                = 6^2 + 13^2 + 18^2.
.
a(4) = 17: 17^2 = 2^2 + 4^2 + 10^2 + 13^2
                = 2^2 + 5^2 +  8^2 + 14^2
                = 2^2 + 8^2 + 10^2 + 11^2
                = 3^2 + 6^2 + 10^2 + 12^2.
		

Crossrefs

Previous Showing 21-29 of 29 results.