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!)
A330720 a(n) is the number of ways of writing the binary expansion of n as a product (or concatenation) of nonpalindromes. 1
0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 2, 1, 1, 1, 1, 0, 1, 2, 2, 2, 2, 0, 2, 1, 1, 2, 2, 0, 1, 1, 1, 0, 1, 3, 3, 3, 3, 3, 3, 2, 2, 3, 4, 2, 2, 2, 3, 1, 1, 3, 2, 1, 2, 2, 3, 1, 1, 2, 2, 1, 1, 1, 1, 0, 1, 4, 4, 4, 3, 5, 5, 3, 3, 4, 4, 4, 4, 5, 5, 2, 2, 5, 4, 4, 4, 0, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,11

COMMENTS

This sequence is a variant of A215244.

LINKS

Rémy Sigrist, Table of n, a(n) for n = 0..8192

Index entries for sequences related to binary expansion of n

FORMULA

a(2^k-1) = 0 for any k >= 0.

a(A020988(k+1)) = 2^k for any k >= 0.

EXAMPLE

For n = 41:

- the binary expansion of 41 is "101001",

- the possible products of nonpalindromes are "101001", "1010"."01", and "10"."10"."01",

- hence a(41) = 3.

MAPLE

ispali:= proc(L) L = ListTools:-Reverse(L) end proc:

g:= proc(L) option remember; local m;

add(procname(L[m+1..-1]), m= remove(t -> ispali(L[1..t]), [$1..nops(L)]))

end proc:

g([]):= 1:

seq(g(convert(n, base, 2)), n=0..100); # Robert Israel, Dec 29 2019

PROG

(PARI) a(n) = my (b=binary(n), v=b!=Vecrev(b)); for (s=1, #b, my (z=b[s..#b]); if (z!=Vecrev(z), v+=a(fromdigits(b[1..s-1], 2)))); v

CROSSREFS

Cf. A020988, A154809, A215244, A301453.

Sequence in context: A258045 A239302 A256983 * A080234 A136049 A225192

Adjacent sequences: A330717 A330718 A330719 * A330721 A330722 A330723

KEYWORD

nonn,base,look

AUTHOR

Rémy Sigrist, Dec 28 2019

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 February 8 12:47 EST 2023. Contains 360138 sequences. (Running on oeis4.)