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

A111245 Perfect powers m^k, where m is an integer, which are not equal to the sum of m distinct primes.

Original entry on oeis.org

1, 4, 9, 25, 36, 49, 100, 121, 144, 169, 196, 225, 289, 324, 361, 400, 441, 484, 529, 576, 676, 784, 841, 900, 1089, 1156, 1225, 1369, 1444, 1521, 1600, 1681, 1764, 1849
Offset: 1

Views

Author

Giovanni Teofilatto, Oct 31 2005

Keywords

Comments

Perfect powers with k = 2.

Crossrefs

Subsequence of A000290.

Formula

a(n) = A153158(n-1) for n >= 2. - Hugo Pfoertner, Jan 14 2021

A304433 Numbers n such that n^3 is the sum of two distinct perfect powers > 1 (x^k + y^m; x, y, k, m >= 2).

Original entry on oeis.org

5, 7, 8, 10, 12, 13, 14, 17, 20, 25, 26, 28, 29, 32, 33, 34, 37, 40, 41, 45, 48, 50, 52, 53, 56, 57, 58, 61, 63, 65, 68, 71, 72, 73, 74, 78, 80, 82, 85, 89, 90, 97, 98, 100, 101, 104, 105, 106, 109, 112, 113, 114, 116, 117, 122, 125, 126, 128
Offset: 1

Views

Author

M. F. Hasler, May 12 2018

Keywords

Comments

Motivated by the search of solutions to a^n + b^(2n+2)/4 = (perfect square), which arises when searching solutions to x^n + y^(n+1) = z^(n+2) of the form x = a*z, y = b*z. It turns out that many solutions are of the form a^n = d (b^(n+1) + d), where d is a perfect power.

Examples

			5^3 = 125 = 4^2 + 11^2; 7^3 = 10^2 + 3^5; 8^3 = 13^2 + 7^3, ...
		

Crossrefs

Cf. A001597 (perfect powers), A076467 (cubes and higher powers), A304434, A304435, A304436 (analog for n^4, n^5, n^6).

