Search: seq:1,1,1,1,1,1,1,1,1,1
|
|
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.
An example of an infinite sequence of positive integers whose distinct pairwise concatenations are all primes! - Don Reble, Apr 17 2005
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
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)
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
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.
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
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
A fixed point of the run length transform. - Chai Wah Wu, Oct 21 2016
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
|
|
|
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
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
|
|
EXAMPLE
|
1 + 1/(1 + 1/(1 + 1/(1 + 1/(1 + ...)))) = A001622.
1/9 = 0.11111111111111...
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
(Maxima) makelist(1, n, 1, 30); /* Martin Ettl, Nov 07 2012 */
|
|
CROSSREFS
|
Cf. A000004, A007395, A010701, A000027, A027641, A014410, A211216, A212393, A060544, A051801, A104684.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
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
|
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
|
|
|
FORMULA
|
|
|
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
|
max(1, ilog10(n)+1) ;
|
|
MATHEMATICA
|
Join[{1}, Table[IntegerLength[n], {n, 104}]]
|
|
PROG
|
(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
(Python)
def a(n): return len(str(n))
(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)
|
|
CROSSREFS
|
Cf. A043537, A178788, A046034, A019546, A054899, A122840, A055640, A055641, A102669-A102685, A117804, A160093, A160094, A196563, A196564, A000120, A000788, A023416, A059015 (for base 2).
|
|
KEYWORD
|
base,easy,nonn,nice
|
|
AUTHOR
|
|
|
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
|
|
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];
...
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:
|
|
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
|
Cf. A000041, A026791, A138121, A141285, A182703, A187219, A193870, A194446, A206437, A207031, A207383, A207379, A211009.
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
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
|
Decimal expansion of 1/90.
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
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(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)
|
|
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
|
|
|
MATHEMATICA
|
CoefficientList[Series[x/((1 - x)), {x, 0, 25}], x]
LinearRecurrence[{1, 0}, {0, 1}, 105]
Array[Sign, 105, 0]
N[1/9, 111]
|
|
PROG
|
(PARI) {a(n) = sign(n)};
(Haskell)
a057427 = signum
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
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
|
|
|
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.
---------------------------------------------------------
---------------------------------------------------------
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
. 1 0 1
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
.
. . . . . 1 . . . .
. . . . 2 1 . . . .
. . 3 . . 1 2 . . .
. Table 2.0 . . 2 2 1 . . 3 . Table 2.1
. . . . . 1 2 2 . .
. 1 . . . .
.
---------------------------------------------------------
.
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
|
|
|
KEYWORD
|
nonn,tabf,less
|
|
AUTHOR
|
|
|
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
|
|
|
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;
|
|
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
(Python)
def a(n): return int(str(n)[0])
|
|
CROSSREFS
|
Cf. A002993, A089951, A002994, A143464, A098174, A098175, A072543, A072544, A073600, A073601, A037904. - Reinhard Zumkeller, Aug 17 2008
|
|
KEYWORD
|
|
|
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
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]
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
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
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.
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)
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
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
|
Brady Haran, Chaos Game, Numberphile video, YouTube (April 27, 2017).
|
|
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
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
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)
(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
|
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
modp(binomial(n, k), 2) ;
end proc:
|
|
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
(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]
(Python)
|
|
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).
Cf. A007318, A054431, A001317, A008292, A083093, A034931, A034930, A008975, A034932, A166360, A249133, A064194, A227133.
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
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
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.
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
|
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()))
|
|
CROSSREFS
|
Cf. A001221, A001222, A001615, A059404, A062770, A118914, A181819, A323014, A323022, A323023, A323024, A323025.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
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
|
|
LINKS
|
Eric Weisstein's World of Mathematics, Power
|
|
FORMULA
|
|
|
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])[]):
|
|
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
(Python)
from math import gcd
from sympy import factorint
|
|
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
|
|
|
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
|
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
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a079944 n = a079944_list !! n
a079944_list = f [0, 1] where f (x:xs) = x : f (xs ++ [x, x])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.130 seconds
|