login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A166248 a(n) is the absolute value of n minus sum of all the remainders modulo the numbers below n. 1
1, 2, 2, 3, 1, 3, 1, 0, 3, 3, 11, 5, 15, 17, 21, 20, 34, 29, 45, 41, 49, 55, 75, 61, 78, 86, 98, 96, 122, 108, 136, 135, 151, 163, 183, 162, 196, 210, 230, 218, 256, 242, 282, 284, 294, 312, 356, 326, 365, 370, 398, 402, 452, 438, 474, 464, 496, 520, 576, 526, 584, 610 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..62.

FORMULA

a(n) = abs(n - Sum_{k=1..n} (n mod k)).

a(n) = abs(n - A004125(n)). - Michel Marcus, May 08 2019

EXAMPLE

a(1) = abs(1-0) = 1;

a(2) = abs(2-0) = 2;

a(3) = abs(3-1) = 2;

a(4) = abs(4-1) = 3;

a(5) = abs(5-4) = 1;

a(6) = abs(6-3) = 3;

a(7) = abs(7-8) = 1.

MAPLE

A004125 := proc(n) add( modp(n, k), k=1..n) ; end proc: A166248 := proc(n) abs(n-A004125(n)) ; end: seq(A166248(n), n=1..100) ; # R. J. Mathar, Oct 24 2009

CROSSREFS

Cf. A000027, A004125, A163180.

Sequence in context: A200751 A077083 A274528 * A180257 A265576 A083040

Adjacent sequences:  A166245 A166246 A166247 * A166249 A166250 A166251

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Oct 10 2009

EXTENSIONS

a(19), a(20), a(37) etc. corrected by R. J. Mathar, Oct 24 2009

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 17:22 EDT 2021. Contains 345365 sequences. (Running on oeis4.)