login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A059983 First occurrence of n in A007599. 1

%I #8 Jul 13 2013 12:02:37

%S 1,0,6,7,8,9,12,13,14,15,18,19,22,23,24,25,28,29,32,33,36,37,40,41,42,

%T 43,46,47,50,51,54,55,58,59,62,63,66,67,70,71,74,75,76,77,80,81,84,85,

%U 88,89,92,93,96,97,100,101,104,105,108,109,112,113,116,117,120,121,124

%N First occurrence of n in A007599.

%H Reinhard Zumkeller, <a href="/A059983/b059983.txt">Table of n, a(n) for n = 0..10000</a>

%e a(5) does not appear in A007599 until the 9th entry, keeping in mind the offset.

%t a[n_Integer] := a[n] = (a[n - 1] + Nest[a, n - 2, Floor[n/2] ] ); a[0] = 1; a[1] = 0; b[n_Integer] := (k = 0; While[ a[k] != n, k++ ]; k); Table[ b[n], {n, 0, 75} ]

%o (Haskell)

%o import Data.List (elemIndex)

%o import Data.Maybe (mapMaybe)

%o a059983 n = a059983_list !! n

%o a059983_list = mapMaybe (`elemIndex` a007599_list) [0..]

%o -- _Reinhard Zumkeller_, Jan 05 2012

%Y Cf. A007599.

%K nonn

%O 0,3

%A _Robert G. Wilson v_, Mar 07 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 08:33 EDT 2024. Contains 371905 sequences. (Running on oeis4.)