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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A266233 Primes representable as f(f(f(...f(p)...))) where p is a prime and f(x) = x*2 + 1. 4
5, 7, 11, 23, 31, 47, 59, 71, 79, 83, 107, 127, 151, 167, 179, 191, 223, 227, 239, 263, 271, 347, 359, 383, 431, 439, 467, 479, 503, 563, 587, 599, 607, 631, 719, 727, 839, 863, 887, 911, 919, 967, 983, 991, 1019, 1031, 1087, 1103, 1151, 1187, 1231, 1279, 1283 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

A005385 is a subsequence: f(x) is applied just once.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(5) = f(f(7)) = (7*2 + 1)*2 + 1 = 31.

a(48) = f(f(f(137))) = ((137*2 + 1)*2 + 1)*2 + 1 = 1103.

MAPLE

N:= 10^4: # to get all terms <= N

Primes:= select(isprime, {2, seq(i, i=3..N, 2)}):

f:= x -> 2*x+1:

S:= {}: R:= Primes:

for k from 1 while nops(R) > 0 do

   R:= select(`<=`, map(f, R), N);

   S:= S union (R intersect Primes);

od:

sort(convert(S, list)); # Robert Israel, Jun 29 2016

MATHEMATICA

Take[Select[Union@ Flatten[Table[Nest[2 # + 1 &, Prime@ n, #], {n, 120}] & /@ Range@ 120], PrimeQ], 53] (* Michael De Vlieger, Jan 06 2016 *)

PROG

(Python)

from sympy import isprime

a=[]

TOP=10000

for p in range(TOP):

    if isprime(p):

         while p<TOP:

            p = p*2+1

            if isprime(p): a.append(p)

print sorted(set(a))

CROSSREFS

Cf. A000040, A005385, A266234, A266235.

Sequence in context: A318078 A174332 A248595 * A124111 A151715 A226027

Adjacent sequences:  A266230 A266231 A266232 * A266234 A266235 A266236

KEYWORD

nonn

AUTHOR

Alex Ratushnyak, Dec 25 2015

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 November 18 09:52 EST 2019. Contains 329261 sequences. (Running on oeis4.)