[go: up one dir, main page]

login
Revision History for A229138 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Number of solutions to Sum_{i=1...n} x_i^2 == 1 (mod 8) with x_i in 0..7.
(history; published version)
#35 by Charles R Greathouse IV at Thu Sep 08 08:46:05 EDT 2022
PROG

(MAGMAMagma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/((1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)) )); // G. C. Greubel, Dec 21 2019

Discussion
Thu Sep 08
08:46
OEIS Server: https://oeis.org/edit/global/2944
#34 by Peter Luschny at Sat Dec 21 18:20:33 EST 2019
STATUS

reviewed

approved

#33 by Michel Marcus at Sat Dec 21 02:52:46 EST 2019
STATUS

proposed

reviewed

#32 by Petros Hadjicostas at Sat Dec 21 01:12:55 EST 2019
STATUS

editing

proposed

#31 by Petros Hadjicostas at Sat Dec 21 01:12:52 EST 2019
MATHEMATICA

h[n_]:=Length@Reduce[Sum[x[i]^2, {i, 1, n}]==1, Modulus->8]; Table[h[n], {n, 8}]

STATUS

proposed

editing

#30 by G. C. Greubel at Sat Dec 21 00:43:01 EST 2019
STATUS

editing

proposed

Discussion
Sat Dec 21
01:03
Petros Hadjicostas: I was able to run it and got the answer (after your changes)...
01:04
Petros Hadjicostas: Oh... No... We have two programs... do we?
01:06
Petros Hadjicostas: The first one (with h[n_]) yields {4, 16, 96, 512, 2560, 24576, 229376, 2}, which is weird... What is going on?
#29 by G. C. Greubel at Sat Dec 21 00:41:34 EST 2019
FORMULA

G.f.: -4*x*(20481 -12*x^6-1024 +56*x^5+2 -128*x^4-3 +128*x^3+564 -1024*x^2-125 +2048*x+1^6) / ((8*x-1)*(32*x^2-8*x+)*(1)*(+256*x^4+)*(1-8*x+32*x^2)). - Colin Barker, Nov 10 2014

MAPLE

seq(coeff(series(4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/( (1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)), x, n+1), x, n), n = 1..30); # G. C. Greubel, Dec 21 2019

MATHEMATICA

h[n_]:=Length@Reduce[Sum[x[i]^2, {i, 1, n}]==1, Modulus->8]; Table[h[n], {n, 8}]

h[n_]:=Length@Reduce[Sum[x[i]^2, {i, 1, n}]==1, Modulus->8]; Table[h[n], {n, 1, 8}]; a[n_] := a[n] = 16 a16a[n - 1] - 96 a96a[n - 2] + 256 a256a[n - 3] - 256 a256a[n - 4] + 4096 a4096a[n - 5] - 24576 a[n - 6] + 65536 a[n - 7]; Do[ a[i]={4, 16, 96, 512, 2560, 24576, 229376}[[i]], {i, 1, 7}]; Array[a, 33]

PROG

(PARI) Vec(-4*x*(20481-12*x^6-1024+56*x^5+2-128*x^4-3+128*x^3+564-1024*x^2-125+2048*x+1^6)/((8*x-1)*(32*x^2-8*x+)*(1)*(+256*x^4+)*(1-8*x+32*x^2)) + O(x^10030)) \\ Colin Barker, Nov 10 2014

(MAGMA) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/((1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)) )); // G. C. Greubel, Dec 21 2019

(Sage)

def A229138_list(prec):

P.<x> = PowerSeriesRing(ZZ, prec)

return P( 4*x*(1 -12*x +56*x^2 -128*x^3 +128*x^4 -1024*x^5 +2048*x^6)/( (1-8*x)*(1+256*x^4)*(1-8*x+32*x^2)) ).list()

a=A229138_list(30); a[1:] # G. C. Greubel, Dec 21 2019

STATUS

reviewed

editing

Discussion
Sat Dec 21
00:43
G. C. Greubel: First Mma program yields the error: Reduce was unable to solve the system. Increasing the value of  "MaxModularPoints" in SystemOptions["ReduceOptions"] may help. Fixable or should it be removed?
#28 by Michel Marcus at Sat Dec 21 00:33:09 EST 2019
STATUS

proposed

reviewed

#27 by Petros Hadjicostas at Fri Dec 20 23:03:11 EST 2019
STATUS

editing

proposed

#26 by Petros Hadjicostas at Fri Dec 20 23:03:01 EST 2019