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.

A356450 Positions of numbers m = A005940(n+1) such that m < n.

Original entry on oeis.org

8, 16, 17, 32, 33, 34, 35, 64, 65, 66, 67, 68, 69, 71, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 143, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 269, 271, 272, 273, 275, 279, 287, 288, 384, 512, 513, 514, 515, 516, 517, 518, 519, 520
Offset: 1

Views

Author

Michael De Vlieger, Aug 07 2022

Keywords

Comments

This sequence contains 2^k for k >= 3. Powers of 2 expressed in binary consist of a 1 followed by k zeros. Therefore, A005940(2^k) = prime(k+1)^1. For k >= 3, 2^k > prime(k+1).

Examples

			34 is in the sequence since A005940(34) = A005940("100010"_2) = prime(1+1)^1 * prime(4+1)^1 = 33, and 33 < 34.
		

Crossrefs

Programs

  • Mathematica
    nn = 2^10; a[0] = 1; Reap[Do[k = Prime[1 + DigitCount[n, 2, 0]]*a[n - 2^Floor@ Log2@ n]; Set[a[n], k]; If[k < n, Sow[n]], {n, nn}]][[-1, -1]] (* Michael De Vlieger, Aug 07 2022 *)