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!)
A352846 a(n) is the greatest k < n such that A109812(k) AND A109812(n) = A109812(k) or 0 if no such k exists (where AND denotes the bitwise AND operator). 2

%I #13 Aug 28 2023 08:20:53

%S 0,0,0,2,0,3,5,0,3,5,8,5,8,12,0,9,8,15,8,10,15,13,15,19,15,12,15,26,0,

%T 19,23,29,17,25,29,17,21,29,30,29,36,29,25,19,35,23,29,43,47,0,44,40,

%U 50,44,40,50,46,47,50,25,42,27,38,27,38,27,42,27,67,50

%N a(n) is the greatest k < n such that A109812(k) AND A109812(n) = A109812(k) or 0 if no such k exists (where AND denotes the bitwise AND operator).

%H Rémy Sigrist, <a href="/A352846/b352846.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A352846/a352846.png">Scatterplot of the first 500000 terms</a>

%H Rémy Sigrist, <a href="/A352846/a352846.txt">C++ program</a>

%F a(n) = 0 iff A109812(n) is a power of 2.

%e For k = 9:

%e - A109812(9) = 6,

%e - also:

%e k A109812(k) A109812(7) AND A109812(k)

%e - ---------- -------------------------

%e 8 16 0

%e 7 10 2

%e 6 5 4

%e 5 8 0

%e 4 3 2

%e 3 4 4 <- A109812(3)

%e - so a(9) = 3.

%o (C++) See Links section.

%Y Cf. A109812, A352845.

%K nonn,base

%O 1,4

%A _Rémy Sigrist_, Apr 05 2022

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 June 29 18:23 EDT 2024. Contains 373855 sequences. (Running on oeis4.)