A219174 Numbers that have no other prime factors than 2 and/or Mersenne primes.
1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 16, 18, 21, 24, 27, 28, 31, 32, 36, 42, 48, 49, 54, 56, 62, 63, 64, 72, 81, 84, 93, 96, 98, 108, 112, 124, 126, 127, 128, 144, 147, 162, 168, 186, 189, 192, 196, 216, 217, 224, 243, 248, 252, 254, 256, 279, 288, 294, 324, 336, 343, 372
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10001 (original 10000 initial terms from Amiram Eldar)
Crossrefs
Programs
-
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 *)
-
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
Formula
Sum_{n>=1} 1/a(n) = 2 * Product_{p in A000668} p/(p-1) = 3.6458502419452069302... - Amiram Eldar, Jan 09 2021
Extensions
a(1) = 1 prepended, and definition changed accordingly by Antti Karttunen, Jul 16 2023
Comments