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.

A253719 Least k>0 such that n AND (n^k) <= 1, where AND denotes the bitwise AND operator.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 4, 2, 4, 4, 2, 2, 2, 2, 2, 3, 6, 5, 4, 2, 4, 2, 8, 3, 8, 5, 2, 2, 2, 2, 2, 2, 2, 3, 6, 2, 2, 4, 12, 2, 4, 4, 4, 2, 4, 2, 10, 3, 14, 6, 8, 2, 8, 6, 16, 3, 16, 6, 2, 2, 2, 2, 2, 2, 2, 4, 2, 3, 4, 4, 4, 2, 4, 4, 6, 2, 2, 5, 8, 4
Offset: 0

Views

Author

Paul Tek, May 02 2015

Keywords

Comments

This sequence is well defined: for any n such that n < 2^m:
- If n is even, then n^m = 0 mod 2^m, hence n AND (n^m) = 0, and a(n) <= m,
- If n is odd, then n^phi(2^m) = 1 mod 2^m according to Euler's totient theorem, hence n AND (n^phi(2^m)) = 1, and a(n) <= phi(2^m).
a(2*(2^m-1)) = m+1 for any m>=0. - Paul Tek, May 03 2015

Examples

			11 AND (11^1) = 11,
11 AND (11^2) = 9,
11 AND (11^3) = 3,
11 AND (11^4) = 1,
hence a(11)=4.
		

Crossrefs

Cf. A224694.

Programs

  • PARI
    a(n) = my(k=1, nk=n); while (bitand(n, nk)>1, k=k+1; nk=nk*n); return (k)

A366201 Number x such that triangular(x) AND x^2 = 0, where AND is the bitwise logical-and operation.

Original entry on oeis.org

0, 2, 3, 4, 8, 12, 16, 18, 24, 32, 34, 46, 48, 52, 64, 66, 68, 94, 96, 128, 130, 132, 144, 188, 192, 208, 256, 258, 260, 264, 288, 384, 415, 416, 512, 514, 516, 520, 544, 551, 576, 736, 768, 816, 831, 832, 1024, 1026, 1028, 1032, 1040, 1042, 1088, 1090, 1152, 1163
Offset: 1

Views

Author

Alex Ratushnyak, Oct 04 2023

Keywords

Comments

Numbers x such that A000217(x) AND A000290(x) = 0.

Crossrefs

Cf. A000217, A000290, A004198 (AND).
Cf. A224694.
Showing 1-2 of 2 results.