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.

A300218 Number of solutions to 1 +- 3 +- 5 +- ... +- (2*n-1) == 0 mod n.

This page as a plain text file.
%I A300218 #24 Mar 01 2018 20:23:28
%S A300218 1,2,2,4,4,12,10,36,30,104,94,344,316,1172,1096,4132,3856,14572,13798,
%T A300218 52432,49940,190652,182362,699416,671092,2581112,2485534,9586984,
%U A300218 9256396,35791472,34636834,134221860,130150588,505290272,490853416,1908874584,1857283156
%N A300218 Number of solutions to 1 +- 3 +- 5 +- ... +- (2*n-1) == 0 mod n.
%H A300218 Alois P. Heinz, <a href="/A300218/b300218.txt">Table of n, a(n) for n = 1..1000</a> (first 200 terms from Seiichi Manyama)
%e A300218 Solutions for n = 7:
%e A300218 ----------------------------
%e A300218 1 +3 +5 +7 +9 +11 +13 =  49.
%e A300218 1 +3 +5 -7 +9 +11 +13 =  35.
%e A300218 1 +3 -5 +7 -9 +11 +13 =  21.
%e A300218 1 +3 -5 -7 -9 +11 +13 =   7.
%e A300218 1 -3 +5 +7 +9 -11 +13 =  21.
%e A300218 1 -3 +5 -7 +9 -11 +13 =   7.
%e A300218 1 -3 -5 +7 +9 +11 -13 =   7.
%e A300218 1 -3 -5 +7 -9 -11 +13 =  -7.
%e A300218 1 -3 -5 -7 +9 +11 -13 =  -7.
%e A300218 1 -3 -5 -7 -9 -11 +13 = -21.
%p A300218 b:= proc(n, i, m) option remember; `if`(i<1, `if`(n=0, 1, 0),
%p A300218       add(b(irem(n+j, m), i-2, m), j=[i, m-i]))
%p A300218     end:
%p A300218 a:= n-> b(n-1, 2*n-3, n):
%p A300218 seq(a(n), n=1..40);  # _Alois P. Heinz_, Mar 01 2018
%t A300218 Table[With[{s = Range[1, (2 n - 1), 2]}, Count[Map[Total[s #] &, Take[Tuples[{-1, 1}, Length@ s], -2^(n - 1)]], _?(Divisible[#, n] &)]], {n, 22}] (* _Michael De Vlieger_, Mar 01 2018 *)
%Y A300218 Cf. A063776, A156700, A300190.
%K A300218 nonn
%O A300218 1,2
%A A300218 _Seiichi Manyama_, Feb 28 2018