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.

A367416 Triangle read by rows: T(n,k) = number of solutions to +- 1^k +- 2^k +- 3^k +- ... +- n^k is a k-th power, n >= 2.

This page as a plain text file.
%I A367416 #48 Jan 30 2024 02:54:22
%S A367416 4,8,1,16,1,32,0,2,64,6,128,8,256,16,4,512,26,1024,17,10,2048,67,4,3,
%T A367416 4096,100,10,8192,137,34,6,16384,426,28,1,32768,661,96,6,65536,1351,
%U A367416 146,16,8,131072,2637,230,15,262144,3831,258,40,524288,8095,1130,50
%N A367416 Triangle read by rows: T(n,k) = number of solutions to +- 1^k +- 2^k +- 3^k +- ... +- n^k is a k-th power, n >= 2.
%C A367416 In the case of n = 1, there are solutions for all k. In particular, 1^k is always a k-th power and -(1^k) is a k-th power for odd k. As a formula: T(1,k) = 1 + (k mod 2). This row is not included in the sequence.
%e A367416 Triangle begins:
%e A367416             k = 1      2     3   4  5
%e A367416   n= 2:         4;
%e A367416   n= 3:         8,     1;
%e A367416   n= 4:        16,     1;
%e A367416   n= 5:        32,     0,    2;
%e A367416   n= 6:        64,     6;
%e A367416   n= 7:       128,     8;
%e A367416   n= 8:       256,    16,    4;
%e A367416   n= 9:       512,    26;
%e A367416   n=10:      1024,    17,   10;
%e A367416   n=11:      2048,    67,    4,  3;
%e A367416   n=12:      4096,   100,   10;
%e A367416   n=13:      8192,   137,   34,  6;
%e A367416   n=14:     16384,   426,   28,  1;
%e A367416   n=15:     32768,   661,   96,  6;
%e A367416   n=16:     65536,  1351,  146, 16, 8;
%e A367416   n=17:    131072,  2637,  230, 15;
%e A367416   n=18:    262144,  3831,  258, 40;
%e A367416   n=19:    524288,  8095, 1130, 50;
%e A367416   n=20:   1048576, 15241,  854, 77, 6;
%e A367416   ...
%e A367416 The T(6,2) = 6 solutions are:
%e A367416   - 1^2 - 2^2 + 3^2 - 4^2 + 5^2 + 6^2 = 49 = 7^2,
%e A367416   - 1^2 - 2^2 + 3^2 + 4^2 + 5^2 - 6^2 =  9 = 3^2,
%e A367416   - 1^2 - 2^2 + 3^2 + 4^2 + 5^2 + 6^2 = 81 = 9^2,
%e A367416   + 1^2 - 2^2 + 3^2 - 4^2 - 5^2 + 6^2 =  1 = 1^2,
%e A367416   + 1^2 + 2^2 - 3^2 + 4^2 + 5^2 - 6^2 =  1 = 1^2,
%e A367416   + 1^2 + 2^2 + 3^2 - 4^2 - 5^2 + 6^2 =  9 = 3^2.
%o A367416 (PARI)f(k,u)=my(x=0,v=vector(#u));for(i=1,#u,u[i]=if(u[i]==0,-1,1);v[i]=i^k);u*v~
%o A367416 is(k,u)=my(x=f(k,u));ispower(x,k)
%o A367416 T(n,k)=my(u=vector(n,i,[0,1]),nbsol=0);if(k%2==1,u[1]=[1,1]);forvec(X=u,if(is(k,X),nbsol++));if(k%2==1,nbsol*=2);nbsol
%Y A367416 Cf. A063890, A215083, A368243, A368845, A369629.
%K A367416 nonn,tabf
%O A367416 2,1
%A A367416 _Jean-Marc Rebert_, Jan 26 2024