login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A125049 a(1) = 1. If a(n) is prime, a(n+1) = 2*a(n); otherwise, a(n+1) = 2*a(n) + 1. 1
1, 3, 6, 13, 26, 53, 106, 213, 427, 855, 1711, 3423, 6847, 13695, 27391, 54783, 109567, 219134, 438269, 876539, 1753079, 3506159, 7012318, 14024637, 28049275, 56098551, 112197103, 224394207, 448788415, 897576831, 1795153663, 3590307326 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..32.

MATHEMATICA

NestList[If[PrimeQ[#], 2#, 2#+1]&, 1, 40] (* Harvey P. Dale, Sep 01 2017 *)

CROSSREFS

Cf. A125050.

Sequence in context: A019300 A072762 A081254 * A267581 A320733 A164991

Adjacent sequences:  A125046 A125047 A125048 * A125050 A125051 A125052

KEYWORD

nonn

AUTHOR

Franklin T. Adams-Watters, Nov 17 2006

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 19 15:18 EDT 2019. Contains 327198 sequences. (Running on oeis4.)