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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A224928 Numbers of pairs {x, y} such that x <= y and triangular(x) + triangular(y) = 2^n. 2
 1, 1, 1, 0, 2, 0, 1, 0, 3, 0, 2, 0, 4, 0, 1, 0, 8, 0, 2, 0, 4, 0, 4, 0, 8, 0, 2, 0, 24, 0, 2, 0, 8, 0, 8, 0, 8, 0, 2, 0, 32, 0, 4, 0, 16, 0, 4, 0, 32, 0, 4, 0, 32, 0, 4, 0, 4, 0, 8, 0, 16, 0, 2, 0, 32, 0, 6, 0, 48, 0, 16, 0, 16, 0, 8, 0, 384, 0, 4, 0, 16, 0, 16, 0, 16, 0, 8, 0, 768, 0, 2, 0, 8, 0, 4, 0, 32, 0, 32, 0, 256 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS Conjectures: 1. a(n) = 0 for odd n > 1. 2. a(n) is even for even n > 14. LINKS Antti Karttunen, Table of n, a(n) for n = 0..329 FORMULA a(n) = A052343(2^n). EXAMPLE 2^1 = 1 + 1, the only representation of 2 as a sum of two triangular numbers, so a(1)=1. 2^4 = 16 = 1+15 = 6+10, two representations, so a(4) = 2. 2^8 = 256 = 3+253 = 66+190 = 120+136, so a(8) = 3. 2^12 = 4096 = 1+4095 = 91+4005 = 1540+2556 = 2016+2080, so a(12) = 4. PROG (C) #include #include typedef unsigned long long U64; U64 isTriangular(U64 a) { // ! Must be a <= (1<<63) U64 s = sqrt(a*2); if (a>=(1ULL<<63)) { if (a==(1ULL<<63)) return 0; printf("Error: a = %llu\n", a), exit(1); } return (s*(s+1)/2 == a); } int main() { U64 c, n, x, tx; for (n = 1; n; n+=n) { for (c = x = tx = 0; tx*2 <= n; ++x, tx+=x) if (isTriangular(n - tx)) ++c; //, printf("(%llu+%llu) ", tx, n-tx); printf("%llu, ", c); } return 0; } (PARI) A008441(n) = if(!n, n, sumdiv(4*n + 1, d, (d%4==1) - (d%4==3))); A052343(n) = if(!n, 1, my(u=A008441(n)); ((u\2)+(u%2))); A224928(n) = A052343(2^n); \\ Antti Karttunen, May 24 2021 CROSSREFS Cf. A000217, A052343, A006307, A225437. Sequence in context: A120616 A108044 A104477 * A308066 A052173 A177825 Adjacent sequences: A224925 A224926 A224927 * A224929 A224930 A224931 KEYWORD nonn AUTHOR Alex Ratushnyak, May 08 2013 EXTENSIONS More terms from Antti Karttunen, May 24 2021 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.

Last modified July 18 21:02 EDT 2024. Contains 374388 sequences. (Running on oeis4.)