Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A007885
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A007885 Numbers n such that balanced sequences exist with n distinct elements. +0
1
1, 2, 3, 4, 5, 7, 11, 13, 19, 23, 29, 37, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 131, 139, 149, 163, 167, 173, 179, 181, 191, 197, 199, 211, 227, 239, 263, 269, 271, 293, 311, 317, 347, 349, 359, 367, 373, 379, 383, 389, 419, 421, 443, 461, 463, 467 (list; graph; listen)
OFFSET

1,2

COMMENT

A nondecreasing sequence a_1, ..., a_n is called balanced if the n-1 quantities D(a_1,...,a_k)+D(a_(k+1),...,a_n) (1<=k<=n-1) are all equal, where D(a_1,...,a_k) is the sum of the absolute deviations of the a's from their median. Up to affine equivalence, there's a unique balanced sequence of any given length.

n is in the sequence iff n=1, 2, or 4, or n is prime and the multiplicative group of integers mod n is generated by -1 and 2.

REFERENCES

Problem 10430, Amer. Math. Monthly, 102 (1995), 71.

Problem 10430 solution, Amer. Math. Monthly, 104 (1997), 671-672.

EXAMPLE

n=5 is in the sequence, since 0,2,3,4,6 is balanced. n=6 is not because every balanced sequence of length 6 is affinely equivalent to 0,1,2,2,3,4.

MATHEMATICA

o2[n_] := MultiplicativeOrder[2, n]; For[n=1, True, n++, If[Mod[4, n]==0||(PrimeQ[n]&&(o2[n]==n-1|| (o2[n]==(n-1)/2&&Mod[n, 4]==3))), Print[n]]]

CROSSREFS

Adjacent sequences: A007882 A007883 A007884 this_sequence A007886 A007887 A007888

Sequence in context: A033070 A046022 A073019 this_sequence A003037 A046420 A108318

KEYWORD

nonn,nice

AUTHOR

C. L. Mallows (colinm(AT)research.avayalabs.com)

EXTENSIONS

More terms and additional comments from Dean Hickerson (dean(AT)math.ucdavis.edu), Sep 20, 2001

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified October 6 16:13 EDT 2008. Contains 144667 sequences.


AT&T Labs Research