cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

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

Views

Author

Jon Perry, Nov 13 2012

Keywords

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)

Crossrefs

Cf. A000668, A056652, A108319, A364252 (characteristic function).
Positions of 1's in A336467.
Subsequences: A054784, A335431.

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