|
|
A182660
|
|
a(2^(k+1)) = k; 0 everywhere else.
|
|
2
|
|
|
0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,9
|
|
COMMENTS
|
A surjection N->N designed to spite a guesser who is trying to guess whether it's a surjection, using the following naive guessing method: Guess that (n0,...,nk) is a subsequence of a surjection iff it contains every natural less than log_2(k+1).
This sequence causes the would-be guesser to change his mind infinitely often.
a(0)=0. Assume a(0),...,a(n) have been defined.
If the above guesser guesses that (a(0),...,a(n)) IS the beginning of a surjective sequence, then let a(n+1)=0. Otherwise let a(n+1) be the least number not in (a(0),...,a(n)).
|
|
LINKS
|
|
|
PROG
|
(Magma) [ exists(t){ k: k in [1..Ceiling(Log(n+1))] | n eq 2^(k+1) } select t else 0: n in [0..100] ];
(PARI) A182660(n) = if(n<2, 0, my(p = 0, k = isprimepower(n, &p)); if(2==p, k-1, 0)); \\ Antti Karttunen, Jul 22 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|