Programs

  • Maple
    N:= 200: # to get terms <= N
    N3:= N^3:
    P:= {seq(seq(x^k, k=3..floor(log[x](N3))), x=2..N)}:
    filter:= proc(n) local n3, Pp, x, y;
      n3:= n^3;
      if remove(t -> subs(t, x)<=1 or subs(t, y)<=1 or subs(t, x-y)=0, [isolve(x^2+y^2=n3)]) <> [] then return true fi;
      Pp:= map(t ->n3-t, P minus {n3, n3/2});
       (Pp intersect P <> {}) or (select(issqr, Pp) <> {})
    end proc:
    select(filter, [$2..N]); # Robert Israel, Jun 01 2018
  • Mathematica
    M = 200;
    M3 = M^3;
    P = Union@ Flatten@ Table[Table[x^k, {k, 3, Floor[Log[x, M3]]}], {x, 2, M}];
    filterQ[n_] := Module[{n3, Pp, x, y}, n3 = n^3; If[Solve[x > 1 && y > 1 && x != y && x^2 + y^2 == n3, {x, y}, Integers] != {}, Return[True]]; Pp = n3 - (P ~Complement~ {n3, n3/2}); (Pp ~Intersection~ P) != {} || Select[ Pp, IntegerQ[Sqrt[#]]&] != {}];
    Select[Range[2, M], filterQ] (* Jean-François Alcover, Jun 21 2020, after Robert Israel *)
  • PARI
    L=200^3; P=List(); for(x=2, sqrtnint(L,3), for(k=3, logint(L, x), listput(P, x^k))); #P=Set(P) \\ This P = A076467 \ {1} = A111231 \ {0} up to limit L.
    is(n,e=3)={for(i=1, #s=sum2sqr(n=n^e), vecmin(s[i])>1 && s[i][1]!=s[i][2] && return(1)); for(i=1, #P, n>P[i]||return; ispower(n-P[i])&& P[i]*2 != n && return(1))} \\ The above P must be computed up to L >= n^3. For sum2sqr() see A133388.

A304434 Numbers n such that n^4 is the sum of two distinct perfect powers > 1 (x^k + y^m; x, y, k, m >= 2).

Original entry on oeis.org

3, 5, 6, 9, 10, 12, 13, 14, 15, 17, 20, 24, 25, 26, 28, 29, 30, 34, 35, 36, 37, 39, 40, 41, 42, 45, 48, 50, 51, 52, 53, 55, 57, 58, 60, 61, 63, 65, 68, 70, 71, 72, 73, 74, 75, 78, 80, 82, 85, 87, 89, 90, 91, 95, 96, 97, 98, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113
Offset: 1

Views

Author

M. F. Hasler, May 22 2018

Keywords

Comments

Motivated by the search of solutions to a^n + b^(2n+2)/4 = (perfect square), which arises when searching solutions to x^n + y^(n+1) = z^(n+2) of the form x = a*z, y = b*z. It turns out that many solutions are of the form a^n = d (b^(n+1) + d), where d is a perfect power.

Examples

			3^4 = 2^5 + 7^2; 5^4 = 7^2 + 24^2, ...
		

Crossrefs

Cf. A304433, A001597 (perfect powers), A076467 (third or higher powers).

Programs

  • Maple
    N:= 200: # to get terms <= N
    N4:= N^4:
    P:= {seq(seq(x^k,k=3..floor(log[x](N4))),x=2..floor(N4^(1/3)))}:
    filter:= proc(n) local n4, Pp;
      n4:= n^4;
      if remove(t -> subs(t,x)<=1 or subs(t,y)<=1 or subs(t,x-y)=0, [isolve(x^2+y^2=n4)]) <> [] then return true fi;
      Pp:= map(t ->n4-t, P minus {n4, n4/2});
      (Pp intersect P <> {}) or (select(issqr,Pp) <> {})
    end proc:
    A:= select(filter, [$2..N]); # Robert Israel, May 24 2018
  • PARI
    L=200^4; P=List(); for(x=2, sqrtnint(L,3), for(k=3, logint(L, x), listput(P, x^k))); #P=Set(P) \\ This P = A076467 \ {1} = A111231 \ {0} up to limit L.
    is_A304434(n)={for(i=1, #s=sum2sqr(n=n^4), vecmin(s[i])>1 && s[i][1]!=s[i][2] && return(1)); for(i=1, #P, n>P[i]||return; ispower(n-P[i])&& P[i]*2 != n && return(1))} \\ The above P must be computed up to L >= n^4. For sum2sqr() see A133388.

A304436 Numbers n such that n^6 is the sum of two distinct perfect powers > 1 (x^k + y^m; x, y, k, m >= 2).

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 25, 26, 29, 30, 33, 34, 35, 36, 37, 39, 40, 41, 45, 50, 51, 52, 53, 55, 56, 58, 60, 61, 65, 68, 70, 73, 74, 75, 78, 80, 81, 82, 85, 87, 89, 90, 91, 95, 96, 97, 100, 101, 102, 104, 105, 106, 109, 110, 111, 112, 113, 115, 116, 117, 119, 120, 122, 123, 125, 126, 130, 135, 136, 137, 140, 143, 145, 146, 148, 149, 150
Offset: 1

Views

Author

M. F. Hasler, May 25 2018

Keywords

Comments

Motivated by the search for solutions to a^n + b^(2n+2)/4 = (perfect square), which arises when searching for solutions to x^n + y^(n+1) = z^(n+2) of the form x = a*z, y = b*z. It turns out that many solutions are of the form a^n = d*(b^(n+1) + d), where d is a perfect power.

Examples

			5^6 = 35^2 + 120^2, 10^6 = 280^2 + 960^2, ...
		

Crossrefs

Cf. A304433, A304434, A304435, A001597 (perfect powers).

Programs

  • Maple
    LIM:=200^6: P:={seq(seq(x^k, k=3..floor(log[x](LIM))), x=2..floor(LIM^(1/3)))}:
    is_A304436:= proc(n) local N, S;  N:= n^6;  if remove(t -> subs(t, x)<=1 or subs(t, y)<=1 or subs(t, x-y)=0, [isolve(x^2+y^2=N)]) <> [] then return true fi;  S:= map(t ->N-t, P minus {N, N/2});  (S intersect P <> {}) or (select(issqr, S) <> {})
    end proc: # adapted from code by Robert Israel for A304434
  • Mathematica
    LIM = 200^6;
    P = Union@ Flatten@ Table[Table[x^k, {k, 3, Floor[Log[x, LIM]]}], {x, 2, Floor[LIM^(1/3)]}];
    filterQ[n_] := Module[{M = n^6, S}, If[Solve[x > 1 && y > 1 && x^2 + y^2 == M, {x, y}, Integers] != {}, Return [True]]; S = M - (P ~Complement~ {M, M/2}); S ~Intersection~ P != {} || Select[S, IntegerQ[Sqrt[#]]&] != {}];
    Reap[For[n = 1, n <= 150, n++, If[filterQ[n], Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, Aug 12 2020, after Maple *)
  • PARI
    L=200^6;P=List(); for(x=2,sqrtnint(L,3),for(k=3,logint(L,x),listput(P,x^k)));#P=Set(P) \\ This P = A076467 \ {1} = A111231 \ {0} up to limit L.
    is(n,e=6)={for(i=1,#s=sum2sqr(n=n^e),vecmin(s[i])>1 && s[i][1]!=s[i][2] && return(1)); for(i=1,#P, n>P[i]||return; ispower(n-P[i])&& P[i]*2 != n && return(1))} \\ Needs the above P computed up to L >= n^6. For sum2sqr() see A133388.

A298591 Numbers which are the sum of two distinct perfect powers x^k + y^m with x, y, k, m >= 2.

Original entry on oeis.org

12, 13, 17, 20, 24, 25, 29, 31, 33, 34, 35, 36, 40, 41, 43, 44, 45, 48, 52, 53, 57, 58, 59, 61, 63, 65, 68, 72, 73, 74, 76, 80, 81, 85, 89, 90, 91, 96, 97, 100, 104, 106, 108, 109, 113, 116, 117, 125, 127, 129, 130, 132, 133, 134, 136, 137, 141, 144, 145, 146, 148, 149, 150
Offset: 1

Views

Author

M. F. Hasler, May 26 2018

Keywords

Comments

The number of terms between 2^(n-1) and 2^n-1 is, for n = 1, 2, 3, ...: 0, 0, 0, 2, 6, 17, 24, 69, 129*, 215, 425, 891, 1571, 2994, 5655*, 10535, 20132, 38840, 73510, 140730, 268438*, 514262, ... (For terms with * the next larger power of 2 is in the sequence, so it would be, e.g., ..., 130, 214, ... if we count from 2^n+1 to 2^(n+1).) At 2^22 this corresponds to a density of about 25%, decreasing by about 1% at each power of 2.

Examples

			12 = 2^2 + 2^3, 13 = 2^2 + 3^2, 17 = 2^3 + 3^2, ...
		

Crossrefs

Programs

  • Maple
    N:= 1000: # for all terms <= N
    PP:= {seq(seq(x^k,k=2..floor(log[x](N))),x=2..floor(sqrt(N)))}:
    sort(convert(select(`<=`,{seq(seq(PP[i]+PP[j],i=1..j-1),j=2..nops(PP))},N),list)); # Robert Israel, May 27 2018
  • Mathematica
    max = 150; Table[If[x^k == y^m, Nothing, x^k + y^m], {x, 2, Sqrt[max-4]}, {y, x, Sqrt[max-4]}, {k, 2, Log[2, max-4]}, {m, 2, Log[2, max-4]}] // Flatten // Select[#, # <= max &]& // Union (* Jean-François Alcover, Sep 18 2018 *)
  • PARI
    is(n,A=A076467,s=sum2sqr(n))={for(i=1,#s, vecmin(s[i])>1 && s[i][1]!=s[i][2] && return(1)); for(i=2,#A, n>A[i]||return; ispower(n-A[i]) && A[i]*2!=n && return(1))} \\ A076467 must be computed up to limit n. See A133388 for sum2sqr.
Showing 1-5 of 5 results.