OFFSET
1,2
COMMENTS
Subset of A154585.
a(16) > 10^7. - Donovan Johnson, Oct 03 2011
FORMULA
abs{(-1)^k*A004125} = 0
{a(n): A154585(a(n))=0}. - R. J. Mathar, Jan 14 2009
EXAMPLE
n=8 -> abs(-(8 mod 1) + (7 mod 2) - (6 mod 3) + (5 mod 4) - (4 mod 5) + (3 mod 6) - (2 mod 7) + (1 mod 8)) = abs(-0 + 1 - 0 + 1 - 4 + 3 - 2 + 1) = abs(0) = 0.
MAPLE
P:=proc(i) local a, n; for n from 1 to i do a:=abs(add((-1)^k*((n-k+1) mod k), k=1..n)); if a=0 then print(n); fi; od; end: P(100);
PROG
(C) #include <stdio.h> int main(int argc, char * argv[]) { for(int n=1;; n++) { unsigned long long a = 0; for(int k=1; k <=n; k += 2) a -= (n-k+1) % k ; for(int k=2; k <=n; k += 2) a += (n-k+1) % k ; if ( a == 0) printf("%d, \n", n) ; } } /* R. J. Mathar, Jan 14 2009 */
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Jan 12 2009
EXTENSIONS
8466 inserted, and sequence extended up to a(13), by R. J. Mathar, Jan 14 2009
a(14)-a(15) from Donovan Johnson, Oct 03 2011
STATUS
approved