login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A181742
Let A181741(n)=2^(t(n))-2^(k(n))-1, where k(n)>=1, t(n)>=k(n)+1. Then a(n)=t(n).
1
3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 6, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 12, 12, 12, 12, 12, 13, 14, 14, 14, 14, 14, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24
OFFSET
1,1
MATHEMATICA
f[n_] := IntegerExponent[n + 2^IntegerExponent[n, 2], 2]; f/@ (Select[Table[2^t-2^k-1, {t, 1, 20}, {k, 1, t-1}] // Flatten // Union, PrimeQ] + 1) (* Amiram Eldar, Dec 17 2018 after Jean-François Alcover at A181741 *)
PROG
(PARI) listt(nn) = {for (n=3, nn, forstep(k=n-1, 1, -1, if (isprime(2^n-2^k-1), print1(n, ", ")); ); ); } \\ Michel Marcus, Dec 17 2018
CROSSREFS
Sequence in context: A163400 A090972 A318241 * A179843 A319198 A243348
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Nov 08 2010
EXTENSIONS
Corrected and extended by Michel Marcus, Dec 17 2018
STATUS
approved