login
A154586
Numbers n for which abs((-1)^k*Sum_{k=1..n} ((n-k+1) mod k)) = 0.
1
1, 4, 8, 25, 27, 75, 209, 3507, 8466, 16179, 29285, 33987, 175904, 326764, 1161207
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
Sequence in context: A090896 A131637 A163143 * A371190 A185615 A068367
KEYWORD
more,nonn
AUTHOR
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