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 11-14 of 14 results.

A349778 Number of ways to write n as x^2 + y^k + 2*z^m, where x,y,z are nonnegative integers with x >= y, and k and m belong to the set {2,3}.

Original entry on oeis.org

4, 4, 8, 4, 8, 4, 4, 4, 4, 6, 8, 4, 8, 4, 2, 2, 7, 10, 12, 8, 9, 3, 4, 2, 5, 11, 10, 8, 8, 3, 1, 3, 7, 10, 11, 5, 12, 7, 7, 4, 5, 8, 8, 7, 8, 8, 2, 3, 4, 9, 11, 8, 18, 5, 11, 8, 4, 8, 11, 8, 7, 6, 3, 8, 7, 12, 12, 12, 11, 4, 7, 5, 10, 9, 11, 7, 11, 4, 3, 6, 11, 13, 17, 9, 10, 6, 5, 7, 7, 13, 13, 12, 5, 6, 3, 3, 5, 14, 12, 10, 18
Offset: 0

Views

Author

Zhi-Wei Sun, Nov 29 2021

Keywords

Comments

Conjecture 1: a(n) > 0 for all n >= 0, and a(n) = 1 only for n = 30, 120, 142.
We have verified this for all n <= 10^6.
Conjecture 2: Let S = {x^k: k = 2,3 and x = 0,1,2,...}, and let a be 3 or 4 or 5. Then any nonnegative integer can be written as x + 2*y + a*z, where x,y,z are elements of the set S.
Conjecture 3: Let T = {x^k: k = 2,3,4,... and x = 0,1,2,...}. If (b,c) is among the ordered pairs (1,2), (2,4), (2,5) and (3,2), then each n = 0,1,... can be written as x + b*y + c*z, where x and y are elements of T, and z is a square.

Examples

			a(3) = 4. In fact, 3 = 1^2 + 0^2 + 2*1^2 = 1^2 + 0^2 + 2*1^3 = 1^2 + 0^3 + 2*1^2 = 1^2 + 0^3 + 2*1^3 with 1 >= 0.
a(30) = 1 with 30 = 2^2 + 2^3 + 2*3^2 and 2 >= 2.
a(120) = 1 with 120 = 10^2 + 2^2 + 2*2^3 and 10 >= 2.
a(142) = 1 with 142 = 6^2 + 2^3 + 2*7^2 and 6 >= 2.
		

Crossrefs

Programs

  • Mathematica
    tab={};Do[r=0;Do[If[IntegerQ[((n-x^2-y^k)/2)^(1/m)],r=r+1],{x,0,Sqrt[n]},{k,2,3},{y,0,Min[x,(n-x^2)^(1/k)]},{m,2,3}];tab=Append[tab,r],{n,0,100}];Print[tab]

A349787 Number of ways to write n as x^2 + y^k + 2^a + 2^b, where x,y,a,b are nonnegative integers with x >= y and a >= b, and k is either 2 or 3.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 30 2021

Keywords

Comments

Conjecture 1: a(n) > 0 for all n >= 2.
Below is our weaker version of Conjecture 1.
Conjecture 2: Each n = 2,3,... can be written as a sum of two perfect powers (including 0 and 1) and two powers of 2 (including 2^0 = 1).
In contrast, R. Crocker proved in 2008 that there are infinitely many positive integers which cannot be written as a sum of two squares and two powers of 2.

Examples

			a(2) = 2 with 2 = 0^2 + 0^2 + 2^0 + 2^0 = 0^2 + 0^3 + 2^0 + 2^0.
a(535903) > 0 since 535903 = 336^2 + 31^3 + 2^18 + 2^17 with 336 >= 31 and 18 >= 17.
		

Crossrefs

Programs

  • Mathematica
    PowQ[n_]:=PowQ[n]=IntegerQ[Log[2,n]];
    tab={};Do[r=0;Do[If[PowQ[n-x^2-y^k-2^a],r=r+1],{x,0,Sqrt[n-2]},{k,2,3},{y,0,Min[x,(n-2-x^2)^(1/k)]},{a,0,Log[2,n-x^2-y^k]-1}];tab=Append[tab,r],{n,2,85}];Print[tab]

A233444 Primes that are exactly halfway between the nearest square and the nearest cube.

Original entry on oeis.org

2203, 90863, 185477, 388573, 613607, 912349, 1293899, 1600919, 2146457, 30661333, 35608189, 81190429, 105823093, 122753857, 204341747, 338602837, 368601707, 374788121, 426958673, 498675409, 586371239, 656232799, 665360321, 674509487, 693132527, 1102304669, 1180942709
Offset: 1

Views

Author

Alex Ratushnyak, Dec 09 2013

Keywords

Comments

A subsequence of A233075.

Crossrefs

Cf. A002760 (Squares and cubes).

Programs

  • Maple
    Res:= NULL:
    for x from 3 to 2000 do
      x3:= x^3;
      y:= floor(sqrt(x3));
      p:= (x3+y^2)/2;
      if p::integer and x3-p <= p - (x-1)^3 and p - y^2 <= (y+1)^2-p and isprime(p) then
        Res:= Res, p;
      fi;
      p:= (x3+(y+1)^2)/2;
      if p::integer and p-x3 <= (x+1)^3-p and (y+1)^2-p <= p - y^2 and isprime(p) then
          Res:= Res, p;
      fi
    od:
    Res; # Robert Israel, May 01 2018

A354761 Least number of squares and cubes that add up to n.

Original entry on oeis.org

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

Views

Author

Peter Schorn, Jun 06 2022

Keywords

Comments

a(n) <= 4 since any number can be written as a sum of 4 squares (Lagrange's theorem).
Sequence first differs from A063274, A225926 and A274459 at n = 32 since 32 is a powerful number, a prime power and a perfect power but neither a square nor a cube.

Examples

			a(1) = 1, a(4) = 1 (4 = 2^2), a(7) = 4 (7 = 2^2 + 1^2 + 1^2 + 1^2), a(8) = 1 (8 = 2^3), a(12) = 2 (12 = 2^3 + 2^2), a(17) = 2 (17 = 4^2 + 1^2), a(32) = 2 (32 = 4^2 + 4^2).
		

Crossrefs

Programs

  • PARI
    lista(n) = {my(v = vector(n)); for(j = 2, 3, for(i = 2, sqrtnint(n, j), v[i^j] = 1)); v[1]=1; v[2]=2; for(i=3, #v, if(v[i]==0, v[i] = vecmin(vector(i\2, k, v[k] + v[i-k])))); v}
Previous Showing 11-14 of 14 results.