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!)
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
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
Sequence in context: A194586 A288437 A287736 * A369312 A259479 A238343
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 30 17:37 EDT 2024. Contains 372139 sequences. (Running on oeis4.)