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.

A381419 a(1) = 1; for n > 1, a(n) is the smallest unused positive number that is coprime to a(n-1) and has a different binary weight than a(n-1).

Original entry on oeis.org

1, 3, 2, 5, 4, 7, 6, 11, 8, 9, 13, 10, 19, 12, 23, 14, 15, 16, 17, 21, 20, 27, 22, 29, 18, 25, 24, 31, 26, 33, 28, 39, 32, 35, 34, 37, 30, 41, 36, 43, 38, 45, 44, 47, 40, 49, 46, 55, 42, 53, 48, 59, 50, 51, 52, 57, 56, 61, 54, 65, 58, 63, 62, 67, 60, 73, 64, 69, 68, 71, 66, 79, 70, 83
Offset: 1

Views

Author

Scott R. Shannon, Feb 23 2025

Keywords

Comments

A permutation of the natural numbers. - Ruud H.G. van Tol, Mar 10 2025

Examples

			a(4) = 5 as a(3) = 2 which is coprime to 5 while the binary weight of 5 (101_2) is 2 while the binary weight of 2 (10_2) is 1.
		

Crossrefs

Cf. A381821 (fixed points), A381420, A000120, A109451, A093714, A027748.

Programs

  • PARI
    lista(n)= my(r=List([1]), p=1, q=p, t); while(pp+1, forstep(i=q, p+2, -1, r[i]=r[i-1]); r[p+1]=t); q=p++)); Vec(r[1..n]); \\ Ruud H.G. van Tol, Mar 10 2025