OFFSET
1,2
COMMENTS
A300997(n) is believed to be equal to 2*n - Sum_{k=1..n} I(k), where I is the indicator function of some other sequence -- let it be this sequence. This sequence is finite if the conjecture is false.
LINKS
Wikipedia, Indicator function
PROG
(C)
#include <stdio.h>
#include <string.h>
#define N 10000
void e(int *t, int *s) {
int T[N], i = 0; memset(T, 0, sizeof(T));
while (i < *s) {
int f = t[i] / 2;
T[i] += f + (t[i] % 2);
T[++ i] += f;
}
if (T[*s] != 0) { *s += 1; }
for (i = 0; i < *s; i ++) { t[i] = T[i]; }
}
int f(int n) {
int t[N], s = 1, i = 0; t[0] = n;
while (s != n) { i ++; e(t, &s); }
return 2 * n - i;
}
int main() {
int n, last = 1, current;
for (n = 1; n <= N; n ++) {
current = f(n);
switch (current - last) {
case 0: break;
case 1: printf("%d, ", n); fflush(stdout); break;
default: fprintf(stderr, "CONJECTURE IS FALSE"); return;
}
last = current;
}
printf("\n");
}
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Jun 16 2018
STATUS
approved