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!)
A354158 The Bodlaender function: a(1) = -1; a(2*n) = a(n), a(2*n+1) = a(n+1) + n. 1
-1, -1, 0, -1, 2, 0, 2, -1, 6, 2, 5, 0, 8, 2, 6, -1, 14, 6, 11, 2, 15, 5, 11, 0, 20, 8, 15, 2, 20, 6, 14, -1, 30, 14, 23, 6, 29, 11, 21, 2, 35, 15, 26, 5, 33, 11, 23, 0, 44, 20, 33, 8, 41, 15, 29, 2, 48, 20, 35, 6, 44, 14, 30, -1, 62, 30, 47, 14, 57, 23, 41, 6, 65, 29, 48, 11, 59, 21, 41, 2, 75, 35, 56, 15, 68, 26, 48, 5, 77, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
Hans L. Bodlaender, Jitender S. Deogun, Klaus Jansen, Ton Kloks, Dieter Kratsch, Haiko Müller, and Zsolt Tuza, Rankings of Graphs, SIAM J. Discrete Math., 11 (1998), 168-181. See p. 179.
Andreas M. Hinz, Sandi Klavžar, and Sara Sabrina Zemljič, A survey and classification of Sierpiński-type graphs, Discrete Applied Math., 217 (2017), 565-600. See Cor. 4.9.
MAPLE
g:=proc(n) option remember; if n = 1 then -1 elif (n mod 2) = 0 then g(n/2) else (n-1)/2 + g((n+1)/2); fi; end;
PROG
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
def a(n):
if n == 1: return -1
return a(n//2+1) + n//2 if n&1 else a(n//2)
print([a(n) for n in range(1, 91)]) # Michael S. Branicky, Jul 25 2022
CROSSREFS
Sequence in context: A036997 A116900 A254372 * A363580 A196517 A298141
KEYWORD
sign
AUTHOR
N. J. A. Sloane, May 30 2022, following a suggestion from Don Knuth
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 30 20:43 EDT 2024. Contains 372141 sequences. (Running on oeis4.)