login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A180969 Array read by antidiagonals: a(k,n) = natural numbers each repeated 2^k times. 11
0, 1, 0, 2, 0, 0, 3, 1, 0, 0, 4, 1, 0, 0, 0, 5, 2, 0, 0, 0, 0, 6, 2, 1, 0, 0, 0, 0, 7, 3, 1, 0, 0, 0, 0, 0, 8, 3, 1, 0, 0, 0, 0, 0, 0, 9, 4, 1, 0, 0, 0, 0, 0, 0, 0, 10, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 11, 5, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 12, 5, 2, 1, 0, 0, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Generalization of P. Barry's (2003) formula in A004526.

LINKS

Danny Rorabaugh, Table of n, a(n) for n = 0..10000

FORMULA

a(k,n) = (n/2^k) + Sum_{j=1..k} ((-1)^a(j-1,n) - 1)/2^(k-j+2).

a(k,n) = floor(n/2^k). - Adriano Caroli, Sep 30 2019

EXAMPLE

Sequence gives the antidiagonals of the infinite square array with rows indexed by k and columns indexed by n:

0  1  2  3  4  5  6  7  8  9 10 11 12 13...

0  0  1  1  2  2  3  3  4  4   5   5   6...

0  0  0  0  1  1  1  1  2  2   2   2   3...

0  0  0  0  0  0  0  0  1  1   1   1   1...

0  0  0  0  0  0  0  0  0  0   0   0   0...

...........................................

MATHEMATICA

Table[Floor[#/2^k] &[n - k], {n, 0, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 30 2019 *)

PROG

(MATLAB) function v=A180969(k, n, q)

% n=vector of natural numbers 0, 1, ..., n

% v=vector in which each n is repeated k times

% q=q-th term of v from where to start

if k==0; v=n+q; return; end

v=A180969(k-1, n, q);

% calculate repetition only if v terms are not all zeros

if any(v); v=v/2+((-1).^v-1)/4; end

% Adriano Caroli, Nov 28 2010

(PARI) matrix(10, 20, k, n, k--; n--; floor(n/2^k)) \\ Michel Marcus, Sep 09 2019

CROSSREFS

Cf. A001477, A004526, A002265, A132292.

Sequence in context: A194586 A288437 A287736 * A259479 A238343 A238128

Adjacent sequences:  A180966 A180967 A180968 * A180970 A180971 A180972

KEYWORD

easy,nonn,tabl,less

AUTHOR

Adriano Caroli, Nov 17 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 January 21 05:39 EST 2020. Contains 331104 sequences. (Running on oeis4.)