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!)
A214370 If a(n) has not yet been defined then set a(n) = least positive integer that has not yet occurred; also if a(n+1+a(n)) has not yet been defined then set a(n+1+a(n)) = a(n). 1
1, 2, 1, 3, 2, 4, 5, 3, 6, 7, 4, 3, 5, 8, 9, 6, 10, 7, 5, 11, 12, 13, 8, 14, 9, 7, 15, 10, 16, 17, 18, 11, 19, 12, 9, 13, 20, 21, 14, 22, 23, 24, 15, 11, 9, 16, 12, 17, 25, 18, 26, 27, 19, 14, 9, 11, 28, 20, 15, 21, 29, 30, 22, 31, 23, 17, 24, 11, 18, 32, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = A094173(n) for n<16.
LINKS
EXAMPLE
a(1) = 1 because this is the first undefined place and unused number. This "throws" a copy of the 1 forward to a(1+1+1)=a(3)=1. a(2)=2 uses the next new integer, and this copies the 2 forward to a(2+1+2)=a(5)=2. a(3) is already defined then, and a(4) receives the hitherto unused 3.
PROG
(Python)
SIZE = 300
a = [-8]*SIZE
top=0
for n in range(SIZE):
if a[n]==-8: # if a[n] is undefined yet
top+=1
a[n]=top
if n+1+a[n]<SIZE and a[n+1+a[n]]==-8: # if a[n+1+a[n]] is undefined yet
a[n+1+a[n]]=a[n]
print(a[n], end=', ')
CROSSREFS
Cf. A094173.
Cf. A214371.
Sequence in context: A365006 A144241 A094173 * A227859 A026272 A193564
KEYWORD
nonn,easy
AUTHOR
Alex Ratushnyak, Jul 14 2012
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 April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)