This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A281071 Largest number k such that b - r is even or r = 0 for all b = 1..k where r = n mod b. 2
 1, 2, 1, 4, 1, 6, 1, 2, 1, 10, 1, 4, 1, 2, 1, 6, 1, 6, 1, 2, 1, 4, 1, 4, 1, 2, 1, 10, 1, 6, 1, 2, 1, 4, 1, 12, 1, 2, 1, 8, 1, 4, 1, 2, 1, 6, 1, 6, 1, 2, 1, 4, 1, 4, 1, 2, 1, 6, 1, 6, 1, 2, 1, 4, 1, 14, 1, 2, 1, 10, 1, 4, 1, 2, 1, 6, 1, 8, 1, 2, 1, 4, 1, 4, 1, 2, 1, 6, 1, 6, 1, 2, 1, 4, 1, 8, 1, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Consider a text mode screen which is a fixed number of character columns wide. Text only breaks at the screen width, there is no manual line break. Then a(n) is the largest screen width in terms of characters so that a string of n printable characters can be perfectly centrally aligned on this and all smaller widths. a(n) = n for n in {1, 2, 4, 6, 10}, otherwise a(n) < n. The sequence is unbounded. LINKS Martin Janecke, Table of n, a(n) for n = 1..10000 EXAMPLE a(22) = 4 because   22 mod 1 = 0 where r = 0,   22 mod 2 = 0 where r = 0,   22 mod 3 = 1 where 3 - 1 is even,   22 mod 4 = 2 where 4 - 2 is even, but   22 mod 5 = 2 where r > 0 and 5 - 2 is odd. PROG (PARI) a(n) = {ok = 1; k = 1; while(ok, v = vector(k, b, if ((n % b)==0, 0, b - (n%b))); ok = #select(x->((x % 2)==0), v) == k; if (ok, k++); ); k--; } \\ Michel Marcus, Jan 23 2017 CROSSREFS Cf. A281072. Sequence in context: A214052 A276094 A247339 * A256908 A258409 A060680 Adjacent sequences:  A281068 A281069 A281070 * A281072 A281073 A281074 KEYWORD easy,nonn AUTHOR Martin Janecke, Jan 14 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 24 06:53 EDT 2019. Contains 323529 sequences. (Running on oeis4.)