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!)
Search: seq:1,1,1,1,1,1,1,1,1,1
Displaying 1-10 of 3144 results found. page 1 2 3 4 5 6 7 8 9 10 ... 315
     Sort: relevance | references | number | modified | created      Format: long | short | data
A000012 The simplest sequence of positive numbers: the all 1's sequence.
(Formerly M0003)
+30
2492
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; table; constant; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Number of ways of writing n as a product of primes.
Number of ways of writing n as a sum of distinct powers of 2.
Continued fraction for golden ratio A001622.
Partial sums of A000007 (characteristic function of 0). - Jeremy Gardiner, Sep 08 2002
An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - Don Reble, Apr 17 2005
Binomial transform of A000007; inverse binomial transform of A000079. - Philippe Deléham, Jul 07 2005
A063524(a(n)) = 1. - Reinhard Zumkeller, Oct 11 2008
For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+1 n+2). Then a(n) = absolute value of det(M(n)). - K.V.Iyer, Apr 11 2009
The partial sums give the natural numbers (A000027). - Daniel Forgues, May 08 2009
From Enrique Pérez Herrero, Sep 04 2009: (Start)
a(n) is also tau_1(n) where tau_2(n) is A000005.
a(n) is a completely multiplicative arithmetical function.
a(n) is both squarefree and a perfect square. See A005117 and A000290. (End)
Also smallest divisor of n. - Juri-Stepan Gerasimov, Sep 07 2009
Also decimal expansion of 1/9. - Enrique Pérez Herrero, Sep 18 2009; corrected by Klaus Brockhaus, Apr 02 2010
a(n) is also the number of complete graphs on n nodes. - Pablo Chavez (pchavez(AT)cmu.edu), Sep 15 2009
Totally multiplicative sequence with a(p) = 1 for prime p. Totally multiplicative sequence with a(p) = a(p-1) for prime p. - Jaroslav Krizek, Oct 18 2009
n-th prime minus phi(prime(n)); number of divisors of n-th prime minus number of perfect partitions of n-th prime; the number of perfect partitions of n-th prime number; the number of perfect partitions of n-th noncomposite number. - Juri-Stepan Gerasimov, Oct 26 2009
For all n>0, the sequence of limit values for a(n) = n!*Sum_{k>=n} k/(k+1)!. Also, a(n) = n^0. - Harlan J. Brothers, Nov 01 2009
a(n) is also the number of 0-regular graphs on n vertices. - Jason Kimberley, Nov 07 2009
Differences between consecutive n. - Juri-Stepan Gerasimov, Dec 05 2009
From Matthew Vandermast, Oct 31 2010: (Start)
1) When sequence is read as a regular triangular array, T(n,k) is the coefficient of the k-th power in the expansion of (x^(n+1)-1)/(x-1).
2) Sequence can also be read as a uninomial array with rows of length 1, analogous to arrays of binomial, trinomial, etc., coefficients. In a q-nomial array, T(n,k) is the coefficient of the k-th power in the expansion of ((x^q -1)/(x-1))^n, and row n has a sum of q^n and a length of (q-1)*n + 1. (End)
The number of maximal self-avoiding walks from the NW to SW corners of a 2 X n grid.
When considered as a rectangular array, A000012 is a member of the chain of accumulation arrays that includes the multiplication table A003991 of the positive integers. The chain is ... < A185906 < A000007 < A000012 < A003991 < A098358 < A185904 < A185905 < ... (See A144112 for the definition of accumulation array.) - Clark Kimberling, Feb 06 2011
a(n) = A007310(n+1) (Modd 3) := A193680(A007310(n+1)), n>=0. For general Modd n (not to be confused with mod n) see a comment on A203571. The nonnegative members of the three residue classes Modd 3, called [0], [1], and [2], are shown in the array A088520, if there the third row is taken as class [0] after inclusion of 0. - Wolfdieter Lang, Feb 09 2012
Let M = Pascal's triangle without 1's (A014410) and V = a variant of the Bernoulli numbers A027641 but starting [1/2, 1/6, 0, -1/30, ...]. Then M*V = [1, 1, 1, 1, ...]. - Gary W. Adamson, Mar 05 2012
As a lower triangular array, T is an example of the fundamental generalized factorial matrices of A133314. Multiplying each n-th diagonal by t^n gives M(t) = I/(I-t*S) = I + t*S + (t*S)^2 + ... where S is the shift operator A129184, and T = M(1). The inverse of M(t) is obtained by multiplying the first subdiagonal of T by -t and the other subdiagonals by zero, so A167374 is the inverse of T. Multiplying by t^n/n! gives exp(t*S) with inverse exp(-t*S). - Tom Copeland, Nov 10 2012
The original definition of the meter was one ten-millionth of the distance from the Earth's equator to the North Pole. According to that historical definition, the length of one degree of latitude, that is, 60 nautical miles, would be exactly 111111.111... meters. - Jean-François Alcover, Jun 02 2013
Deficiency of 2^n. - Omar E. Pol, Jan 30 2014
Consider n >= 1 nonintersecting spheres each with surface area S. Define point p on sphere S_i to be a "public point" if and only if there exists a point q on sphere S_j, j != i, such that line segment pq INTERSECT S_i = {p} and pq INTERSECT S_j = {q}; otherwise, p is a "private point". The total surface area composed of exactly all private points on all n spheres is a(n)*S = S. ("The Private Planets Problem" in Zeitz.) - Rick L. Shepherd, May 29 2014
For n>0, digital roots of centered 9-gonal numbers (A060544). - Colin Barker, Jan 30 2015
Product of nonzero digits in base-2 representation of n. - Franklin T. Adams-Watters, May 16 2016
Alternating row sums of triangle A104684. - Wolfdieter Lang, Sep 11 2016
A fixed point of the run length transform. - Chai Wah Wu, Oct 21 2016
Length of period of continued fraction for sqrt(A002522) or sqrt(A002496). - A.H.M. Smeets, Oct 10 2017
a(n) is also the determinant of the (n+1) X (n+1) matrix M defined by M(i,j) = binomial(i,j) for 0 <= i,j <= n, since M is a lower triangular matrix with main diagonal all 1's. - Jianing Song, Jul 17 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = min(i,j) for 1 <= i,j <= n (see Xavier Merlin reference). - Bernard Schott, Dec 05 2018
a(n) is also the determinant of the symmetric n X n matrix M defined by M(i,j) = tau(gcd(i,j)) for 1 <= i,j <= n (see De Koninck & Mercier reference). - Bernard Schott, Dec 08 2020
REFERENCES
J.-M. De Koninck & A. Mercier, 1001 Problèmes en Théorie Classique des Nombres, Problème 692 pp. 90 and 297, Ellipses, Paris, 2004.
Xavier Merlin, Méthodix Algèbre, Exercice 1-a), page 153, Ellipses, Paris, 1995.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.
Paul Zeitz, The Art and Craft of Mathematical Problem Solving, The Great Courses, The Teaching Company, 2010 (DVDs and Course Guidebook, Lecture 6: "Pictures, Recasting, and Points of View", pp. 32-34).
LINKS
Jeremiah Bartz, Bruce Dearden, and Joel Iiams, Classes of Gap Balancing Numbers, arXiv:1810.07895 [math.NT], 2018.
Harlan Brothers, Factorial: Summation (formula 06.01.23.0002), The Wolfram Functions Site - Harlan J. Brothers, Nov 01 2009
Daniele A. Gewurz and Francesca Merola, Sequences realized as Parker vectors of oligomorphic permutation groups, J. Integer Seqs., Vol. 6, 2003.
A. M. Hinz, S. Klavžar, U. Milutinović, and C. Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 172. Book's website
L. B. W. Jolley, Summation of Series, Dover, 1961
Jerry Metzger and Thomas Richards, A Prisoner Problem Variation, Journal of Integer Sequences, Vol. 18 (2015), Article 15.2.7.
László Németh, The trinomial transform triangle, J. Int. Seqs., Vol. 21 (2018), Article 18.7.3. Also arXiv:1807.07109 [math.NT], 2018.
Michael Z. Spivey and Laura L. Steil, The k-Binomial Transforms and the Hankel Transform, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.
Eric Weisstein's World of Mathematics, Golden Ratio
Eric Weisstein's World of Mathematics, Chromatic Number
Eric Weisstein's World of Mathematics, Graph Cycle
Eric Weisstein's World of Mathematics, Elementary Cellular Automaton
G. Xiao, Contfrac
FORMULA
a(n) = 1.
G.f.: 1/(1-x).
E.g.f.: exp(x).
G.f.: Product_{k>=0} (1 + x^(2^k)). - Zak Seidov, Apr 06 2007
Completely multiplicative with a(p^e) = 1.
Regarded as a square array by antidiagonals, g.f. 1/((1-x)(1-y)), e.g.f. Sum T(n,m) x^n/n! y^m/m! = e^{x+y}, e.g.f. Sum T(n,m) x^n y^m/m! = e^y/(1-x). Regarded as a triangular array, g.f. 1/((1-x)(1-xy)), e.g.f. Sum T(n,m) x^n y^m/m! = e^{xy}/(1-x). - Franklin T. Adams-Watters, Feb 06 2006
Dirichlet g.f.: zeta(s). - Ilya Gutkovskiy, Aug 31 2016
a(n) = Sum_{l=1..n} (-1)^(l+1)*2*cos(Pi*l/(2*n+1)) = 1 identically in n >= 1 (for n=0 one has 0 from the undefined sum). From the Jolley reference, (429) p. 80. Interpretation: consider the n segments between x=0 and the n positive zeros of the Chebyshev polynomials S(2*n, x) (see A049310). Then the sum of the lengths of every other segment starting with the one ending in the largest zero (going from the right to the left) is 1. - Wolfdieter Lang, Sep 01 2016
As a lower triangular matrix, T = M*T^(-1)*M = M*A167374*M, where M(n,k) = (-1)^n A130595(n,k). Note that M = M^(-1). Cf. A118800 and A097805. - Tom Copeland, Nov 15 2016
EXAMPLE
1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.
1/9 = 0.11111111111111...
From Wolfdieter Lang, Feb 09 2012: (Start)
Modd 7 for nonnegative odd numbers not divisible by 3:
A007310: 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, ...
Modd 3: 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
(End)
MAPLE
seq(1, i=0..150);
MATHEMATICA
Array[1 &, 50] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
PROG
(Magma) [1 : n in [0..100]];
(PARI) {a(n) = 1};
(Haskell)
a000012 = const 1
a000012_list = repeat 1 -- Reinhard Zumkeller, May 07 2012
(Maxima) makelist(1, n, 1, 30); /* Martin Ettl, Nov 07 2012 */
(Python) print([1 for n in range(90)]) # Michael S. Branicky, Apr 04 2022
CROSSREFS
For other q-nomial arrays, see A007318, A027907, A008287, A035343, A063260, A063265, A171890. - Matthew Vandermast, Oct 31 2010
Cf. A097805, A118800, A130595, A167374, A008284 (multisets).
KEYWORD
nonn,core,easy,mult,cofr,cons,tabl
AUTHOR
N. J. A. Sloane, May 16 1994
STATUS
approved
A055642 Number of digits in the decimal expansion of n. +30
465
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
COMMENTS
From Hieronymus Fischer, Jun 08 2012: (Start)
For n > 0 the first differences of A117804.
The total number of digits necessary to write down all the numbers 0, 1, 2, ..., n is A117804(n+1). (End)
Here a(0) = 1, but a different common convention is to consider that the expansion of 0 in any base b > 0 has 0 terms and digits. - M. F. Hasler, Dec 07 2018
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
FORMULA
a(A046760(n)) < A050252(A046760(n)); a(A046759(n)) > A050252(A046759(n)). - Reinhard Zumkeller, Jun 21 2011
a(n) = A196563(n) + A196564(n).
a(n) = 1 + floor(log_10(n)) = 1 + A004216(n) = ceiling(log_10(n+1)) = A004218(n+1), if n >= 1. - Daniel Forgues, Mar 27 2014
a(A046758(n)) = A050252(A046758(n)). - Reinhard Zumkeller, Jun 21 2011
a(n) = A117804((n+1) - A117804(n), n > 0. - Hieronymus Fischer, Jun 08 2012
G.f.: g(x) = 1 + (1/(1-x))*Sum_{j>=0} x^(10^j). - Hieronymus Fischer, Jun 08 2012
a(n) = A262190(n) for n < 100; a(A262198(n)) != A262190(A262198(n)). - Reinhard Zumkeller, Sep 14 2015
EXAMPLE
Examples:
999: 1 + floor(log_10(999)) = 1 + floor(2.x) = 1 + 2 = 3 or
ceiling(log_10(999+1)) = ceiling(log_10(1000)) = ceiling(3) = 3;
1000: 1 + floor(log_10(1000)) = 1 + floor(3) = 1 + 3 = 4 or
ceiling(log_10(1000+1)) = ceiling(log_10(1001)) = ceiling(3.x) = 4;
1001: 1 + floor(log_10(1001)) = 1 + floor(3.x) = 1 + 3 = 4 or
ceiling(log_10(1001+1)) = ceiling(log_10(1002)) = ceiling(3.x) = 4;
MAPLE
A055642 := proc(n)
max(1, ilog10(n)+1) ;
end proc: # R. J. Mathar, Nov 30 2011
MATHEMATICA
Join[{1}, Array[ Floor[ Log[10, 10# ]] &, 104]] (* Robert G. Wilson v, Jan 04 2006 *)
Join[{1}, Table[IntegerLength[n], {n, 104}]]
IntegerLength[Range[0, 120]] (* Harvey P. Dale, Jul 02 2016 *)
PROG
(PARI) a(n)=#Str(n) \\ M. F. Hasler, Nov 17 2008
(PARI) A055642(n)=logint(n+!n, 10)+1 \\ Increasingly faster than the above, for larger n. (About twice as fast for n ~ 10^7.) - M. F. Hasler, Dec 07 2018
(Haskell)
a055642 :: Integer -> Int
a055642 = length . show -- Reinhard Zumkeller, Feb 19 2012, Apr 26 2011
(Magma) [ #Intseq(n): n in [0..105] ]; // Bruno Berselli, Jun 30 2011
(Common Lisp) (defun A055642 (n) (if (zerop n) 1 (floor (log n 10)))) ; James Spahlinger, Oct 13 2012
(Python)
def a(n): return len(str(n))
print([a(n) for n in range(121)]) # Michael S. Branicky, May 10 2022
(Python)
def A055642(n): # Faster than len(str(n)) from ~ 50 digits on
L = math.log10(n or 1)
if L.is_integer() and 10**int(L)>n: return int(L or 1)
return int(L)+1 # M. F. Hasler, Apr 08 2024
CROSSREFS
Cf. A007953: sum of digits.
KEYWORD
base,easy,nonn,nice
AUTHOR
Henry Bottomley, Jun 06 2000
STATUS
approved
A135010 Triangle read by rows in which row n lists A000041(n-1) 1's followed by the list of juxtaposed lexicographically ordered partitions of n that do not contain 1 as a part. +30
288
1, 1, 2, 1, 1, 3, 1, 1, 1, 2, 2, 4, 1, 1, 1, 1, 1, 2, 3, 5, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 3, 3, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 2, 5, 3, 4, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 4, 2, 3, 3, 2, 6, 3, 5, 4, 4, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
This is the original sequence of a large number of sequences connected with the section model of partitions.
Here "the n-th section of the set of partitions of any integer greater than or equal to n" (hence "the last section of the set of partitions of n") is defined to be the set formed by all parts that occur as a result of taking all partitions of n and then removing all parts of the partitions of n-1. For integers greater than 1 the structure of a section has two main areas: the head and tail. The head is formed by the partitions of n that do not contain 1 as a part. The tail is formed by A000041(n-1) partitions of 1. The set of partitions of n contains the sets of partitions of the previous numbers. The section model of partitions has several versions according with the ordering of the partitions or with the representation of the sections. In this sequence we use the ordering of A026791.
The section model of partitions can be interpreted as a table of partitions. See also A138121. - Omar E. Pol, Nov 18 2009
It appears that the versions of the model show an overlapping of sections and subsections of the numbers congruent to k mod m into parts >= m. For example:
First generation (the main table):
Table 1.0: Partitions of integers congruent to 0 mod 1 into parts >= 1.
Second generation:
Table 2.0: Partitions of integers congruent to 0 mod 2 into parts >= 2.
Table 2.1: Partitions of integers congruent to 1 mod 2 into parts >= 2.
Third generation:
Table 3.0: Partitions of integers congruent to 0 mod 3 into parts >= 3.
Table 3.1: Partitions of integers congruent to 1 mod 3 into parts >= 3.
Table 3.2: Partitions of integers congruent to 2 mod 3 into parts >= 3.
And so on.
Conjecture:
Let j and n be integers congruent to k mod m such that 0 <= k < m <= j < n. Let h=(n-j)/m. Consider only all partitions of n into parts >= m. Then remove every partition in which the parts of size m appears a number of times < h. Then remove h parts of size m in every partition. The rest are the partitions of j into parts >= m. (Note that in the section model, h is the number of sections or subsections removed), (Omar E. Pol, Dec 05 2010, Dec 06 2010).
Starting from the first row of triangle, it appears that the total numbers of parts of size k in k successive rows give the sequence A000041 (see A182703). - Omar E. Pol, Feb 22 2012
The last section of n contains A187219(n) regions (see A206437). - Omar E. Pol, Nov 04 2012
LINKS
EXAMPLE
Triangle begins:
[1];
[1],[2];
[1],[1],[3];
[1],[1],[1],[2,2],[4];
[1],[1],[1],[1],[1],[2,3],[5];
[1],[1],[1],[1],[1],[1],[1],[2,2,2],[2,4],[3,3],[6];
...
From Omar E. Pol, Sep 03 2013: (Start)
Illustration of initial terms (n = 1..6). The table shows the six sections of the set of partitions of 6 in three ways. Note that before the dissection, the set of partitions was in the ordering mentioned in A026791. More generally, the six sections of the set of partitions of 6 also can be interpreted as the first six sections of the set of partitions of any integer >= 6.
---------------------------------------------------------
n j Diagram Parts Parts
---------------------------------------------------------
. _
1 1 |_| 1; 1;
. _
2 1 | |_ 1, 1,
2 2 |_ _| 2; 2;
. _
3 1 | | 1, 1,
3 2 | |_ _ 1, 1,
3 3 |_ _ _| 3; 3;
. _
4 1 | | 1, 1,
4 2 | | 1, 1,
4 3 | |_ _ _ 1, 1,
4 4 | |_ _| 2,2, 2,2,
4 5 |_ _ _ _| 4; 4;
. _
5 1 | | 1, 1,
5 2 | | 1, 1,
5 3 | | 1, 1,
5 4 | | 1, 1,
5 5 | |_ _ _ _ 1, 1,
5 6 | |_ _ _| 2,3, 2,3,
5 7 |_ _ _ _ _| 5; 5;
. _
6 1 | | 1, 1,
6 2 | | 1, 1,
6 3 | | 1, 1,
6 4 | | 1, 1,
6 5 | | 1, 1,
6 6 | | 1, 1,
6 7 | |_ _ _ _ _ 1, 1,
6 8 | | |_ _| 2,2,2, 2,2,2,
6 9 | |_ _ _ _| 2,4, 2,4,
6 10 | |_ _ _| 3,3, 3,3,
6 11 |_ _ _ _ _ _| 6; 6;
...
(End)
MAPLE
with(combinat):
T:= proc(m) local b, ll;
b:= proc(n, i, l)
if n=0 then ll:=ll, l[]
else seq(b(n-j, j, [l[], j]), j=i..n)
fi
end;
ll:= NULL; b(m, 2, []); [1$numbpart(m-1)][], ll
end:
seq(T(n), n=1..10); # Alois P. Heinz, Feb 19 2012
MATHEMATICA
less[run1_, run2_] := (lg1 = run1 // Length; lg2 = run2 // Length; lg = Max[lg1, lg2]; r1 = If[lg1 == lg, run1, PadRight[run1, lg, 0]]; r2 = If[lg2 == lg, run2, PadRight[run2, lg, 0]]; Order[r1, r2] != -1); row[n_] := Join[ Array[1 &, {PartitionsP[n - 1]}], Sort[ Reverse /@ Select[ IntegerPartitions[n], FreeQ[#, 1] &], less] ] // Flatten; Table[row[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Jan 14 2013 *)
Table[Reverse@ConstantArray[{1}, PartitionsP[n - 1]]~Join~
DeleteCases[Sort@PadRight[Reverse/@Cases[IntegerPartitions[n], x_ /; Last[x] != 1]], x_ /; x == 0, 2], {n, 1, 9}] // Flatten (* Robert Price, May 12 2020 *)
CROSSREFS
Row n has length A138137(n).
Row sums give A138879.
Right border gives A000027.
KEYWORD
nonn,tabf
AUTHOR
Omar E. Pol, Nov 17 2007, Mar 21 2008
STATUS
approved
A057427 a(n) = 1 if n > 0, a(n) = 0 if n = 0; series expansion of x/(1-x). +30
239
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 (list; constant; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Parity of (n+1)-st prime, A000040(n+1). - Philippe Deléham, Apr 04 2009
Decimal expansion of 1/90.
Partial sums of A063524 (characteristic function of 1). - Jeremy Gardiner, Sep 08 2002
Characteristic function of positive integers. - Franklin T. Adams-Watters, Aug 01 2011
Number of binary bracelets of n beads, 0 of them 0. Number of binary bracelets of n beads, 1 of them 0. Number of binary bracelets of n beads, 0 of them 0, with 00 prohibited. For n>=2, a(n-1) is the number of binary bracelets of n beads, one of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Central terms of the triangle in A152487. - Reinhard Zumkeller, Dec 06 2008
This is sgn(n) (or sign(n), or signum(n)) restricted to nonnegative integers. See sequence A261012 for a version that extends the sequence backwards to offset -1.
REFERENCES
T. M. MacRobert, Functions of a Complex Variable, 4th ed., Macmillan and Co., London, 1958, p. 90.
LINKS
FORMULA
G.f.: x / (1 - x).
G.f.: Sum_{k>=0} 2^k * x^(2^k) / (1 + x^(2^k)). - Michael Somos, Sep 11 2005
a(A000027(n)) = 1; a(A000004(n)) = 0. - Reinhard Zumkeller, Oct 11 2008
a(n) = A000007(0^n). - Jaume Oliver Lafont, Mar 19 2009
From Michael Somos, Aug 17 2015: (Start)
a(n) = -a(-n) for all n in Z if a(n) is treated as sgn(n).
Sum_{k<0} a(k) * x^k = 1 / (1 - x) if abs(x) > 1. (End)
Dirichlet g.f.: zeta(s) - 1. - Álvar Ibeas, Nov 29 2015; corrected by Francois Oger, Oct 26 2019
a(n) = A001065(n+1) - A048050(n+1). - Omar E. Pol, Apr 30 2018
E.g.f.: e^x - 1. - Francois Oger, Oct 26 2019
a(n) = 1-A000007(n). - Chai Wah Wu, Nov 14 2022
EXAMPLE
1/90 = .0111111111111111111...
G.f. = x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + ...
MAPLE
A057427:= signum: seq(A057427(k), k=0..50); # Wesley Ivan Hurt, Oct 22 2013
MATHEMATICA
Table[Sign[n], {n, 0, 104}] (* Arkadiusz Wesolowski, Sep 16 2012 *)
CoefficientList[Series[x/((1 - x)), {x, 0, 25}], x]
LinearRecurrence[{1, 0}, {0, 1}, 105]
Array[Sign, 105, 0]
N[1/9, 111]
PadRight[{0}, 120, 1] (* Harvey P. Dale, Jan 07 2023 *)
PROG
(PARI) {a(n) = sign(n)};
(PARI) /* n>=0 */ a(n)=!!n \\ Jaume Oliver Lafont, Mar 19 2009
(Haskell)
a057427 = signum
a057427_list = 0 : [1, 1 ..] -- Reinhard Zumkeller, Nov 28 2012
(Python)
def A057427(n): return int(n!=0) # Chai Wah Wu, Nov 14 2022
CROSSREFS
See also A261012.
KEYWORD
nonn,easy,mult,nice,cons
AUTHOR
Henry Bottomley, Sep 05 2000
EXTENSIONS
Entry edited at the suggestion of Robert G. Wilson v by N. J. A. Sloane, Aug 16 2015
STATUS
approved
A138121 Triangle read by rows in which row n lists the partitions of n that do not contain 1 as a part in juxtaposed reverse-lexicographical order followed by A000041(n-1) 1's. +30
196
1, 2, 1, 3, 1, 1, 4, 2, 2, 1, 1, 1, 5, 3, 2, 1, 1, 1, 1, 1, 6, 3, 3, 4, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 7, 4, 3, 5, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 4, 4, 5, 3, 6, 2, 3, 3, 2, 4, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 5, 4, 6, 3, 3, 3, 3, 7, 2, 4, 3, 2, 5, 2, 2, 3, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Mirror of triangle A135010.
LINKS
EXAMPLE
Triangle begins:
[1];
[2],[1];
[3],[1],[1];
[4],[2,2],[1],[1],[1];
[5],[3,2],[1],[1],[1],[1],[1];
[6],[3,3],[4,2],[2,2,2],[1],[1],[1],[1],[1],[1],[1];
[7],[4,3],[5,2],[3,2,2],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1],[1];
...
The illustration of the three views of the section model of partitions (version "tree" with seven sections) shows the connection between several sequences.
---------------------------------------------------------
Partitions A194805 Table 1.0
. of 7 p(n) A194551 A135010
---------------------------------------------------------
7 15 7 7 . . . . . .
4+3 4 4 . . . 3 . .
5+2 5 5 . . . . 2 .
3+2+2 3 3 . . 2 . 2 .
6+1 11 6 1 6 . . . . . 1
3+3+1 3 1 3 . . 3 . . 1
4+2+1 4 1 4 . . . 2 . 1
2+2+2+1 2 1 2 . 2 . 2 . 1
5+1+1 7 1 5 5 . . . . 1 1
3+2+1+1 1 3 3 . . 2 . 1 1
4+1+1+1 5 4 1 4 . . . 1 1 1
2+2+1+1+1 2 1 2 . 2 . 1 1 1
3+1+1+1+1 3 1 3 3 . . 1 1 1 1
2+1+1+1+1+1 2 2 1 2 . 1 1 1 1 1
1+1+1+1+1+1+1 1 1 1 1 1 1 1 1 1
. 1 ---------------
. *<------- A000041 -------> 1 1 2 3 5 7 11
. A182712 -------> 1 0 2 1 4 3
. A182713 -------> 1 0 1 2 2
. A182714 -------> 1 0 1 1
. 1 0 1
---------------------------------------------------------
. A138137 --> 1 2 3 6 9 15..
---------------------------------------------------------
. A182746 <--- 4 . 2 1 0 1 2 . 4 ---> A182747
---------------------------------------------------------
.
. A182732 <--- 6 3 4 2 1 3 5 4 7 ---> A182733
. . . . . 1 . . . .
. . . . 2 1 . . . .
. . 3 . . 1 2 . . .
. Table 2.0 . . 2 2 1 . . 3 . Table 2.1
. . . . . 1 2 2 . .
. 1 . . . .
.
---------------------------------------------------------
.
From Omar E. Pol, Sep 03 2013: (Start)
Illustration of initial terms (n = 1..6). The table shows the six sections of the set of partitions of 6. Note that before the dissection the set of partitions was in the ordering mentioned in A026792. More generally, the six sections of the set of partitions of 6 also can be interpreted as the first six sections of the set of partitions of any integer >= 6.
Illustration of initial terms:
---------------------------------------
n j Diagram Parts
---------------------------------------
. _
1 1 |_| 1;
. _ _
2 1 |_ | 2,
2 2 |_| . 1;
. _ _ _
3 1 |_ _ | 3,
3 2 | | . 1,
3 3 |_| . . 1;
. _ _ _ _
4 1 |_ _ | 4,
4 2 |_ _|_ | 2, 2,
4 3 | | . 1,
4 4 | | . . 1,
4 5 |_| . . . 1;
. _ _ _ _ _
5 1 |_ _ _ | 5,
5 2 |_ _ _|_ | 3, 2,
5 3 | | . 1,
5 4 | | . . 1,
5 5 | | . . 1,
5 6 | | . . . 1,
5 7 |_| . . . . 1;
. _ _ _ _ _ _
6 1 |_ _ _ | 6,
6 2 |_ _ _|_ | 3, 3,
6 3 |_ _ | | 4, 2,
6 4 |_ _|_ _|_ | 2, 2, 2,
6 5 | | . 1,
6 6 | | . . 1,
6 7 | | . . 1,
6 8 | | . . . 1,
6 9 | | . . . 1,
6 10 | | . . . . 1,
6 11 |_| . . . . . 1;
...
(End)
MATHEMATICA
less[run1_, run2_] := (lg1 = run1 // Length; lg2 = run2 // Length; lg = Max[lg1, lg2]; r1 = If[lg1 == lg, run1, PadRight[run1, lg, 0]]; r2 = If[lg2 == lg, run2, PadRight[run2, lg, 0]]; Order[r1, r2] != -1); row[n_] := Join[Array[1 &, {PartitionsP[n - 1]}], Sort[Reverse /@ Select[IntegerPartitions[n], FreeQ[#, 1] &], less]] // Flatten // Reverse; Table[row[n], {n, 1, 9}] // Flatten (* Jean-François Alcover, Jan 15 2013 *)
Table[Reverse/@Reverse@DeleteCases[Sort@PadRight[Reverse/@Cases[IntegerPartitions[n], x_ /; Last[x]!=1]], x_ /; x==0, 2]~Join~ConstantArray[{1}, PartitionsP[n - 1]], {n, 1, 9}] // Flatten (* Robert Price, May 11 2020 *)
CROSSREFS
Row n has length A138137(n).
Rows sums give A138879.
KEYWORD
nonn,tabf,less
AUTHOR
Omar E. Pol, Mar 21 2008
STATUS
approved
A000030 Initial digit of n.
(Formerly M0470)
+30
189
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
When n - a(n)*10^[log_10 n] >= 10^[(log_10 n) - 1], where [] denotes floor, or when n < 100 and 10|n, n is the concatenation of a(n) and A217657(n). - Reinhard Zumkeller, Oct 10 2012, improved by M. F. Hasler, Nov 17 2018, and corrected by Glen Whitney, Jul 01 2022
Equivalent definition: The initial a(0) = 0 is followed by each digit in S = {1,...,9} once. Thereafter, repeat 10 times each digit in S. Then, repeat 100 times each digit in S, etc.
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
A. Cobham, Uniform Tag Sequences, Mathematical Systems Theory, 6 (1972), 164-192.
FORMULA
a(n) = [n / 10^([log_10(n)])] where [] denotes floor and log_10(n) is the logarithm is base 10. - Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Apr 07 2001
a(n) = k for k*10^j <= n < (k+1)*10^j for some j. - M. F. Hasler, Mar 23 2015
EXAMPLE
23 begins with a 2, so a(23) = 2.
MAPLE
Ldigit:=proc(n) local v; v:=convert(n, base, 10); v[-1]; end;
[seq(Ldigit(n), n=0..200)]; # N. J. A. Sloane, Feb 10 2017
MATHEMATICA
Join[{0}, First[IntegerDigits[#]]&/@Range[90]] (* Harvey P. Dale, Mar 01 2011 *)
Table[Floor[n/10^(Floor[Log10[n]])], {n, 1, 50}] (* G. C. Greubel, May 16 2017 *)
Table[NumberDigit[n, IntegerLength[n]-1], {n, 0, 100}] (* Harvey P. Dale, Aug 29 2021 *)
PROG
(PARI) a(n)=if(n<10, n, a(n\10)) \\ Mainly for illustration.
(PARI) A000030(n)=n\10^logint(n+!n, 10) \\ Twice as fast as a(n)=digits(n)[1]. Before digits() was added in PARI v.2.6.0 (2013), one could use, e.g., Vecsmall(Str(n))[1]-48. - M. F. Hasler, Nov 17 2018
(Haskell) a000030 = until (< 10) (`div` 10) -- Reinhard Zumkeller, Feb 20 2012, Feb 11 2011
(Magma) [Intseq(n)[#Intseq(n)]: n in [1..100]]; // Vincenzo Librandi, Nov 17 2018
(Python)
def a(n): return int(str(n)[0])
print([a(n) for n in range(85)]) # Michael S. Branicky, Jul 01 2022
CROSSREFS
Cf. A010879 (final digit of n).
KEYWORD
nonn,base,easy,nice,look
AUTHOR
STATUS
approved
A047999 Sierpiński's [Sierpinski's] triangle (or gasket): triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 2. +30
161
1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Restored the alternative spelling of Sierpinski to facilitate searching for this triangle using regular-expression matching commands in ASCII. - N. J. A. Sloane, Jan 18 2016
Also triangle giving successive states of cellular automaton generated by "Rule 60" and "Rule 102". - Hans Havermann, May 26 2002
Also triangle formed by reading triangle of Eulerian numbers (A008292) mod 2. - Philippe Deléham, Oct 02 2003
Self-inverse when regarded as an infinite lower triangular matrix over GF(2).
Start with [1], repeatedly apply the map 0 -> [00/00], 1 -> [10/11] [Allouche and Berthe]
Also triangle formed by reading triangles A011117, A028338, A039757, A059438, A085881, A086646, A086872, A087903, A104219 mod 2. - Philippe Deléham, Jun 18 2005
J. H. Conway writes (in Math Forum): at least the first 31 rows give odd-sided constructible polygons (sides 1, 3, 5, 15, 17, ... see A001317). The 1's form a Sierpiński sieve. - M. Dauchez (mdzzdm(AT)yahoo.fr), Sep 19 2005
When regarded as an infinite lower triangular matrix, its inverse is a (-1,0,1)-matrix with zeros undisturbed and the nonzero entries in every column form the Prouhet-Thue-Morse sequence (1,-1,-1,1,-1,1,1,-1,...) A010060 (up to relabeling). - David Callan, Oct 27 2006
Triangle read by rows: antidiagonals of an array formed by successive iterates of running sums mod 2, beginning with (1, 1, 1, ...). - Gary W. Adamson, Jul 10 2008
T(n,k) = A057427(A143333(n,k)). - Reinhard Zumkeller, Oct 24 2010
The triangle sums, see A180662 for their definitions, link Sierpiński’s triangle A047999 with seven sequences, see the crossrefs. The Kn1y(n) and Kn2y(n), y >= 1, triangle sums lead to the Sierpiński-Stern triangle A191372. - Johannes W. Meijer, Jun 05 2011
Used to compute the total Steifel-Whitney cohomology class of the Real Projective space. This was an essential component of the proof that there are no product operations without zero divisors on R^n for n not equal to 1, 2, 4 or 8 (real numbers, complex numbers, quaternions, Cayley numbers), proved by Bott and Milnor. - Marcus Jaiclin, Feb 07 2012
T(n,k) = A134636(n,k) mod 2. - Reinhard Zumkeller, Nov 23 2012
T(n,k) = 1 - A219463(n,k), 0 <= k <= n. - Reinhard Zumkeller, Nov 30 2012
From Vladimir Shevelev, Dec 31 2013: (Start)
Also table of coefficients of polynomials s_n(x) of degree n which are defined by formula s_n(x) = Sum_{i=0..n} (binomial(n,i) mod 2)*x^k. These polynomials we naturally call Sierpiński's polynomials. They also are defined by the recursion: s_0(x)=1, s_(2*n+1)(x) = (x+1)*s_n(x^2), n>=0, and s_(2*n)(x) = s_n(x^2), n>=1.
Note that: s_n(1) = A001316(n),
s_n(2) = A001317(n),
s_n(3) = A100307(n),
s_n(4) = A001317(2*n),
s_n(5) = A100308(n),
s_n(6) = A100309(n),
s_n(7) = A100310(n),
s_n(8) = A100311(n),
s_n(9) = A100307(2*n),
s_n(10) = A006943(n),
s_n(16) = A001317(4*n),
s_n(25) = A100308(2*n), etc.
The equality s_n(10) = A006943(n) means that sequence A047999 is obtained from A006943 by the separation by commas of the digits of its terms. (End)
Comment from N. J. A. Sloane, Jan 18 2016: (Start)
Take a diamond-shaped region with edge length n from the top of the triangle, and rotate it by 45 degrees to get a square S_n. Here is S_6:
[1, 1, 1, 1, 1, 1]
[1, 0, 1, 0, 1, 0]
[1, 1, 0, 0, 1, 1]
[1, 0, 0, 0, 1, 0]
[1, 1, 1, 1, 0, 0]
[1, 0, 1, 0, 0, 0].
Then (i) S_n contains no square (parallel to the axes) with all four corners equal to 1 (cf. A227133); (ii) S_n can be constructed by using the greedy algorithm with the constraint that there is no square with that property; and (iii) S_n contains A064194(n) 1's. Thus A064194(n) is a lower bound on A227133(n). (End)
See A123098 for a multiplicative encoding of the rows, i.e., product of the primes selected by nonzero terms; e.g., 1 0 1 => 2^1 * 3^0 * 5^1. - M. F. Hasler, Sep 18 2016
From Valentin Bakoev, Jul 11 2020: (Start)
The Sierpinski's triangle with 2^n rows is a part of a lower triangular matrix M_n of dimension 2^n X 2^n. M_n is a block matrix defined recursively: M_1= [1, 0], [1, 1], and for n>1, M_n = [M_(n-1), O_(n-1)], [M_(n-1), M_(n-1)], where M_(n-1) is a block matrix of the same type, but of dimension 2^(n-1) X 2^(n-1), and O_(n-1) is the zero matrix of dimension 2^(n-1) X 2^(n-1). Here is how M_1, M_2 and M_3 look like:
1 0 1 0 0 0 1 0 0 0 0 0 0 0
1 1 1 1 0 0 1 1 0 0 0 0 0 0 - It is seen the self-similarity of the
1 0 1 0 1 0 1 0 0 0 0 0 matrices M_1, M_2, ..., M_n, ...,
1 1 1 1 1 1 1 1 0 0 0 0 analogously to the Sierpinski's fractal.
1 0 0 0 1 0 0 0
1 1 0 0 1 1 0 0
1 0 1 0 1 0 1 0
1 1 1 1 1 1 1 1
M_n can also be defined as M_n = M_1 X M_(n-1) where X denotes the Kronecker product. M_n is an important matrix in coding theory, cryptography, Boolean algebra, monotone Boolean functions, etc. It is a transformation matrix used in computing the algebraic normal form of Boolean functions. Some properties and links concerning M_n can be seen in LINKS. (End)
Sierpinski's gasket has fractal (Hausdorff) dimension log(A000217(2))/log(2) = log(3)/log(2) = 1.58496... (and cf. A020857). This gasket is the first of a family of gaskets formed by taking the Pascal triangle (A007318) mod j, j >= 2 (see CROSSREFS). For prime j, the dimension of the gasket is log(A000217(j))/log(j) = log(j(j + 1)/2)/log(j) (see Reiter and Bondarenko references). - Richard L. Ollerton, Dec 14 2021
REFERENCES
B. A. Bondarenko, Generalized Pascal Triangles and Pyramids, Santa Clara, Calif.: The Fibonacci Association, 1993, pp. 130-132.
Brand, Neal; Das, Sajal; Jacob, Tom. The number of nonzero entries in recursively defined tables modulo primes. Proceedings of the Twenty-first Southeastern Conference on Combinatorics, Graph Theory, and Computing (Boca Raton, FL, 1990). Congr. Numer. 78 (1990), 47--59. MR1140469 (92h:05004).
John W. Milnor and James D. Stasheff, Characteristic Classes, Princeton University Press, 1974, pp. 43-49 (sequence appears on p. 46).
H.-O. Peitgen, H. Juergens and D. Saupe: Chaos and Fractals (Springer-Verlag 1992), p. 408.
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 0..10584 [First 144 rows, flattened; first 50 rows from T. D. Noe].
J.-P. Allouche and V. Berthe, Triangle de Pascal, complexité et automates, Bulletin of the Belgian Mathematical Society Simon Stevin 4.1 (1997): 1-24.
J.-P. Allouche, F. v. Haeseler, H.-O. Peitgen and G. Skordev, Linear cellular automata, finite automata and Pascal's triangle, Discrete Appl. Math. 66 (1996), 1-22.
David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata, Congressus Numerantium, Vol. 206 (2010), 157-191. [There is a typo in Theorem 6: (13) should read u(n) = 4.3^(wt(n-1)-1) for n >= 2.],
Valentin Bakoev, Fast Bitwise Implementation of the Algebraic Normal Form Transform, Serdica J. of Computing 11 (2017), No 1, 45-57.
Thomas Baruchel, Flattening Karatsuba's Recursion Tree into a Single Summation, SN Computer Science (2020) Vol. 1, Article No. 48.
E. Burlachenko, Fractal generalized Pascal matrices, arXiv:1612.00970 [math.NT], 2016. See p. 9.
David Callan, Sierpinski's triangle and the Prouhet-Thue-Morse word, arXiv:math/0610932 [math.CO], 2006.
C. Cobeli, A. Zaharescu, A game with divisors and absolute differences of exponents, arXiv:1411.1334 [math.NT], 2014; Journal of Difference Equations and Applications, Vol. 20, #11, 2014.
R. K. Guy, The strong law of small numbers. Amer. Math. Monthly 95 (1988), no. 8, 697-712.
Brady Haran, Chaos Game, Numberphile video, YouTube (April 27, 2017).
I. Kobayashi et al., Pascal's Triangle
Dr. Math, Regular polygon formulas [Broken link?]
Y. Moshe, The distribution of elements in automatic double sequences, Discr. Math., 297 (2005), 91-103.
National Curve Bank, Sierpinski Triangles
Hieu D. Nguyen, A Digital Binomial Theorem, arXiv:1412.3181 [math.NT], 2014.
S. Northshield, Sums across Pascal's triangle modulo 2, Congressus Numerantium, 200, pp. 35-52, 2010.
A. M. Reiter, Determining the dimension of fractals generated by Pascal's triangle, Fibonacci Quarterly, 31(2), 1993, pp. 112-120.
F. Richman, Javascript for computing Pascal's triangle modulo n. Go to this page, then under "Modern Algebra and Other Things", click "Pascal's triangle modulo n".
V. Shevelev, On Stephan's conjectures concerning Pascal triangle modulo 2 and their polynomial generalization, J. of Algebra Number Theory: Advances and Appl., 7 (2012), no.1, 11-29. Also arXiv:1011.6083, 2010.
N. J. A. Sloane, Illustration of rows 0 to 32 (encoignure style)
N. J. A. Sloane, Illustration of rows 0 to 64 (encoignure style)
N. J. A. Sloane, Illustration of rows 0 to 128 (encoignure style)
Eric Weisstein's World of Mathematics, Sierpiński Sieve, Rule 60, Rule 102
FORMULA
Lucas's Theorem is that T(n,k) = 1 if and only if the 1's in the binary expansion of k are a subset of the 1's in the binary expansion of n; or equivalently, k AND NOT n is zero, where AND and NOT are bitwise operators. - Chai Wah Wu, Feb 09 2016 and N. J. A. Sloane, Feb 10 2016
Sum_{k>=0} T(n, k) = A001316(n) = 2^A000120(n).
T(n,k) = T(n-1,k-1) XOR T(n-1,k), 0 < k < n; T(n,0) = T(n,n) = 1. - Reinhard Zumkeller, Dec 13 2009
T(n,k) = (T(n-1,k-1) + T(n-1,k)) mod 2 = |T(n-1,k-1) - T(n-1,k)|, 0 < k < n; T(n,0) = T(n,n) = 1. - Rick L. Shepherd, Feb 23 2018
From Vladimir Shevelev, Dec 31 2013: (Start)
For polynomial {s_n(x)} we have
s_0(x)=1; for n>=1, s_n(x) = Product_{i=1..A000120(n)} (x^(2^k_i) + 1),
if the binary expansion of n is n = Sum_{i=1..A000120(n)} 2^k_i;
G.f. Sum_{n>=0} s_n(x)*z^n = Product_{k>=0} (1 + (x^(2^k)+1)*z^(2^k)) (0<z<1/x).
Let x>1, t>0 be real numbers. Then
Sum_{n>=0} 1/s_n(x)^t = Product_{k>=0} (1 + 1/(x^(2^k)+1)^t);
Sum_{n>=0} (-1)^A000120(n)/s_n(x)^t = Product_{k>=0} (1 - 1/(x^(2^k)+1)^t).
In particular, for t=1, x>1, we have
Sum_{n>=0} (-1)^A000120(n)/s_n(x) = 1 - 1/x. (End)
From Valentin Bakoev, Jul 11 2020: (Start)
(See my comment about the matrix M_n.) Denote by T(i,j) the number in the i-th row and j-th column of M_n (0 <= i, j < 2^n). When i>=j, T(i,j) is the j-th number in the i-th row of the Sierpinski's triangle. For given i and j, we denote by k the largest integer of the type k=2^m and k<i. Then T(i,j) is defined recursively as:
T(i,0) = T(i,i) = 1, or
T(i,j) = 0 if i < j, or
T(i,j) = T(i-k,j), if j < k, or
T(i,j) = T(i-k,j-k), if j >= k.
Thus, for given i and j, T(i,j) can be computed in O(log_2(i)) steps. (End)
EXAMPLE
Triangle begins:
1,
1,1,
1,0,1,
1,1,1,1,
1,0,0,0,1,
1,1,0,0,1,1,
1,0,1,0,1,0,1,
1,1,1,1,1,1,1,1,
1,0,0,0,0,0,0,0,1,
1,1,0,0,0,0,0,0,1,1,
1,0,1,0,0,0,0,0,1,0,1,
1,1,1,1,0,0,0,0,1,1,1,1,
1,0,0,0,1,0,0,0,1,0,0,0,1,
...
MAPLE
# Maple code for first M rows (here M=10) - N. J. A. Sloane, Feb 03 2016
ST:=[1, 1, 1]; a:=1; b:=2; M:=10;
for n from 2 to M do ST:=[op(ST), 1];
for i from a to b-1 do ST:=[op(ST), (ST[i+1]+ST[i+2]) mod 2 ]; od:
ST:=[op(ST), 1];
a:=a+n; b:=a+n; od:
# alternative
A047999 := proc(n, k)
modp(binomial(n, k), 2) ;
end proc:
seq(seq(A047999(n, k), k=0..n), n=0..12) ; # R. J. Mathar, May 06 2016
MATHEMATICA
Mod[ Flatten[ NestList[ Prepend[ #, 0] + Append[ #, 0] &, {1}, 13]], 2] (* Robert G. Wilson v, May 26 2004 *)
rows = 14; ca = CellularAutomaton[60, {{1}, 0}, rows-1]; Flatten[ Table[ca[[k, 1 ;; k]], {k, 1, rows}]] (* Jean-François Alcover, May 24 2012 *)
Mod[#, 2]&/@Flatten[Table[Binomial[n, k], {n, 0, 20}, {k, 0, n}]] (* Harvey P. Dale, Jun 26 2019 *)
PROG
(PARI) \\ Recurrence for Pascal's triangle mod p, here p = 2.
p = 2; s=13; T=matrix(s, s); T[1, 1]=1;
for(n=2, s, T[n, 1]=1; for(k=2, n, T[n, k] = (T[n-1, k-1] + T[n-1, k])%p ));
for(n=1, s, for(k=1, n, print1(T[n, k], ", "))) \\ Gerald McGarvey, Oct 10 2009
(PARI) A011371(n)=my(s); while(n>>=1, s+=n); s
T(n, k)=A011371(n)==A011371(k)+A011371(n-k) \\ Charles R Greathouse IV, Aug 09 2013
(PARI) T(n, k)=bitand(n-k, k)==0 \\ Charles R Greathouse IV, Aug 11 2016
(Haskell)
import Data.Bits (xor)
a047999 :: Int -> Int -> Int
a047999 n k = a047999_tabl !! n !! k
a047999_row n = a047999_tabl !! n
a047999_tabl = iterate (\row -> zipWith xor ([0] ++ row) (row ++ [0])) [1]
-- Reinhard Zumkeller, Dec 11 2011, Oct 24 2010
(Python)
def A047999_T(n, k):
return int(not ~n & k) # Chai Wah Wu, Feb 09 2016
CROSSREFS
Sequences based on the triangles formed by reading Pascal's triangle mod m: (this sequence) (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).
Other versions: A090971, A038183.
From Johannes W. Meijer, Jun 05 2011: (Start)
A106344 is a skew version of this triangle.
Triangle sums (see the comments): A001316 (Row1; Related to Row2), A002487 (Related to Kn11, Kn12, Kn13, Kn21, Kn22, Kn23), A007306 (Kn3, Kn4), A060632 (Fi1, Fi2), A120562 (Ca1, Ca2), A112970 (Gi1, Gi2), A127830 (Ze3, Ze4). (End)
KEYWORD
nonn,tabl,easy,nice
AUTHOR
EXTENSIONS
Additional links from Lekraj Beedassy, Jan 22 2004
STATUS
approved
A071625 Number of distinct exponents when n is factorized as a product of primes. +30
146
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,12
COMMENTS
First term greater than 2 is a(360) = 3.
From Michel Marcus, Apr 24 2016: (Start)
A006939(n) gives the least m such that a(m) = n.
A062770 is the sequence of integers m such that a(m) = 1. (End)
We define the k-th omega of n to be Omega(red^{k-1}(n)) where Omega = A001222 and red^{k} is the k-th functional iteration of A181819. The first two omegas are A001222 and A001221, while this sequence is the third, and A323022 is the fourth. The zeroth omega is not uniquely determined from prime signature, but one possible choice is A056239 (sum of prime indices). - Gus Wiseman, Jan 02 2019
Sanna (2020) proved that for each k>=1, the sequence of numbers n with A071625(n) = k has an asymptotic density A_k = (6/Pi^2) * Sum_{n>=1, n squarefree} rho_k(n)/psi(n), where psi is the Dedekind psi function (A001615), and rho_k(n) is defined by rho_1(n) = 1 if n = 1 and 0 otherwise, rho_{k+1}(n) = 0 if n = 1 and (1/(n-1)) * Sum_{d|n, d<n} rho_k(d) otherwise. - Amiram Eldar, Oct 18 2020
LINKS
E. T. Bell, Functions of coprime divisors of integers, Bull. Amer. Math. Soc. 43 (1937), 818-822.
Carlo Sanna, On the number of distinct exponents in the prime factorization of an integer, Proceedings - Mathematical Sciences, Indian Academy of Sciences, Vol. 130, No. 1 (2020), Article 27, alternative link, arXiv preprint, arXiv:1902.09224 [math.NT], 2019.
EXAMPLE
n = 5040 = 2^4*(3*5)^2*7, three different exponents arise:4,2 and 1; so a(5040)=3.
MATHEMATICA
ffi[x_] := Flatten[FactorInteger[x]];
lf[x_] := Length[FactorInteger[x]];
ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}];
Table[Length[Union[ep[w]]], {w, 1, 256}]
(* Second program: *)
{0}~Join~Array[Length@ Union@ FactorInteger[#][[All, -1]] &, 104, 2] (* Michael De Vlieger, Apr 10 2019 *)
PROG
(PARI) a(n) = #Set(factor(n)[, 2]); \\ Michel Marcus, Mar 12 2015
(Python)
from sympy import factorint
def a(n): return len(set(factorint(n).values()))
print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Sep 01 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, May 29 2002
STATUS
approved
A052409 a(n) = largest integer power m for which a representation of the form n = k^m exists (for some k). +30
125
0, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, 1, 1, 1, 5, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Greatest common divisor of all prime-exponents in canonical factorization of n for n>1: a(n)>1 iff n is a perfect power; a(A001597(k))=A025479(k). - Reinhard Zumkeller, Oct 13 2002
a(1) set to 0 since there is no largest finite integer power m for which a representation of the form 1 = 1^m exists (infinite largest m). - Daniel Forgues, Mar 06 2009
A052410(n)^a(n) = n. - Reinhard Zumkeller, Apr 06 2014
Positions of 1's are A007916. Smallest base is given by A052410. - Gus Wiseman, Jun 09 2020
LINKS
Eric Weisstein's World of Mathematics, Power
Eric Weisstein's World of Mathematics, Perfect Power
FORMULA
a(1) = 0; for n > 1, a(n) = gcd(A067029(n), a(A028234(n))). - Antti Karttunen, Aug 07 2017
EXAMPLE
n = 72 = 2*2*2*3*3: GCD[exponents] = GCD[3,2] = 1. This is the least n for which a(n) <> A051904(n), the minimum of exponents.
For n = 10800 = 2^4 * 3^3 * 5^2, GCD[4,3,2] = 1, thus a(10800) = 1.
MAPLE
# See link.
#
a:= n-> igcd(map(i-> i[2], ifactors(n)[2])[]):
seq(a(n), n=1..120); # Alois P. Heinz, Oct 20 2019
MATHEMATICA
Table[GCD @@ Last /@ FactorInteger[n], {n, 100}] (* Ray Chandler, Jan 24 2006 *)
PROG
(Haskell)
a052409 1 = 0
a052409 n = foldr1 gcd $ a124010_row n
-- Reinhard Zumkeller, May 26 2012
(PARI) a(n)=my(k=ispower(n)); if(k, k, n>1) \\ Charles R Greathouse IV, Oct 30 2012
(Scheme) (define (A052409 n) (if (= 1 n) 0 (gcd (A067029 n) (A052409 (A028234 n))))) ;; Antti Karttunen, Aug 07 2017
(Python)
from math import gcd
from sympy import factorint
def A052409(n): return gcd(*factorint(n).values()) # Chai Wah Wu, Aug 31 2022
CROSSREFS
Apart from the initial term essentially the same as A253641.
Differs from A051904 for the first time at n=72, where a(72) = 1, while A051904(72) = 2.
Differs from A158378 for the first time at n=10800, where a(10800) = 1, while A158378(10800) = 2.
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Labos Elemer, Jun 17 2002
STATUS
approved
A079944 A run of 2^n 0's followed by a run of 2^n 1's, for n=0, 1, 2, ... +30
119
0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
With offset 2, this is the second bit in the binary expansion of n. - Franklin T. Adams-Watters, Feb 13 2009
a(n) = A173920(n+2,2); in the sequence of nonnegative integers (cf. A001477) substitute all n by 2^floor(n/2) occurrences of (n mod 2). - Reinhard Zumkeller, Mar 04 2010
REFERENCES
Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. See Example 1.34.
LINKS
FORMULA
a(n) = floor(log[2](4*(n+2)/3)) - floor(log[2](n+2)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003
For n >= 2, a(n-2)=1+floor(log[2](n/3))-floor(log[2](n/2)) - Benoit Cloitre, Mar 03 2003
G.f.: 1/x^2/(1-x) * (1/x + sum(k>=0, x^(3*2^k)-x^2^(k+1))). - Ralf Stephan, Jun 04 2003
a(n) = A000035(A004526(A030101(n+2))). - Reinhard Zumkeller, Mar 04 2010
MATHEMATICA
Table[IntegerDigits[n + 2, 2][[2]], {n, 0, 100}] (* Jean-François Alcover, Jul 26 2019 *)
PROG
(Haskell)
a079944 n = a079944_list !! n
a079944_list = f [0, 1] where f (x:xs) = x : f (xs ++ [x, x])
-- Reinhard Zumkeller, Oct 14 2010, Mar 28 2011
(PARI) a(n)=binary(n+2)[2] \\ Charles R Greathouse IV, Nov 07 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Feb 21 2003
STATUS
approved
page 1 2 3 4 5 6 7 8 9 10 ... 315

Search completed in 0.130 seconds

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 August 7 17:47 EDT 2024. Contains 375017 sequences. (Running on oeis4.)