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!)
A076141 Number of times n occurs as a binary sub-pattern of n^2. 2
1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(A018826(n))>0; is a(n)<=1 for all n?
Not multiplicative: a(5) = 0, a(29) = 0, a(145) = 1. - David W. Wilson, Jun 10 2005
a(n) <= 1 for n <= 10^6. - Robert Israel, Jul 11 2018
LINKS
EXAMPLE
a(27) = 1 as 27 = '11011' occurs in 27^2=729 = '1011011001' once: '**11011***'.
MAPLE
f:= proc(n) local S, S2;
S:= convert(convert(n, binary), string);
S2:= convert(convert(n^2, binary), string);
nops([StringTools:-SearchAll(S, S2)])
end proc:
map(f, [$0..200]); # Robert Israel, Jul 11 2018
PROG
(PARI) issub(b, bs, k) = {for (i=1, #b, if (b[i] != bs[i+k-1], return (0)); ); return (1); }
a(n) = {if (n, b = binary(n), b = [0]); if (n, bs = binary(n^2), bs = [0]); sum(k=1, #bs - #b +1, issub(b, bs, k)); } \\ Michel Marcus, Mar 15 2015
CROSSREFS
Cf. A018826.
Sequence in context: A339653 A255738 A296209 * A011751 A341540 A214507
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Oct 31 2002
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 April 19 07:26 EDT 2024. Contains 371782 sequences. (Running on oeis4.)