OFFSET
1,2
COMMENTS
If k is in the sequence, then so is 2*k.
From Antti Karttunen, Jul 16 2023: (Start)
The original definition was "Numbers whose prime factors are either 2 or Mersenne primes". The new definition admits also {1}.
Multiplicative semigroup. Primitive terms are {1, 2} U A000668.
(End)
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001 (original 10000 initial terms from Amiram Eldar)
FORMULA
Sum_{n>=1} 1/a(n) = 2 * Product_{p in A000668} p/(p-1) = 3.6458502419452069302... - Amiram Eldar, Jan 09 2021
MATHEMATICA
seq[max_] := Module[{e = Floor @ Log2[max + 1], s = {1}, es, ps, n, p, m}, es = Select[MersennePrimeExponent @ Range[20], # <= e &]; ps = Join[{2}, 2^es - 1]; n = Length[ps]; Do[p = ps[[k]]; m = Floor @ Log[p, max]; s = Select[Union @ Flatten@Outer[Times, s, p^Range[0, m]], # <= max &], {k, 1, n}]; s]; seq[10^3] (* Amiram Eldar, Jan 09 2021 *)
PROG
(PARI) isokp(p) = my(q); (p==2) || (isprimepower(p+1, &q) && (q==2));
isok(m) = ((1==m) || vecmin(apply(isokp, factor(m)[, 1]))); \\ Michel Marcus, Jan 09 2021, edited by Antti Karttunen, Jul 16 2023
(PARI) isok(n) = A364252(n); \\ Antti Karttunen, Jul 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Nov 13 2012
EXTENSIONS
a(1) = 1 prepended, and definition changed accordingly by Antti Karttunen, Jul 16 2023
STATUS
approved