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.

A356455 Numbers m = A005940(n) such that A005940(n) < (n-1), listed in order of appearance in A005940.

Original entry on oeis.org

7, 11, 14, 13, 22, 33, 28, 17, 26, 39, 44, 65, 66, 56, 19, 34, 51, 52, 85, 78, 117, 88, 119, 130, 132, 112, 23, 38, 57, 68, 95, 102, 153, 104, 133, 170, 255, 156, 234, 176, 209, 238, 260, 264, 224, 247, 361, 29, 46, 69, 76, 115, 114, 171, 136, 161, 190, 285, 204
Offset: 1

Views

Author

Michael De Vlieger, Aug 07 2022

Keywords

Comments

Primes p > 5 are in the sequence. We may rewrite the k-th prime p instead as prime(k)^1, and thus convert it to a single run of 1 ones followed by (k-1) zeros, which becomes a binary number consisting of 1 followed by k-1 zeros. It is clear that for p > 5, prime(k) < 2^(k-1).

Examples

			7 is in the sequence since 7 = prime(3+1)^1, which we write as 1 following 3 zeros when approached from the least significant digit, i.e., "1000"_2 = 8, thus A005940(8) = 7; and 7 < 8.
5 is not in the sequence since 5 = prime(2+1)^1 -> "100"_2 = 4, and 5 > 4.
14 is in the sequence since 14 = prime(0+1)^1 * prime(3+1)^1, which we can express as a binary number with singleton 1s following 0 and 3 zeros, i.e., "10001"_2 = 17, hence A005940(17) = 14 and we see 14 < 17.
33 is in the sequence since 33 = prime(1+1)^1 * prime(4+1)^1 = A005940("100010"_2) = A005940(34) = 33, and we see 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[k]], {n, nn}]][[-1, -1]]