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.

A088720 Unique monotone sequence satisfying a(a(a(n))) = 2n.

Original entry on oeis.org

4, 5, 6, 8, 9, 10, 11, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 52, 54, 56, 58, 60, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89
Offset: 3

Views

Author

Colin Mallows, Oct 16 2003

Keywords

Comments

For k >= 1 and m >= 2, a monotone a(n) such that a^(k+1)(n) = m*n is unique only when m = 2 or (k,m) = (1,3).
Numbers k > 2 whose binary representation starts with 10 or ends with 0. - Yifan Xie, Jan 21 2025

Examples

			a(a(a(3))) = a(a(4)) = a(5) = 6.
		

Crossrefs

Programs

  • Maple
    seq(op([seq(n+2^m,n=3*2^m .. 5*2^m-1), seq(2*n-4*2^m, n=5*2^m..6*2^m-1)]), m=0..10); # Robert Israel, Apr 05 2017
  • PARI
    a(n)={my(m=logint(n/3, 2)); if(n<5*2^m, n+2^m, 2*(n-2^(m+1)))}; \\ Yifan Xie, Jan 31 2024

Formula

For a^(k+1)(n) = 2n, we have for (k+1)2^m <= n <= (2k+1)2^m, a(n) = n+2^m; for (2k+1)2^m <= n <= (2k+2)2^m, a(n) = 2n-2k*2^m.
From Robert Israel, Apr 05 2017: (Start)
a(2n) = 2*a(n).
a(4n+1) = a(2n+1) + 2*a(n).
a(4n+3) = 3*a(2n+1) - 2*a(n).
G.f. g(z) satisfies g(z) = 4*z^3 + 5*z^4 + 2*z^5 - 3*z^7 + 5*z^9 - 4*z^11 + (2+1/(2*z)+3*z/2)*g(z^2) - (1/(2*z)+3*z/2)*g(-z^2) + (2*z-2*z^3)*g(z^4).
(End)

Extensions

More terms from John W. Layman, Oct 18 2003