login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A153587 a(n) = n mod (A062383(n) - n). 1
0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 4, 1, 0, 1, 0, 0, 0, 2, 4, 6, 8, 10, 2, 5, 0, 4, 2, 2, 0, 2, 0, 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 1, 4, 7, 10, 13, 0, 4, 8, 12, 4, 9, 4, 1, 0, 1, 4, 4, 0, 1, 0, 0, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

LINKS

Michel Marcus, Table of n, a(n) for n = 0..1024

FORMULA

a(n) = n mod A080079(n), for n > 0. - Michel Marcus, Jan 28 2018

PROG

(C) int A062383(int n) { if(n==0) return 1; return 2*(A062383(n/2)); }

int a(int n) { return n % (A062383(n)-n); }

(PARI) b(n) = if (n, 2*b(n\2), 1);

a(n) = n % (n - b(n)); \\ Michel Marcus, Jan 28 2018

CROSSREFS

Cf. A062383, A080079.

Sequence in context: A145007 A228616 A151670 * A059286 A076998 A173956

Adjacent sequences:  A153584 A153585 A153586 * A153588 A153589 A153590

KEYWORD

easy,nonn

AUTHOR

J. Z. Bradley (jzbradley(AT)gmail.com), Dec 29 2008

EXTENSIONS

More terms from Michel Marcus, Jan 28 2018

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 20 21:53 EST 2018. Contains 299387 sequences. (Running on oeis4.)