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!)
A193732 Connell-like sequence. 1
1, 3, 4, 6, 8, 9, 11, 13, 15, 17, 18, 20, 22, 24, 26, 28, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 110, 112, 114, 116, 118, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
Let prime(n) denote the n-th prime.
Because prime(1)=2, take first 2 odd numbers giving a(1)=1, a(2)=3.
Because prime(2)=3, take 3 even numbers starting with 4 giving a(3)=4, a(4)=6, a(5)=8.
Because prime(3)=5, take 5 odd numbers starting with 9 giving a(6)=9, a(7)=11, a(8)=13, a(9)=15, a(10)=17.
Because prime(4)=7, take 7 even numbers starting with 18 gives a(11)=18, a(12)=20, ..., a(17)=30 etc.
MAPLE
cp:=2:ct:=1:a := proc(n) option remember: global cp, ct: if(n=1)then return 1: elif(ct=cp)then ct:=1:cp:=nextprime(cp): return a(n-1)+1: else ct:=ct+1: return a(n-1)+2: fi: end: seq(a(n), n=1..100); # Nathaniel Johnston, Aug 11 2011
MATHEMATICA
nxt[{p_, a_}]:={NextPrime[p], Range[Last[a]+1, Last[a]+2*NextPrime[p], 2]}; Transpose[NestList[nxt, {2, {1, 3}}, 10]][[2]]//Flatten (* Harvey P. Dale, Mar 23 2016 *)
CROSSREFS
Sequence in context: A133280 A280762 A138097 * A000592 A138924 A188015
KEYWORD
nonn,easy
AUTHOR
Ctibor O. Zizka, Aug 08 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 08:13 EDT 2024. Contains 371265 sequences. (Running on oeis4.)