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!)
A187921 Positions k of addition steps in Recamán's sequence where A005132(k-1)<=k. 6
1, 2, 3, 5, 11, 13, 15, 17, 24, 26, 28, 30, 32, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 112, 130, 132, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 197, 199, 201, 203, 205, 207, 209, 211, 213, 215, 217, 219, 221, 223, 248, 250 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(10)=26: A005132(26-1) = 17 and 17-26<0, hence A005132(26) = 17+26 = 43.
PROG
(Haskell)
import Data.Set (Set, singleton, member, insert)
a187921 n = a187921_list !! (n-1)
a187921_list = r (singleton 0) 1 0 where
r :: Set Integer -> Integer -> Integer -> [Integer]
r s n x | x <= n = n : r (insert (x+n) s) (n+1) (x+n)
| (x-n) `member` s = r (insert (x+n) s) (n+1) (x+n)
| otherwise = r (insert (x-n) s) (n+1) (x-n)
CROSSREFS
Subsequence of A057165;
A005132(a(n)-1) <= a(n); A005132(a(n)) = A005132(a(n)-1) + a(n);
see A187922 for the other positions of addition steps in A005132.
Sequence in context: A093902 A269004 A100475 * A275059 A072538 A225856
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Mar 17 2011
STATUS
approved

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 March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)