Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A095202
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A095202 Value of largest k such that (n-1) + (n-2) + (n-3) + ... + (n-k) is a multiple of n, or 0 if no such k exists. +0
3
0, 0, 2, 0, 4, 3, 6, 0, 8, 4, 10, 8, 12, 7, 14, 0, 16, 8, 18, 15, 20, 11, 22, 15, 24, 12, 26, 7, 28, 24, 30, 0, 32, 16, 34, 8, 36, 19, 38, 15, 40, 35, 42, 32, 44, 23, 46, 32, 48, 24, 50, 39, 52, 27, 54, 48, 56, 28, 58, 39, 60, 31, 62, 0, 64, 44, 66, 16, 68, 55, 70, 63, 72, 36, 74, 56 (list; graph; listen)
OFFSET

1,3

COMMENT

Equivalently, largest k < n such that k-th triangular number (A000217(k)) is a multiple of n, or 0 if no such k exists.

FORMULA

a(2n-1) = 2n-2 for all n >= 1; a(2^n) = 0 for all n >= 1.

PROGRAM

(PARI) {a(n) = s=0; saved_k=0; k=0; while(k<n-1, k++; s=s+(n-k); if(s%n==0, saved_k=k)); saved_k}

CROSSREFS

Cf. A095200, A095201.

Cf. A000217 (triangular numbers).

Adjacent sequences: A095199 A095200 A095201 this_sequence A095203 A095204 A095205

Sequence in context: A122512 A128263 A140254 this_sequence A093443 A099092 A081236

KEYWORD

nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Jun 05 2004

EXTENSIONS

Edited by Rick L. Shepherd (rshepherd2(AT)hotmail.com), Jun 08 2004

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 13 09:05 EDT 2008. Contains 145008 sequences.


AT&T Labs Research