login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = 2^(prime(n) + 1) - 1.
1

%I #20 Jul 29 2024 16:55:09

%S 7,15,63,255,4095,16383,262143,1048575,16777215,1073741823,4294967295,

%T 274877906943,4398046511103,17592186044415,281474976710655,

%U 18014398509481983,1152921504606846975,4611686018427387903,295147905179352825855,4722366482869645213695

%N a(n) = 2^(prime(n) + 1) - 1.

%C Numbers whose binary representation is 1 repeated (prime(n)+1) times.

%C The only prime term is 7.

%F a(n) = A101304(n) - 2.

%F a(n) = A000225(A008864(n)). - _Felix Fröhlich_, Dec 21 2016

%e For n=3; a(3) = 2^(prime(3) + 1) - 1 = 2^(5 + 1) - 1 = 2^6 - 1 = 63.

%p A279882:=n->2^(ithprime(n)+1)-1: seq(A279882(n), n=1..30); # _Wesley Ivan Hurt_, Jan 23 2017

%t f[n_] := 2^(Prime[n]+1)-2; Array[f, 20] (* _Robert G. Wilson v_, Dec 21 2016 *)

%t 2^(Prime[Range[20]]+1)-1 (* _Harvey P. Dale_, Jul 29 2024 *)

%o (Magma) [2^(NthPrime(n)+1)-1: n in[1..50]]

%o (PARI) a(n) = 2^(prime(n)+1)-1 \\ _Felix Fröhlich_, Dec 21 2016

%Y Cf. A101304 (2^(prime(n)+1)+1), A098102 (2^(prime(n)-1)-1), A278741 (2^(prime(n)-1)+1).

%K nonn,easy

%O 1,1

%A _Jaroslav Krizek_, Dec 21 2016