OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 38.
Eric Weisstein's World of Mathematics, Proth Numbers
EXAMPLE
a(4)=7 because 7 = 1*2^3 - 1, with 1 < 2^3, and it is the fourth number of this form.
MAPLE
N:= 2000: # to get all terms <= N
sort(convert({seq(seq(k*2^m-1, k=1..min((N+1)/2^m, 2^m-1), 2), m=1..ilog2(N+1))}, list)); # Robert Israel, May 23 2017
MATHEMATICA
Take[Sort@Flatten@Table[k*2^m - 1, {m, 0, 10}, {k, 1, 2^m - 1, 2}], 53] (* Robert G. Wilson v, Jan 02 2006 *)
PROG
(PARI) for(n=2, 8, for(k=2^(n-2)+1, 2^n, print1(k*2^n-1", "))) \\ Note that the first two terms (1, 3) are not computed
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jose Brox (tautocrona(AT)terra.es), Dec 31 2005
STATUS
approved