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.

Showing 1-2 of 2 results.

A286417 Lexicographically earliest sequence of distinct positive terms such that the binary representation of the n-th prime contains the binary representation of a(n).

Original entry on oeis.org

1, 3, 2, 7, 5, 6, 4, 9, 11, 13, 15, 18, 10, 21, 23, 26, 14, 29, 8, 17, 36, 19, 20, 12, 16, 25, 39, 43, 22, 24, 31, 32, 34, 69, 37, 75, 78, 35, 41, 45, 44, 53, 47, 48, 49, 71, 52, 27, 28, 50, 58, 55, 30, 59, 64, 65, 33, 67, 138, 70, 141, 73, 38, 77, 57, 61, 82
Offset: 1

Views

Author

Rémy Sigrist, May 08 2017

Keywords

Comments

This sequence is a permutation of the natural numbers.
As for A160855, the scatterplot of this sequence shows (almost) straight lines:
- here those lines are related to the position of a(n) in the n-th prime (in binary representation),
- the scatterplot of the possible values of a(n) as a function of the n-th prime constitutes a network of lines in which the scatterplot of a(n) lies,
- see also the scatterplots in the Links section.
For any n>0, a(n) <= A000040(n); the first known values where equality occurs are a(2) = 3 and a(4) = 7.
The fixed points of the sequence belong to A091020.
The first fixed points are: 1, 5, 6, 31, 32, 50, 81, 1052, 3378.

Examples

			See illustration of the first terms in the Links section.
		

Crossrefs

A091021 Primes p=prime(k) such that in binary representation k is a substring of p.

Original entry on oeis.org

2, 11, 13, 47, 127, 131, 139, 167, 227, 229, 419, 421, 8419, 15391, 18503, 23053, 31333, 32119, 642049, 771769, 1240081, 2545453, 2951341, 9677999, 11390809, 22436899, 33056171, 63701437, 71298761, 465462769, 989883217, 1490754379, 1775394377, 1775394389
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 14 2003

Keywords

Examples

			229 = A000040(50): 50->110010, 229->11100101 = 1'110010'1, therefore 229 is a term.
		

Crossrefs

Programs

  • Python
    from sympy import primerange
    [print(i, end=', ') for n, i in enumerate(primerange(1, 10**7)) if bin(n+1)[2:] in bin(i)[2:]]; # Nicholas Stefan Georgescu, Jan 03 2025

Formula

a(n) = A000040(A091020(n)).
A091020(n) = A049084(a(n)).

Extensions

a(22)-a(32) from Donovan Johnson, May 03 2010
a(33)-a(34) from Donovan Johnson, May 08 2012
Showing 1-2 of 2 results.