Search: seq:1,0,0,1,0,1,0,1,1,0
|
|
A237048
|
|
Irregular triangle read by rows: T(n,k), n >= 1, k >= 1, in which column k lists 1's interleaved with k-1 zeros, and the first element of column k is in row k(k+1)/2.
|
|
+30
212
|
|
|
1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
COMMENTS
|
The sum of row n gives A001227(n), the number of odd divisors of n.
If n = 2^j then the only positive integer in row n is T(n,1) = 1.
If n is an odd prime then the only two positive integers in row n are T(n,1) = 1 and T(n,2) = 1.
The partial sums of column k give the column k of A235791.
Property: Let n = 2^m*s*t with m >= 0 and 1 <= s, t odd, and r(n) = floor(sqrt(8*n+1) - 1)/2) = A003056(n). T(n, k) = 1 precisely when k is odd and k|n, or k = 2^(m+1)*s when 1 <= s < 2^(m+1)*s <= r(n) < t. Thus each odd divisor greater than r(n) is matched by a unique even index less than or equal to r(n).
For further connections with the symmetric representation of sigma see also A249223. (End)
Conjecture 1: alternating sum of row n gives A067742(n), the number of middle divisors of n.
The sum of row n also gives the number of subparts in the symmetric representation of sigma(n), equaling A001227(n), the number of odd divisors of n. For more information see A279387. (End)
Conjecture 2: Alternating sum of row n also gives the number of central subparts in the symmetric representation of sigma(n), equaling the width of the terrace at the n-th level in the main diagonal of the pyramid described in A245092.
Conjecture 3: The sum of the odd-indexed terms in row n gives A082647(n): the number of odd divisors of n less than sqrt(2*n), also the number of partitions of n into an odd number of consecutive parts.
Conjecture 4: The sum of the even-indexed terms in row n gives A131576(n): the number of odd divisors of n greater than sqrt(2*n), also the number of partitions of n into an even number of consecutive parts.
Conjecture 5: The sum of the even-indexed terms in row n also gives the number of pairs of equidistant subparts in the symmetric representation of sigma(n). (End)
Conjecture 6: T(n,k) is also the number of partitions of n into exactly k consecutive parts. - Omar E. Pol, Apr 28 2017
This triangle is a member of an infinite family of irregular triangles read by rows in which column k lists 1's interleaved with k-1 zeros, and the first element of column k is where the row number equals the k-th (m+2)-gonal number, with n >= 1, k >= 1, m >= 0. T(n,k) is also the number of partitions of n into k consecutive parts that differ by m. This is the case for m = 1. For other values of m see the cross-references. - Omar E. Pol, Sep 29 2021
The indices of the rows where the number of 1's increases to a record give A053624. - Omar E. Pol, Mar 04 2023
|
|
LINKS
|
|
|
FORMULA
|
For n >= 1 and k = 1, ..., A003056(n): if k is odd then T(n, k) = 1 if k|n, otherwise 0, and if k is even then T(n, k) = 1 if k|(n-k/2), otherwise 0. - Hartmut F. W. Hoft, Oct 23 2014
A000203(n) = Sum_{k=1..A003056(n)} (-1)^(k-1) * ((Sum_{j=k*(k+1)/2..n} T(j,k))^2 - (Sum_{j=k*(k+1)/2..n} T(j-1,k))^2), assuming that T(k*(k+1)/2-1,k) = 0. - Omar E. Pol, Oct 10 2018
Another way of expressing the formula above, using S(n,k) for entries in the triangle of A235791, is:
T(n,k) = S(n,k) - S(n-1,k), for all n >=1 and 1 <= k <= A003056(n), noting that for triangular numbers n(n+1)/2, S(n(n+1)/2 - 1, A003056(n(n+1)/2) = S(n(n+1)/2 - 1, n) = 0.
Also, T(n,k) = 1 if n - k(k+1)/2 (mod k) = 0, and 0 otherwise. (End)
|
|
EXAMPLE
|
Triangle begins (rows 1..28):
1;
1;
1, 1;
1, 0;
1, 1;
1, 0, 1;
1, 1, 0;
1, 0, 0;
1, 1, 1;
1, 0, 0, 1;
1, 1, 0, 0;
1, 0, 1, 0;
1, 1, 0, 0;
1, 0, 0, 1;
1, 1, 1, 0, 1;
1, 0, 0, 0, 0;
1, 1, 0, 0, 0;
1, 0, 1, 1, 0;
1, 1, 0, 0, 0;
1, 0, 0, 0, 1;
1, 1, 1, 0, 0, 1;
1, 0, 0, 1, 0, 0;
1, 1, 0, 0, 0, 0;
1, 0, 1, 0, 0, 0;
1, 1, 0, 0, 1, 0;
1, 0, 0, 1, 0, 0;
1, 1, 1, 0, 0, 1;
1, 0, 0, 0, 0, 0, 1;
...
For n = 20 the divisors of 20 are 1, 2, 4, 5, 10, 20.
There are two odd divisors: 1 and 5. On the other hand the 20th row of triangle is [1, 0, 0, 0, 1] and the row sum is 2, equaling the number of odd divisors of 20.
For n = 18 the divisors are 1, 2, 3, 6, 9, 18.
There are three odd divisors: 1 and 3 are in their respective columns, but 9 is accounted for in column 4 = 2^2*1 since 18 = 2^1*1*9 and 9>5, the number of columns in row 18. (End)
Illustration of initial terms:
Row _
1 _|1|
2 _|1 _|
3 _|1 |1|
4 _|1 _|0|
5 _|1 |1 _|
6 _|1 _|0|1|
7 _|1 |1 |0|
8 _|1 _|0 _|0|
9 _|1 |1 |1 _|
10 _|1 _|0 |0|1|
11 _|1 |1 _|0|0|
12 _|1 _|0 |1 |0|
13 _|1 |1 |0 _|0|
14 _|1 _|0 _|0|1 _|
15 _|1 |1 |1 |0|1|
16 _|1 _|0 |0 |0|0|
17 _|1 |1 _|0 _|0|0|
18 _|1 _|0 |1 |1 |0|
19 _|1 |1 |0 |0 _|0|
20 _|1 _|0 _|0 |0|1 _|
21 _|1 |1 |1 _|0|0|1|
22 _|1 _|0 |0 |1 |0|0|
23 _|1 |1 _|0 |0 |0|0|
24 _|1 _|0 |1 |0 _|0|0|
25 _|1 |1 |0 _|0|1 |0|
26 _|1 _|0 _|0 |1 |0 _|0|
27 _|1 |1 |1 |0 |0|1 _|
28 |1 |0 |0 |0 |0|0|1|
...
Note that the 1's are placed exactly below the horizontal line segments.
Also the above structure represents the left hand part of the front view of the pyramid described in A245092. For more information about the pyramid and the symmetric representation of sigma see A237593. (End)
|
|
MAPLE
|
r := proc(n) floor((sqrt(1+8*n)-1)/2) ; end proc: # A003056
A237048:=proc(n, k) local i; global r;
if n<(k-1)*k/2 or k>r(n) then return(0); fi;
if (k mod 2)=1 and (n mod k)=0 then return(1); fi;
if (k mod 2)=0 and ((n-k/2) mod k) = 0 then return(1); fi;
return(0);
end;
|
|
MATHEMATICA
|
cd[n_, k_] := If[Divisible[n, k], 1, 0]
row[n_] := Floor[(Sqrt[8n+1] - 1)/2]
a237048[n_, k_] := If[OddQ[k], cd[n, k], cd[n - k/2, k]]
a237048[n_] := Map[a237048[n, #]&, Range[row[n]]]
Flatten[Map[a237048, Range[24]]] (* data: 24 rows of triangle *)
|
|
PROG
|
(PARI) t(n, k) = if (k % 2, (n % k) == 0, ((n - k/2) % k) == 0);
tabf(nn) = {for (n=1, nn, for (k=1, floor((sqrt(1+8*n)-1)/2), print1(t(n, k), ", "); ); print(); ); } \\ Michel Marcus, Sep 20 2015
(Python)
from sympy import sqrt
import math
def T(n, k): return (n%k == 0)*1 if k%2 == 1 else (((n - k/2)%k) == 0)*1
for n in range(1, 21): print([T(n, k) for k in range(1, int(math.floor((sqrt(8*n + 1) - 1)/2)) + 1)]) # Indranil Ghosh, Apr 21 2017
|
|
CROSSREFS
|
Indices of 1's are also the indices of nonzero terms in A196020, A211343, A236106, A239662, A261699, A272026, A280850, A285891, A285914, A286013, A339275.
The MMA code here is also used in A262045.
Triangles of the same family related to partitions into consecutive parts that differ by m are: A051731 (m=0), this sequence (m=1), A303300 (m=2), A330887 (m=3), A334460 (m=4), A334465 (m=5).
Cf. A000203, A001227, A003056, A053624, A057427, A067742, A082647, A131576, A236104, A235791, A237270, A237271, A237591, A237593, A238005, A239657, A245092, A249351, A262611, A262626, A279387, A279693, A285898, A334466.
|
|
KEYWORD
|
nonn,easy,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A030190
|
|
Binary Champernowne sequence (or word): write the numbers 0,1,2,3,4,... in base 2 and juxtapose.
|
|
+30
108
|
|
|
0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
An irregular table in which the n-th row lists the bits of n (see the example section). - Jason Kimberley, Dec 07 2012
The binary Champernowne constant: it is normal in base 2. - Jason Kimberley, Dec 07 2012
This is the characteristic function of A030303, which gives the indices of 1's in this sequence and has first differences given by A066099. - M. F. Hasler, Oct 12 2020
|
|
REFERENCES
|
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
|
|
LINKS
|
Jean Berstel, Home Page (in case the following link should be broken)
|
|
EXAMPLE
|
As an array, this begins:
0,
1,
1, 0,
1, 1,
1, 0, 0,
1, 0, 1,
1, 1, 0,
1, 1, 1,
1, 0, 0, 0,
1, 0, 0, 1,
1, 0, 1, 0,
1, 0, 1, 1,
1, 1, 0, 0,
1, 1, 0, 1,
1, 1, 1, 0,
1, 1, 1, 1,
1, 0, 0, 0, 0,
1, 0, 0, 0, 1,
...
|
|
MATHEMATICA
|
First[RealDigits[ChampernowneNumber[2], 2, 100, 0]] (* Paolo Xausa, Jun 16 2024 *)
|
|
PROG
|
(Haskell)
import Data.List (unfoldr)
a030190 n = a030190_list !! n
a030190_list = concatMap reverse a030308_tabf
(Magma) [0]cat &cat[Reverse(IntegerToSequence(n, 2)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
(Python)
from itertools import count, islice
def A030190_gen(): return (int(d) for m in count(0) for d in bin(m)[2:])
|
|
CROSSREFS
|
See also A066099 for (run lengths of 0s) + 1 = first difference of positions of 1s given by A030303.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A000161
|
|
Number of partitions of n into 2 squares.
|
|
+30
63
|
|
|
1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,26
|
|
COMMENTS
|
Number of ways of writing n as a sum of 2 (possibly zero) squares when order does not matter.
Number of similar sublattices of square lattice with index n.
|
|
REFERENCES
|
J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 339
|
|
LINKS
|
R. T. Bumby, Sums of four squares, in Number theory (New York, 1991-1995), 1-8, Springer, New York, 1996.
J. H. Conway, E. M. Rains and N. J. A. Sloane, On the existence of similar sublattices, Canad. J. Math. 51 (1999), 1300-1306 (Abstract, pdf, ps).
|
|
FORMULA
|
a(n) = card { { a,b } c N | a^2+b^2 = n }. - M. F. Hasler, Nov 23 2007
Let f(n)= the number of divisors of n that are congruent to 1 modulo 4 minus the number of its divisors that are congruent to 3 modulo 4, and define delta(n) to be 1 if n is a perfect square and 0 otherwise. Then a(n)=1/2 (f(n)+delta(n)+delta(1/2 n)). - Ant King, Oct 05 2010
|
|
EXAMPLE
|
25 = 3^2+4^2 = 5^2, so a(25) = 2.
|
|
MAPLE
|
A000161 := proc(n) local i, j, ans; ans := 0; for i from 0 to n do for j from i to n do if i^2+j^2=n then ans := ans+1 fi od od; RETURN(ans); end; [ seq(A000161(i), i=0..50) ];
|
|
MATHEMATICA
|
Length[PowersRepresentations[ #, 2, 2]] &/@Range[0, 150] (* Ant King, Oct 05 2010 *)
|
|
PROG
|
(PARI) a(n)=sum(i=0, n, sum(j=0, i, if(i^2+j^2-n, 0, 1))) \\ for illustrative purpose
(Haskell)
a000161 n =
sum $ map (a010052 . (n -)) $ takeWhile (<= n `div` 2) a000290_list
a000161_list = map a000161 [0..]
(Python)
from math import prod
from sympy import factorint
f = factorint(n)
return int(not any(e&1 for e in f.values())) + (((m:=prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in f.items()))+((((~n & n-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1) if n else 1 # Chai Wah Wu, Sep 08 2022
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,core,easy,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A030302
|
|
Write n in base 2 and juxtapose; irregular table in which row n lists the binary expansion of n.
|
|
+30
63
|
|
|
1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The binary Champernowne constant: it is normal in base 2. - Jason Kimberley, Dec 07 2012
A word that is recurrent, but neither morphic nor uniformly recurrent. - N. J. A. Sloane, Jul 14 2018
See A030303 for the indices of 1's (so this is the characteristic function of A030303), with first differences (i.e., run lengths of 0's, increased by 1, with two consecutive 1's delimiting a run of zero 0's) given by A066099. - M. F. Hasler, Oct 12 2020
|
|
REFERENCES
|
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
|
|
LINKS
|
Jean-Paul Allouche, Julien Cassaigne, Jeffrey Shallit and Luca Q. Zamboni, A Taxonomy of Morphic Sequences, arXiv preprint arXiv:1711.10807 [cs.FL], Nov 29 2017.
|
|
FORMULA
|
a(n) = (floor(2^(((n + 2^i - 2) mod i) - i + 1) * ceiling((n + 2^i - 1)/i - 1))) mod 2 where i = ceiling( W(log(2)/2 (n - 1))/log(2) + 1 ) and W denotes the principal branch of the Lambert W function. See also Mathematica code. - David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007
|
|
MAPLE
|
A030302 := proc(n) local i, t1, t2; t1:=convert(n, base, 2); t2:=nops(t1); [seq(t1[t2+1-i], i=1..t2)]; end; # N. J. A. Sloane, Apr 08 2021
|
|
MATHEMATICA
|
i[n_] := Ceiling[FullSimplify[ProductLog[Log[2]/2 (n - 1)]/Log[2] + 1]]; a[n_] := Mod[Floor[2^(Mod[n + 2^i[n] - 2, i[n]] - i[n] + 1) Ceiling[(n + 2^i[n] - 1)/i[n] - 1]], 2]; (* David W. Cantrell (DWCantrell(AT)sigmaxi.net), Feb 19 2007 *)
Join @@ Table[ IntegerDigits[i, 2], {i, 1, 40}] (* Olivier Gérard, Mar 28 2011 *)
Flatten@ IntegerDigits[ Range@ 25, 2] (* or *)
almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[#, 2] &, 105] (* Robert G. Wilson v, Jun 29 2014 *)
|
|
PROG
|
(Magma) &cat[Reverse(IntegerToSequence(n, 2)): n in [1..31]]; // Jason Kimberley, Mar 02 2012
(Python)
from itertools import count, islice
def A030302_gen(): # generator of terms
return (int(d) for n in count(1) for d in bin(n)[2:])
|
|
CROSSREFS
|
Sequences mentioned in the Allouche et al. "Taxonomy" paper, listed by example number: 1: A003849, 2: A010060, 3: A010056, 4: A020985 and A020987, 5: A191818, 6: A316340 and A273129, 18: A316341, 19: A030302, 20: A063438, 21: A316342, 22: A316343, 23: A003849 minus its first term, 24: A316344, 25: A316345 and A316824, 26: A020985 and A020987, 27: A316825, 28: A159689, 29: A049320, 30: A003849, 31: A316826, 32: A316827, 33: A316828, 34: A316344, 35: A043529, 36: A316829, 37: A010060.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A051023
|
|
Middle column of rule-30 1-D cellular automaton, from a lone 1 cell.
|
|
+30
24
|
|
|
1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Also middle column of rule 86 1-D cellular automaton, from a lone 1 cell, as rule 86 is the mirror image of rule 30. - Antti Karttunen, Oct 03 2019
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Rule 30
|
|
FORMULA
|
(End)
|
|
MATHEMATICA
|
CellularAutomaton[30, {{1}, 0}, 101, {All, {0}}]//Flatten
|
|
PROG
|
(Haskell)
(PARI)
\\ Or for fast creation of b-files:
A051023write(up_to) = { my(s=1, n=0); for(n=0, up_to, write("b051023.txt", n, " ", ((s>>n)%2)); s = A269160(s)); }; \\ Antti Karttunen, Oct 03 2019
|
|
CROSSREFS
|
Characteristic function of A327984 (gives the positions of ones in this sequence), A327985 (positions of zeros).
Cf. A365254 (converted to base 10).
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected from 64th term by Daniel B. Cristofani (cristofd(AT)hevanet.com), Jan 07 2004
|
|
STATUS
|
approved
|
|
|
|
|
A011751
|
|
Expansion of (1 + x^4)/(1 + x + x^3 + x^4 + x^5) mod 2.
|
|
+30
23
|
|
|
1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1), i.e., 31-periodic.
|
|
FORMULA
|
|
|
MAPLE
|
series((1+x^4)/(1+x+x^3+x^4+x^5), x, 100) mod 2;
[seq(coeff(series((1+x^4)/(1+x+x^3+x^4+x^5), x, 100) mod 2, x, n), n=0..80)]; # Muniru A Asiru, Feb 18 2018
|
|
MATHEMATICA
|
Mod[ CoefficientList[ Series[(1 + x^4)/(1 + x + x^3 + x^4 + x^5), {x, 0, 105}], x], 2] (* Robert G. Wilson v, Feb 19 2018 *)
|
|
PROG
|
(PARI) a(n)=bittest(1826728215, n%31) \\ M. F. Hasler, Feb 17 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A024316
|
|
a(n) = s(1)*s(n) + s(2)*s(n-1) + ... + s(k)*s(n+1-k), where k = floor((n+1)/2), s = A023531.
|
|
+30
19
|
|
|
0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 0, 1, 1, 0, 2, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,28
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a024316 n = sum $ take (div (n + 1) 2) $ zipWith (*) zs $ reverse zs
where zs = take n $ tail a023531_list
(Magma)
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
(Sage)
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
|
|
CROSSREFS
|
Cf. A024312, A024313, A024314, A024315, A024317, A024318, A024319, A024320, A024321, A024322, A024323, A024324, A024325, A024326, A024327.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A189920
|
|
Zeckendorf representation of natural numbers.
|
|
+30
17
|
|
|
1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
COMMENTS
|
The row lengths sequence of this array is A072649(n), n >= 1.
Note that the Fibonacci numbers F(0)=0 and F(1)=1 are not used in this unique representation of n >= 1. No neighboring Fibonacci numbers are allowed (no 1,1, subsequence in any row n).
|
|
REFERENCES
|
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, 2nd ed., 1994, Addison-Wesley, Reading MA, pp. 295-296.
E. Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41.3-4 (1972) 179-182 (with the proof from 1939).
|
|
LINKS
|
|
|
FORMULA
|
n = Sum_{m=1..rl(n)} a(n,m)*F(rl(n) + 2 - m), n >= 1, with rl(n):=A072649(n)(row length) and F(n):=A000045(n) (Fibonacci numbers).
|
|
EXAMPLE
|
n=1: 1;
n=2: 1, 0;
n=3: 1, 0, 0;
n=4: 1, 0, 1;
n=5: 1, 0, 0, 0;
n=6: 1, 0, 0, 1;
n=7: 1, 0, 1, 0;
n=8: 1, 0, 0, 0, 0;
n=9: 1, 0, 0, 0, 1;
n=10: 1, 0, 0, 1, 0;
n=11: 1, 0, 1, 0, 0;
n=12: 1, 0, 1, 0, 1;
n=13: 1, 0, 0, 0, 0, 0;
...
1 = F(2),
6 = F(5) + F(2),
11 = F(6) + F(4).
|
|
MATHEMATICA
|
f[n_] := (k = 1; ff = {}; While[(fi = Fibonacci[k]) <= n, AppendTo[ff, fi]; k++]; Drop[ff, 1]); a[n_] := (fn = f[n]; xx = Array[x, Length[fn]]; r = xx /. {ToRules[ Reduce[ And @@ (0 <= # <= 1 & ) /@ xx && fn . xx == n, xx, Integers]]}; Reverse[ First[ Select[ r, FreeQ[ Split[#], {1, 1, ___}] & ]]]); Flatten[ Table[ a[n], {n, 1, 25}]] (* Jean-François Alcover, Sep 29 2011 *)
|
|
PROG
|
(Haskell)
a189920 n k = a189920_row n !! k
a189920_row n = z n $ reverse $ takeWhile (<= n) $ tail a000045_list where
z x (f:fs'@(_:fs)) | f == 1 = if x == 1 then [1] else []
| f == x = 1 : replicate (length fs) 0
| f < x = 1 : 0 : z (x - f) fs
| f > x = 0 : z x fs'
a189920_tabf = map a189920_row [1..]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,tabf,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A129405
|
|
Expansion of L(3, chi3) in base 2, where L(s, chi3) is the Dirichlet L-function for the non-principal character modulo 3.
|
|
+30
15
|
|
|
1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Contributed to OEIS on Apr 15 2007 -- the 300th anniversary of the birth of Leonhard Euler.
|
|
REFERENCES
|
Leonhard Euler, "Introductio in Analysin Infinitorum", First Part, Articles 176 and 292
|
|
LINKS
|
|
|
FORMULA
|
chi3(k) = Kronecker(-3, k); chi3(k) is 0, 1, -1 when k reduced modulo 3 is 0, 1, 2, respectively; chi3 is A049347 shifted.
Series: L(3, chi3) = sum_{k >= 1} chi3(k) k^{-3} = 1 - 1/2^3 + 1/4^3 - 1/5^3 + 1/7^3 - 1/8^3 + 1/10^3 - 1/11^3 + ...
Closed form: L(3, chi3) = 4 Pi^3/(81 sqrt(3)).
|
|
EXAMPLE
|
L(3, chi3) = A129404 = (0.111000100100111101100010011100000101101...)_2
|
|
MATHEMATICA
|
nmax = 1000; First[ RealDigits[4 Pi^3/(81 Sqrt[3]) - (1/2) * 2^(-nmax), 2, nmax] ]
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A142724
|
|
Irregular triangle read by rows: row n gives coefficients in expansion of Product_{k=1..n} (1 + x^(2*k + 1)) for n >= 0.
|
|
+30
14
|
|
|
1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 0, 2, 1, 2, 1, 1, 2, 1, 2, 0, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,43
|
|
COMMENTS
|
For n >= 1, row n is the Poincaré polynomial for the Lie group A_n.
Row sums are powers of 2.
|
|
REFERENCES
|
Borel, A. and Chevalley, C., The Betti numbers of the exceptional groups, Mem. Amer. Math. Soc. 1955, no. 14, pp 1-9.
Samuel I. Goldberg, Curvature and Homology, Dover, New York, 1998, page 144
|
|
LINKS
|
|
|
FORMULA
|
p(x,n) = Product[(1 + x^(2*k + 1)), {k, 1, n}]; t(n,m)=coefficients(p(x,n)).
|
|
EXAMPLE
|
Triangle begins:
{1} (the empty product)
{1, 0, 0, 1},
{1, 0, 0, 1, 0, 1, 0, 0, 1},
{1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1},
{1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1},
{1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 0, 2, 1, 2, 1, 1, 2, 1, 2, 0, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1},
...
|
|
MAPLE
|
A:=n->mul(1+x^(2*r+1), r=1..n);
for n from 1 to 12 do lprint(seriestolist(series(A(n), x, 10000))); od:
|
|
MATHEMATICA
|
Clear[p, x, n, m]; p[x_, n_] = Product[(1 + x^(2*k + 1)), {k, 1, n}]; Table[CoefficientList[p[x, n], x], {n, 1, 10}]; Flatten[%]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.016 seconds
|