login

Revision History for A110080

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(1) = 1; skipping over integers occurring earlier in the sequence, count down p(n) (p(n) = n-th prime) from a(n) to get a(n+1). If this is <= 0, instead count up from a(n) p(n) positions (skipping already occurring integers) to get a(n+1).
(history; published version)
#19 by Reinhard Zumkeller at Tue Sep 02 06:34:54 EDT 2014
STATUS

editing

approved

#18 by Reinhard Zumkeller at Tue Sep 02 05:05:05 EDT 2014
PROG

(Haskell)

import Data.Set (singleton, member, insert)

a110080 n = a110080_list !! (n-1)

a110080_list = 1 : f 1 a000040_list (singleton 1) where

f x (p:ps) m = y : f y ps (insert y m) where

y = g x p

g 0 _ = h x p

g u 0 = u

g u v = g (u - 1) (if member (u - 1) m then v else v - 1)

h u 0 = u

h u v = h (u + 1) (if member (u + 1) m then v else v - 1)

-- Reinhard Zumkeller, Sep 02 2014

#17 by Reinhard Zumkeller at Tue Sep 02 04:59:52 EDT 2014
LINKS

Reinhard Zumkeller, <a href="/A110080/b110080.txt">Table of n, a(n) for n = 1..10000</a>

STATUS

approved

editing

#16 by Michel Marcus at Mon May 12 10:23:43 EDT 2014
STATUS

proposed

approved

#15 by Jon E. Schoenfield at Mon May 12 10:15:57 EDT 2014
STATUS

editing

proposed

#14 by Jon E. Schoenfield at Mon May 12 10:15:54 EDT 2014
EXAMPLE

a(5) is 2. Counting p(5) = 11 down from 2 gets a negative integer. So we instead count up 11 positions, skipping the 3, 6 and 11 as we count, to arrive at 16 (which is at the rightmost * of the number line above).

instead count up 11 positions -- skipping the 3, 6 and 11 as we count -- to arrive at 16 (which is at the right-most * of the number-line above).

STATUS

approved

editing

#13 by Charles R Greathouse IV at Wed Apr 09 10:16:30 EDT 2014
AUTHOR

Leroy Quet , Oct 12 2005

Discussion
Wed Apr 09
10:16
OEIS Server: https://oeis.org/edit/global/2154
#12 by N. J. A. Sloane at Wed Feb 05 20:18:14 EST 2014
AUTHOR

_Leroy Quet _ Oct 12 2005

Discussion
Wed Feb 05
20:18
OEIS Server: https://oeis.org/edit/global/2118
#11 by Russ Cox at Fri Mar 30 18:39:53 EDT 2012
EXTENSIONS

More terms from Klaus Brockhaus and _Hans Havermann (gladhobo(AT)teksavvy.com), _, Oct 17 2005

Discussion
Fri Mar 30
18:39
OEIS Server: https://oeis.org/edit/global/223
#10 by Russ Cox at Fri Mar 30 17:27:47 EDT 2012
EXTENSIONS

More terms from _Klaus Brockhaus (klaus-brockhaus(AT)t-online.de) _ and Hans Havermann (gladhobo(AT)teksavvy.com), Oct 17 2005

Discussion
Fri Mar 30
17:27
OEIS Server: https://oeis.org/edit/global/145