|
|
A065197
|
|
Solutions to A065191(n) = n.
|
|
7
|
|
|
1, 5, 90, 117, 154, 446, 3650, 4754, 8110, 69977, 74014, 401477, 432257, 545185
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
Reap[Do[pos = n; Do[pos -= k (-1)^Quotient[pos, k], {k, n, 1, -1}]; pos -= If[Mod[n, 4] < 2, 1, -1]; If[pos == n, Print[n]; Sow[n]], {n, 1, 10^4} ]][[2, 1]] (* Jean-François Alcover, Mar 02 2020, after Charlie Neder in A065191 *)
|
|
PROG
|
(Python)
from itertools import islice, count
for n in count(1):
m = n
for k in range(n, 1, -1):
m += k if (m//k) % 2 else -k
if m == n:
yield n
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn,more
|
|
AUTHOR
|
Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 19 2001
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|