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!)
A300307 Number of solutions to 1 +- 3 +- 6 +- ... +- n*(n+1)/2 == 0 mod n. 4
1, 2, 0, 4, 4, 16, 12, 32, 20, 112, 88, 384, 308, 1264, 1056, 4096, 3852, 15120, 13820, 52608, 49824, 190848, 182356, 704512, 671540, 2582128, 2475220, 9615744, 9256428, 35868672, 34636840, 134217728, 130021392, 505292976, 491156304, 1909836416, 1857282536 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(2^n) = 2^A000325(n) for n>0 (conjectured).
EXAMPLE
Solutions for n = 7:
------------------------------
1 +3 +6 +10 +15 +21 +28 = 84.
1 +3 +6 +10 +15 +21 -28 = 28.
1 +3 +6 +10 +15 -21 +28 = 42.
1 +3 +6 +10 +15 -21 -28 = -14.
1 +3 -6 +10 -15 +21 +28 = 42.
1 +3 -6 +10 -15 +21 -28 = -14.
1 +3 -6 +10 -15 -21 +28 = 0.
1 +3 -6 +10 -15 -21 -28 = -56.
1 -3 +6 -10 -15 +21 +28 = 28.
1 -3 +6 -10 -15 +21 -28 = -28.
1 -3 +6 -10 -15 -21 +28 = -14.
1 -3 +6 -10 -15 -21 -28 = -70.
PROG
(Ruby)
def A(n)
ary = [1] + Array.new(n - 1, 0)
(1..n).each{|i|
it = i * (i + 1)
a = ary.clone
(0..n - 1).each{|j| a[(j + it) % n] += ary[j]}
ary = a
}
ary[(n * (n + 1) * (n + 2) / 6) % n] / 2
end
def A300307(n)
(1..n).map{|i| A(i)}
end
p A300307(100)
CROSSREFS
Sequence in context: A296805 A336974 A084247 * A286606 A266587 A070692
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 02 2018
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 27 01:58 EDT 2024. Contains 372004 sequences. (Running on oeis4.)