[go: up one dir, main page]

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!)
A166695 Alternating smallest odd/even number not in list followed by that number of consecutive odd/even numbers, sequence commencing with 1. 1
1, 3, 2, 4, 6, 5, 7, 9, 11, 13, 15, 8, 10, 12, 14, 16, 18, 20, 22, 24, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 53, 55, 57, 59, 61, 63, 65 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
R:= NULL: x:= -1: y:= 0: count:= 0: m:= 1:
while count < 100 do
if m = 1 then
R:= R, x+2, seq(x+2*(i+1), i=1..(x+2));
count:= count + x+3;
x:= R[-1]
else
R:= R, y+2, seq(y+2*(i+1), i=1..(y+2));
count:=count + y+3;
y:= R[-1];
fi;
m:= 1-m;
od:
R; # Robert Israel, May 16 2024
CROSSREFS
Sequence in context: A186005 A080782 A116941 * A254107 A116942 A374610
KEYWORD
nonn,look
AUTHOR
Gerald Hillier, Oct 18 2009
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 August 30 07:09 EDT 2024. Contains 375532 sequences. (Running on oeis4.)