login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A174980 Stern's diatomic series type ([0,1], 1). 3
0, 0, 1, 0, 2, 1, 1, 0, 3, 2, 3, 1, 2, 1, 1, 0, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 5, 4, 7, 3, 8, 5, 7, 2, 7, 5, 8, 3, 7, 4, 5, 1, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, 0, 6, 5, 9, 4, 11, 7, 10, 3, 11, 8, 13, 5, 12, 7, 9, 2, 9, 7, 12, 5, 13, 8, 11, 3, 10, 7, 11, 4, 9, 5, 6, 1, 5, 4, 7, 3, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

A variant of Stern's diatomic series A002487. See the link [Luschny] and the Maple function below for the classification by types which is based on a generalization of Dijkstra's fusc function.

a(n) is also the number of superduperbinary integer partitions of n.

LINKS

Peter Luschny, row(n) for n = 0..12

Edsger Dijkstra, Selected Writings on Computing, Springer, 1982, p. 232. EWD 578: More about the function 'fusc'.

Peter Luschny, Rational Trees and Binary Partitions.

Moritz A. Stern, Über eine zahlentheoretische Funktion, J. Reine Angew. Math., 55 (1858), 193-220.

FORMULA

Recursion: a(2n + 1) = a(n) and a(2n) = a(n - 1) + a(n) + [n = 2^k] for n = 1, a(0) = 0. [n = 2^k] is 1 if n is a power of 2, 0 otherwise.

EXAMPLE

The sequence splits into rows of length 2^k:

0,

0, 1,

0, 2, 1, 1,

0, 3, 2, 3, 1, 2, 1, 1,

0, 4, 3, 5, 2, 5, 3, 4, 1, 3, 2, 3, 1, 2, 1, 1, ...

MAPLE

SternDijkstra := proc(L, p, n) local k, i, len, M; len := nops(L); M := L; k := n; while k > 0 do M[1+(k mod len)] := add(M[i], i=1..len); k := iquo(k, len); od; op(p, M) end:

a := n -> SternDijkstra([0, 1], 1, n);

MATHEMATICA

a[0] = 0; a[n_?OddQ] := a[n] = a[(n-1)/2]; a[n_?EvenQ] := a[n] = a[n/2 - 1] + a[n/2] + Boole[ IntegerQ[ Log[2, n/2]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jul 26 2013 *)

PROG

(Sage)

def A174980(n):

    M = [0, 1]

    for b in n.bits():

        M[b] = M[0] + M[1]

    return M[0]

print([A174980(n) for n in (0..100)]) # Peter Luschny, Nov 28 2017

CROSSREFS

A002487, A070879, A047679, A007306, A174981.

Sequence in context: A080791 A124748 A161225 * A277488 A119513 A085815

Adjacent sequences:  A174977 A174978 A174979 * A174981 A174982 A174983

KEYWORD

easy,nonn,tabf

AUTHOR

Peter Luschny, Apr 03 2010

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 17 06:45 EST 2018. Contains 318192 sequences. (Running on oeis4.)