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

A078359 Number of ways to write n as sum of a positive square and a positive cube.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 25 2002

Keywords

Comments

a(A066650(n))=0, a(A055394(n))>0, a(A078360(n))=1, a(A054402(n))>1.
Earliest entries with a(n)=3 are n=1737, 2089, 2628, 2817. Earliest entries with a(n)=4 are n=1025, 19225, 27289, 29025, 39329, 48025, 54225. Earliest entries with a(n)=5 are n=92025, 540900, 567225, 747225. There are no a(n)>=6 in the range n=1..700000. - R. J. Mathar, Aug 16 2006
a(3375900) = 6 and a(5472225) = 7 are the first entries with those values. - Robert Israel, Jun 25 2024, [but see A060835. - Hugo Pfoertner, Jun 26 2024]

Examples

			a(1025)=4, as 1025 = 5^2 + 10^3 = 30^2 + 5^3 = 31^2 + 4^3 = 32^2 + 1^3.
		

Crossrefs

Programs

  • Maple
    interface(prettyprint=0) : A078359 := proc(n) local resul,isq,icu ; resul := 0 ; icu := 1 ; while icu^3 < n do if issqr(n-icu^3) then resul := resul+1 ; fi ; icu := icu+1 ; od ; RETURN(resul) ; end: for n from 1 to 100000 do printf("%d %d ",n,A078359(n)) ; od ; # R. J. Mathar, Aug 16 2006
  • Mathematica
    a[n_] := Which[r = Reduce[x > 0 && y > 0 && n == x^2 + y^3, {x, y}, Integers]; r === False, 0, r[[0]] === And, 1, r[[0]] === Or, Length[r], True, Print["error: ", r]];
    Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Feb 13 2018 *)
  • Python
    from collections import Counter
    from itertools import count, takewhile, product
    def aupto(lim):
      sqs = list(takewhile(lambda x: x<=lim-1, (i**2 for i in count(1))))
      cbs = list(takewhile(lambda x: x<=lim-1, (i**3 for i in count(1))))
      cts = Counter(sum(p) for p in product(sqs, cbs))
      return [cts[i] for i in range(1, lim+1)]
    print(aupto(105)) # Michael S. Branicky, May 29 2021

Formula

G.f.: (Sum_{k>=1} x^(k^2)) * (Sum_{k>=1} x^(k^3)). - Seiichi Manyama, Jun 17 2023

A078360 Numbers having a unique representation as sum of a positive square and a positive cube.

Original entry on oeis.org

2, 5, 9, 10, 12, 24, 26, 28, 31, 33, 36, 37, 43, 44, 50, 52, 57, 63, 68, 72, 73, 76, 80, 82, 91, 100, 101, 113, 122, 126, 127, 128, 134, 141, 148, 150, 152, 161, 164, 170, 171, 174, 177, 185, 189, 196, 197, 204, 206, 208, 217, 220, 223, 226, 232, 241, 246, 257
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 25 2002

Keywords

Examples

			10 is a term, as 10 = 3^2 + 1^3 and all other sums of positive squares and positives cubes are not equal 10.
