Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A111787
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A111787 a(n) is the least k >= 3 such that n can be written as sum of k consecutive integers. a(n)=0 if such a k does not exist. +0
1
0, 0, 0, 0, 0, 3, 0, 0, 3, 4, 0, 3, 0, 4, 3, 0, 0, 3, 0, 5, 3, 4, 0, 3, 5, 4, 3, 7, 0, 3, 0, 0, 3, 4, 5, 3, 0, 4, 3, 5, 0, 3, 0, 8, 3, 4, 0, 3, 7, 5, 3, 8, 0, 3, 5, 7, 3, 4, 0, 3, 0, 4, 3, 0, 5, 3, 0, 8, 3, 5, 0, 3, 0, 4, 3, 8, 7, 3, 0, 5, 3, 4, 0, 3, 5, 4, 3, 11, 0, 3, 7, 8, 3, 4, 5, 3, 0, 7, 3, 5, 0, 3, 0, 13 (list; graph; listen)
OFFSET

1,6

COMMENT

a(n)=0 if n is an odd prime or a power of 2. For numbers of the third kind we proceed as follows: suppose n is to be written as sum of k consecutive integers starting with m, then 2n = k(2m + k - 1). Let p be the smallest odd prime divisor of n then a(n) = min(p,2n/p).

REFERENCES

Nieuw Archief voor Wiskunde 5/6 nr. 2 Problems/UWC Problem C part 3, Jun 2005, pp. 181-182

LINKS

Nieuw Archief voor Wiskunde 5/6 nr. 2 Problems/UWC, Problem C: solution

J. Spies, SAGE program for computing A111787

EXAMPLE

a(15)=3 because 15=4+5+6 (k=3) and 15=2+3+4+5 (k=4)

MAPLE

ispoweroftwo := proc(n) local a, t; t := 1; while (n > t) do t := 2*t end do; if (n = t) then a := true else a:= false end if; return a; end proc; A111787:= proc(n) local d, k; k:=0; if isprime(n) or ispoweroftwo(n) then return(0); fi; for d from 3 by 2 to n do if n mod d = 0 then k:=min(d, 2*n/d); break; fi; od; return(k); end proc; seq(A111787(i), i=1..150);

CROSSREFS

Cf. A111774, A111775, A109814.

Sequence in context: A033685 A063691 A075874 this_sequence A091921 A037285 A005082

Adjacent sequences: A111784 A111785 A111786 this_sequence A111788 A111789 A111790

KEYWORD

easy,nonn

AUTHOR

Jaap Spies (j.spies(AT)hccnet.nl), Aug 16 2005

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 December 1 19:22 EST 2009. Contains 167811 sequences.


AT&T Labs Research