cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A182660 a(2^(k+1)) = k; 0 everywhere else.

This page as a plain text file.
%I A182660 #29 Sep 08 2022 08:45:55
%S A182660 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,
%T A182660 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,
%U A182660 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
%N A182660 a(2^(k+1)) = k; 0 everywhere else.
%C A182660 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).
%C A182660 This sequence causes the would-be guesser to change his mind infinitely often.
%C A182660 a(0)=0. Assume a(0),...,a(n) have been defined.
%C A182660 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)).
%H A182660 Antti Karttunen, <a href="/A182660/b182660.txt">Table of n, a(n) for n = 0..65537</a>
%H A182660 S. Alexander, <a href="http://arxiv.org/abs/1011.6626">On Guessing Whether A Sequence Has A Certain Property</a>, arXiv:1011.6626  [math.LO], 2010-2012.
%H A182660 S. Alexander, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL14/Alexander/alex2.html">On Guessing Whether A Sequence Has A Certain Property</a>, J. Int. Seq. 14 (2011) # 11.4.4.
%o A182660 (Magma) [ exists(t){ k: k in [1..Ceiling(Log(n+1))] | n eq 2^(k+1) } select t else 0: n in [0..100] ];
%o A182660 (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
%Y A182660 Cf. A082691, A135416, A209229.
%K A182660 nonn
%O A182660 0,9
%A A182660 _Sam Alexander_, Nov 27 2010