17 is not a term, as 17 = 3^2 + 2^3 = 4^2 + 1^3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300], Length[Solve[a^2 + b^3 == # && a > 0 && b > 0, {a, b}, Integers]] == 1 &] (* Amiram Eldar, Mar 27 2025 *)

Formula

A078359(a(n))=1.

A206606 Primes that can be written as a sum of a positive square and a positive cube in more than two ways.

Original entry on oeis.org

2089, 4481, 7057, 15193, 15641, 16649, 23417, 34721, 65537, 68489, 69697, 72577, 93241, 118673, 123209, 146161, 173897, 176401, 191969, 199873, 205721, 216233, 239633, 259121, 264169, 271169, 280009, 286289, 296353, 301409, 318313, 342233, 347993, 357569, 381529, 447569, 466273, 477577, 526249, 534577
Offset: 1

Views

Author

Keywords

Comments

A subset of these, {65537, 93241, 191969, ..} allows this representation in more than 3 ways.

Examples

			2089 = 19^2+12^3 = 33^2+10^3 = 45^2+4^3
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # to get all terms <= N
    for x from 1 to floor(N^(1/2)) do
      for y from 1 to floor((N-x^2)^(1/3)) do
        p:= x^2 + y^3;
        if isprime(p) then
          if assigned(R[p]) then R[p]:= R[p]+1
          else R[p]:= 1
          fi
        fi
      od
    od:
    sort(map(op,select(t -> R[op(t)]>2, [indices(R)]))); # Robert Israel, Mar 21 2017
  • Mathematica
    t={}; Do[Do[AppendTo[t,n^2+m^3],{n,300}],{m,300}]; t=Sort[t]; t3={}; Do[If[t[[n]]==t[[n+2]]&&PrimeQ[t[[n]]],AppendTo[t3,t[[n]]]],{n,Length[t]-2}]; t3; f1[l_]:=Module[{t={}},Do[If[l[[n]]!=l[[n+1]],AppendTo[t,l[[n]]]],{n,Length[l]-1}];t]; (*ExtractSingleTermsOnly*) f1[t3] (* or *)
    mx = 10^6; First /@ Sort@ Select[ Tally[ Join @@ Reap[(Sow@ Select[#^3 + Range[ Sqrt[mx - #^3]]^2, PrimeQ]) & /@ Range[mx^(1/3)]][[2, 1]]], #[[2]]>2 &] (* faster, Giovanni Resta, Mar 21 2017 *)

Extensions

More terms from Robert Israel, Mar 21 2017

A162930 Primes that can be written as a sum of a positive square and a positive cube in more than one way.

Original entry on oeis.org

17, 89, 233, 449, 577, 593, 1289, 1367, 1601, 1753, 2089, 2521, 3391, 4481, 4721, 5953, 6121, 6427, 7057, 7577, 8081, 9649, 10313, 10657, 10729, 11969, 12329, 13121, 13457, 15137, 15193, 15641, 15661, 16033, 16649, 18523, 21673, 21961, 23201
Offset: 1

Views

Author

Keywords

Comments

A subset of these, 2089, 4481, 7057, 15193, 15641, etc., allows this representation in more than two ways (See A206606).

Examples

			The prime 17 can be written 1^3 + 4^2 as well as 2^3 + 3^2.
		

Crossrefs

Programs

  • Maple
    isA162930 := proc(n) if isprime(n) then wa := 0 ; for y from 1 to n/2 do if issqr(n-y^3) then if n -y^3 > 0 then wa := wa+1 ; fi; fi; od: RETURN( wa>1) ; else false; fi; end:
    for i from 1 to 2700 do if isA162930 ( ithprime(i)) then printf("%d,",ithprime(i)) ; fi; od: # R. J. Mathar, Jul 21 2009
  • Mathematica
    lst={};Do[Do[AppendTo[lst,n^2+m^3],{n,2*5!}],{m,2*5!}];lst=Sort[lst]; lst2={};Do[If[lst[[n]]==lst[[n+1]]&&PrimeQ[lst[[n]]],AppendTo[lst2, lst[[n]]]],{n,Length[lst]-1}];lst2;
  • PARI
    upto(n) = {my(res = List(), v = vector(n), i, j, i2); for(i = 1, sqrtint(n), i2 = i^2; for(j = 1, sqrtnint(n - i^2, 3), v[i2 + j^3]++)); forprime(p = 2, n, if(v[p] > 1, listput(res, p))); kill(v); res} \\ David A. Corneth, Jun 20 2023

Formula

A000040 INTERSECT A054402.

Extensions

Slightly edited by R. J. Mathar, Jul 21 2009

A171385 Sum of a positive square and a positive cube in at least three ways.

Original entry on oeis.org

1025, 1737, 2089, 2628, 2817, 3033, 3664, 4481, 4825, 4977, 5841, 7057, 7785, 7948, 8225, 8289, 8900, 10025, 11025, 11665, 12393, 14049, 14400, 14724, 15193, 15345, 15641, 15689, 15884, 16649, 16857, 18201, 18369, 19225, 19664, 19908, 20224
Offset: 1

Views

Author

Alan Frank, Dec 07 2009

Keywords

Comments

Four or more representations have 1025, 19225, 27289, 29025, 39329, 48025, 54225, 65537, 65600, 79129, 92025, 93241, 105192, 105633, 111681, ... - R. J. Mathar, Dec 11 2009

Examples

			1025 = 32^2 + 1^3, 31^2 + 4^3, 30^2 + 5^3, and 5^2 + 10^3;
1737 = 35^2 + 8^3, 3^2 + 12^3, and 39^2 + 6^3.
		

Crossrefs

Cf. A054402, integers with two or more such representations.

Programs

  • Maple
    isA171385 := proc(n) a := 0 ; for c from 1 do if c^3 >= n then break; else if issqr(n-c^3) then a := a+1 ; end if; end if; end do ; a >= 3 ; end proc: for n from 2 to 120000 do if isA171385(n) then printf("%d,",n) ; fi; end do ; # R. J. Mathar, Dec 11 2009

Extensions

More terms from R. J. Mathar, Dec 11 2009

A273508 Values of A272701 that are the sum of a positive square and a positive cube in more than one way.

Original entry on oeis.org

36998208, 449519625, 2367885312, 8016025680, 9563569561, 14753560033, 26971693632, 28769256000, 61358997609, 151544659968, 225128651328, 278450575201, 282429583137, 310289733000, 310289733000, 327699806625, 498700534033, 513025643520, 578097000000
Offset: 1

Views

Author

Altug Alkan, May 23 2016

Keywords

Comments

Taxi-cab numbers (A001235) that are the sum of two nonzero squares in more than one way and also the sum of a positive square and a positive cube in more than one way.
Subsequence of A273498.
A001235(293) = 6^3*A001235(16) = 6^3*171288 = 36998208 is the least number with this property.
14753560033 = 1453*2677*3793 is the first term that is in A272935.
Obviously, in this sequence there are perfect powers infinitely many times.

Examples

			36998208 is a term because 36998208 = 102^3 + 330^3 = 144^3 + 324^3 = 1728^2 + 324^3 = 5832^2 + 144^3 = 648^2 + 6048^2 = 1728^2 + 5832^2.
		

Crossrefs

Extensions

a(2)-a(19) from Giovanni Resta, May 24 2016
Showing 1-6 of 6 results.