OFFSET
1,2
COMMENTS
How is this related to A088359? - R. J. Mathar, Jan 09 2013
It is not hard to show that a(n) exists for all n, and in particular a(n) < 2^n. - Charles R Greathouse IV, Jan 13 2013
From Antti Karttunen, Jan 10 & 18 2016: (Start)
Positions of records in A004001. After 1 the positions where A004001 increases (by necessity by one).
An answer to the question of R. J. Mathar above: This sequence is equal to A088359 with prepended 1. This follows because at each of its unique values (terms of A088359), A004001 must grow, but it can grow nowhere else. See Kubo and Vakil paper and especially the illustrations of Q and R-trees on pages 229-230 (pages 5 & 6 in PDF) and also in sequence A265332.
Obviously A004001 can obtain unique values only at points which form a subset (A266399) of this sequence.
(End)
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
T. Kubo and R. Vakil, On Conway's recursive sequence, Discr. Math. 152 (1996), 225-252.
User "Panurge", Frankl's conjecture and Oeis sequence A188163, Mathoverflow.net, Mar 29 2016.
Eric Weisstein's World of Mathematics, Hofstadter-Conway $10,000 Sequence.
Wikipedia, Hofstadter sequence
FORMULA
MAPLE
A188163 := proc(n)
for a from 1 do
if A004001(a) = n then
return a;
end if;
end do:
end proc: # R. J. Mathar, May 15 2013
MATHEMATICA
h[1] = 1; h[2] = 1; h[n_] := h[n] = h[h[n-1]] + h[n - h[n-1]];
a[n_] := For[m = 1, True, m++, If[h[m] == n, Return[m]]];
Array[a, 64] (* Jean-François Alcover, Jan 27 2018 *)
PROG
(Haskell)
import Data.List (elemIndex)
import Data.Maybe (fromJust)
a188163 n = succ $ fromJust $ elemIndex n a004001_list
(Scheme)
;; Code for A004001 given in that entry. Uses also my IntSeq-library. - Antti Karttunen, Jan 18 2016
(Magma)
h:=[n le 2 select 1 else Self(Self(n-1)) + Self(n - Self(n-1)): n in [1..500]]; // h=A004001
A188163:= function(n)
for j in [1..2*n+1] do
if h[j] eq n then return j; end if;
end for;
end function;
[A188163(n): n in [1..100]]; // G. C. Greubel, May 20 2024
(SageMath)
@CachedFunction
def h(n): return 1 if (n<3) else h(h(n-1)) + h(n - h(n-1)) # h=A004001
def A188163(n):
for j in range(1, 2*n+2):
if h(j)==n: return j
[A188163(n) for n in range(1, 101)] # G. C. Greubel, May 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 03 2011
STATUS
approved