The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A219174 Numbers that have no other prime factors than 2 and/or Mersenne primes. 3

%I #33 Jul 16 2023 10:56:50

%S 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,

%T 63,64,72,81,84,93,96,98,108,112,124,126,127,128,144,147,162,168,186,

%U 189,192,196,216,217,224,243,248,252,254,256,279,288,294,324,336,343,372

%N Numbers that have no other prime factors than 2 and/or Mersenne primes.

%C If k is in the sequence, then so is 2*k.

%C From _Antti Karttunen_, Jul 16 2023: (Start)

%C The original definition was "Numbers whose prime factors are either 2 or Mersenne primes". The new definition admits also {1}.

%C Multiplicative semigroup. Primitive terms are {1, 2} U A000668.

%C (End)

%H Antti Karttunen, <a href="/A219174/b219174.txt">Table of n, a(n) for n = 1..10001</a> (original 10000 initial terms from Amiram Eldar)

%F Sum_{n>=1} 1/a(n) = 2 * Product_{p in A000668} p/(p-1) = 3.6458502419452069302... - _Amiram Eldar_, Jan 09 2021

%t 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 *)

%o (PARI) isokp(p) = my(q); (p==2) || (isprimepower(p+1, &q) && (q==2));

%o isok(m) = ((1==m) || vecmin(apply(isokp, factor(m)[, 1]))); \\ _Michel Marcus_, Jan 09 2021, edited by _Antti Karttunen_, Jul 16 2023

%o (PARI) isok(n) = A364252(n); \\ _Antti Karttunen_, Jul 16 2023

%Y Cf. A000668, A056652, A108319, A364252 (characteristic function).

%Y Positions of 1's in A336467.

%Y Subsequences: A054784, A335431.

%K nonn

%O 1,2

%A _Jon Perry_, Nov 13 2012

%E a(1) = 1 prepended, and definition changed accordingly by _Antti Karttunen_, Jul 16 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 14:39 EDT 2024. Contains 373244 sequences. (Running on oeis4.)