|
|
A144095
|
|
a(n) = number of exponents of the prime-factorization of n that occur somewhere in n when the exponents and n are represented in base 2.
|
|
3
|
|
|
0, 1, 1, 1, 1, 2, 1, 0, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 0, 2, 2, 2, 2, 1, 2, 2, 1, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 1, 0, 2, 3, 1, 2, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 1, 1, 2, 2, 2, 1, 3, 1, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,6
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
40 has the prime-factorization 2^3 * 5^1, so the exponents are 3 and 1. 40 in binary is 101000. 3 = 11 in binary. 11 does not occur anywhere in 101000. 1 is 1 in binary. 1 does occur (twice) in 101000. So a(40) = 1, since one exponent occurs in the binary representation of n.
For n = 6 = 2^1 * 3^1, the binary representation "1" of exponent 1 (of 2) is found from the binary representation "110" of 6, like is found also the exponent of 3 (which is also 1), thus a(6) = 2.
For n = 8 = 2^3, the binary representation "11" of the only exponent 3 is not found from the binary representation "1000" of 8, thus a(8) = 0.
For n = 24 = 2^3 * 3^1, both the binary representation "11" of exponent 3 and the binary representation "1" of exponent 1 are found from the binary representation "11000" of 24, thus a(24) = 2.
(End)
|
|
MAPLE
|
A144095 := proc(n) local n2, a, ifa, e2, p ; n2 := convert(n, base, 2) ; ifa := ifactors(n)[2] ; a := 0 ; for p in ifa do e2 := convert( op(2, p), base, 2) ; if verify(n2, e2, 'superlist') then a := a+1 ; fi; od: RETURN(a) ; end: for n from 1 to 200 do printf("%d, ", A144095(n)) ; od: # R. J. Mathar, Sep 17 2008
|
|
PROG
|
(PARI)
is_vecsuffix(va, vb) = { my(ka=#va, kb=#vb, i=kb); if(ka < kb, 0, while(i>0, if(va[(ka-kb)+i] != vb[i], return(0), i = i-1)); (1)); };
is_base2infix(a, b) = { my(va=binary(a), vb=binary(b)); while(#va >= #vb, if(is_vecsuffix(va, vb), return(1), a \= 2; va=binary(a))); (0); };
|
|
CROSSREFS
|
Differs from A293439 for the first time at n=24.
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|