login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078359 Number of ways to write n as sum of a positive square and a positive cube. 5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,17
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
LINKS
FORMULA
G.f.: (Sum_{k>=1} x^(k^2)) * (Sum_{k>=1} x^(k^3)). - Seiichi Manyama, Jun 17 2023
EXAMPLE
a(1025)=4, as 1025 = 5^2 + 10^3 = 30^2 + 5^3 = 31^2 + 4^3 = 32^2 + 1^3.
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 *)
PROG
(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
CROSSREFS
Sequence in context: A096562 A096563 A216512 * A107329 A263717 A230279
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 25 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:57 EDT 2024. Contains 371905 sequences. (Running on oeis4.)