Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A104512
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A104512 Minimum number a(n) which is the first of k>1 consecutive integers, the sum of which equals n, or 0 if impossible. +0
5
0, 0, 1, 0, 2, 1, 3, 0, 2, 1, 5, 3, 6, 2, 1, 0, 8, 3, 9, 2, 1, 4, 11, 7, 3, 5, 2, 1, 14, 4, 15, 0, 3, 7, 2, 1, 18, 8, 4, 6, 20, 3, 21, 2, 1, 10, 23, 15, 4, 8, 6, 3, 26, 2, 1, 5, 7, 13, 29, 4, 30, 14, 3, 0, 2, 1, 33, 5, 9, 7, 35, 4, 36, 17, 3, 6, 2, 1, 39, 14, 5, 19, 41, 7, 4, 20, 12, 3, 44, 2, 1, 8, 13 (list; graph; listen)
OFFSET

1,5

COMMENT

a(n)=0 iff n=2^k and a(n)=1 iff n is a triangular number (A000217).

REFERENCES

Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 67.

EXAMPLE

a(18) = 3 because 3+4+5+6 = 5+6+7 = 18 but 3 < 5.

MATHEMATICA

f[n_] := Block[{r = Ceiling[n/2]}, If[ IntegerQ[ Log[2, n]], 0, m = Range[r]; lst = Flatten[ Table[ m[[k]], {i, r}, {j, i + 1, r}, {k, i, j}], 1]; lst[[ Position[ Plus @@@ lst, n, 1, 1][[1, 1]], 1]]]]; Table[ f[n], {n, 93}] (from Robert G. Wilson v Feb 25 2005)

CROSSREFS

Cf. A104513, A104514, A104515, A104516.

Sequence in context: A125073 A071461 A091829 this_sequence A131848 A035157 A087469

Adjacent sequences: A104509 A104510 A104511 this_sequence A104513 A104514 A104515

KEYWORD

nonn

AUTHOR

Alfred S. Posamentier (asp2(AT)juno.com) and Robert G. Wilson v (rgwv(AT)rgwv.com), Feb 23 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 July 26 13:41 EDT 2008. Contains 142293 sequences.


AT&T Labs Research