login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(n) = A001221(n) if n is not included in sequence A144096.
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.
From Antti Karttunen, Nov 01 2017: (Start)
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); };
A144095(n) = vecsum(apply(e -> is_base2infix(n, e), factorint(n)[, 2])); \\ Antti Karttunen, Nov 01 2017
CROSSREFS
Cf. A144096.
Differs from A293439 for the first time at n=24.
Sequence in context: A344652 A366074 A293439 * A362719 A076092 A080468
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Sep 10 2008
EXTENSIONS
More terms from R. J. Mathar, Sep 17 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 14 14:54 EDT 2024. Contains 374318 sequences. (Running on oeis4.)