A090331 Largest proper divisor of n that is also a prefix of n in binary.
1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 3, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 5, 23, 1, 24, 1, 25, 3, 26, 1, 27, 1, 28, 3, 29, 1, 30, 1, 31, 7, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 5, 43
Offset: 2
Links
- Antti Karttunen, Table of n, a(n) for n = 2..65537
- Eric Weisstein's World of Mathematics, Proper Divisor
- Index entries for sequences related to binary expansion of n
Crossrefs
Programs
-
PARI
A090331(n) = { my(w=binary(n),x); fordiv(n,d,if(d>1, x=binary(n/d); if(w[1..#x] == x, return(n/d)))); }; \\ Antti Karttunen, Jan 24 2025
Extensions
Edited by N. J. A. Sloane, Aug 19 2008 at the suggestion of Leroy Quet
Comments