A047999 Sierpiński's [Sierpinski's] triangle (or gasket): triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 2.
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
Offset: 0
Examples
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, ...
References
- Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
- 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.],
- J. Baer, Explore patterns in Pascal's Triangle
- Valentin Bakoev, Fast Bitwise Implementation of the Algebraic Normal Form Transform, Serdica J. of Computing 11 (2017), No 1, 45-57.
- Valentin Bakoev, Properties and links concerning M_n
- Thomas Baruchel, Flattening Karatsuba's Recursion Tree into a Single Summation, SN Computer Science (2020) Vol. 1, Article No. 48.
- Thomas Baruchel, A non-symmetric divide-and-conquer recursive formula for the convolution of polynomials and power series, arXiv:1912.00452 [math.NT], 2019.
- A. Bogomolny, Dot Patterns and Sierpinski Gasket
- Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids, English translation published by Fibonacci Association, Santa Clara Univ., Santa Clara, CA, 1993; see pp. 130-132.
- Paul Bradley and Peter Rowley, Orbits on k-subsets of 2-transitive Simple Lie-type Groups, 2014.
- E. Burlachenko, Fractal generalized Pascal matrices, arXiv:1612.00970 [math.NT], 2016. See p. 9.
- S. Butkevich, Pascal Triangle Applet
- David Callan, Sierpinski's triangle and the Prouhet-Thue-Morse word, arXiv:math/0610932 [math.CO], 2006.
- B. Cherowitzo, Pascal's Triangle using Clock Arithmetic, Part I
- B. Cherowitzo, Pascal's Triangle using Clock Arithmetic, Part II
- 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.
- Ilya Gutkovskiy, Illustrations (triangle formed by reading Pascal's triangle mod m)
- 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".
- Vladimir 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)
- N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS
- Eric Weisstein's World of Mathematics, Sierpiński Sieve, Rule 60, Rule 102
- Index entries for sequences related to cellular automata
- Index entries for triangles and arrays related to Pascal's triangle
- Index entries for sequences generated by sieves
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.
From Johannes W. Meijer, Jun 05 2011: (Start)
A106344 is a skew version of this triangle.
Programs
-
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
-
Magma
A047999:= func< n,k | BitwiseAnd(n-k, k) eq 0 select 1 else 0 >; [A047999(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Dec 03 2024
-
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: ST; # N. J. A. Sloane # 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 *) A047999[n_,k_]:= Boole[BitAnd[n-k,k]==0]; Table[A047999[n,k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Sep 03 2025 *)
-
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
-
Python
def A047999_T(n,k): return int(not ~n & k) # Chai Wah Wu, Feb 09 2016
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
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
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
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)
Extensions
Additional links from Lekraj Beedassy, Jan 22 2004
A007188 Multiplicative encoding of Pascal triangle: Product p(i+1)^C(n,i).
2, 6, 90, 47250, 66852843750, 2806877704512541816406250, 1216935896582703898519354781702537118597533386230468750
Offset: 0
Keywords
Comments
n-th power of x+1 using the encoding of polynomials defined in A206284 and A297845. - Peter Munn, Jul 20 2022
References
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
- N. J. A. Sloane, An on-line version of the Encyclopedia of Integer Sequences, Electronic J. Combinatorics, Vol. 1, no. 1, 1994.
- Index entries for triangles and arrays related to Pascal's triangle
Crossrefs
Programs
-
Mathematica
c[n_] := CoefficientList[(1 + x)^n, x]; f[n_] := Product[Prime[k]^c[n][[k]], {k, 1, Length[c[n]]}]; Table[f[n], {n, 1, 7}] (* Clark Kimberling, Feb 05 2012 *)
Formula
a(0) = 2; for n > 0, a(n) = A297845(a(n-1), 6). - Peter Munn, Jul 20 2022
A255483 Infinite square array read by antidiagonals downwards: T(0,m) = prime(m), m >= 1; for n >= 1, T(n,m) = T(n-1,m)*T(n-1,m+1)/gcd(T(n-1,m), T(n-1,m+1))^2, m >= 1.
2, 3, 6, 5, 15, 10, 7, 35, 21, 210, 11, 77, 55, 1155, 22, 13, 143, 91, 5005, 39, 858, 17, 221, 187, 17017, 85, 3315, 1870, 19, 323, 247, 46189, 133, 11305, 5187, 9699690, 23, 437, 391, 96577, 253, 33649, 21505, 111546435, 46
Offset: 0
Comments
The first column of the array is given by A123098; subsequent columns are obtained by applying the function A003961, i.e., replacing each prime factor by the next larger prime. - M. F. Hasler, Sep 17 2016
Interpretation with respect to A329329 from Peter Munn, Feb 08 2020: (Start)
With respect to the ring defined by A329329 and A059897, the first row gives powers of 3, the first column gives powers of 6, both in order of increasing exponent, and the body of the table gives their products. A329049 is the equivalent table in which the first column gives powers of 4.
A099884 is the equivalent table for the ring defined by A048720 and A003987. That ring is an image of the polynomial ring GF(2)[x] using a standard representation of the polynomials as integers. A329329 describes a comparable mapping to integers from the related polynomial ring GF(2)[x,y].
Using these mappings, the tables here and in A099884 are matching images: the first row represents powers of x, the first column represents powers of (x+1) and the body of the table gives their products.
Hugo van der Sanden's formula (see formula section) indicates that A019565 provides a mapping from A099884. In the wider terms described above, A019565 is an injective homomorphism between images of the 2 polynomial rings, and maps the image of each GF(2)[x] polynomial to the image of the equivalent GF(2)[x,y] polynomial.
(End)
Examples
The top left corner of the array, row index 0..5, column index 1..10: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 6, 15, 35, 77, 143, 221, 323, 437, 667, 899 10, 21, 55, 91, 187, 247, 391, 551, 713, 1073 210, 1155, 5005, 17017, 46189, 96577, 215441, 392863, 765049, 1363783 22, 39, 85, 133, 253, 377, 527, 703, 943, 1247 858, 3315, 11305, 33649, 95381, 198679, 370481, 662929, 1175921, 1816879
Links
- Alois P. Heinz, Antidiagonals n = 0..125, flattened
- C. Cobeli, A. Zaharescu, A game with divisors and absolute differences of exponents, Journal of Difference Equations and Applications, Vol. 20, #11, 2014.
- C. Cobeli, A. Zaharescu, A game with divisors and absolute differences of exponents, arXiv:1411.1334 [math.NT], 2014.
- Discussion of SeqFan-mailing list
- Index entries for sequences related to Gilbreath conjecture and transform
Crossrefs
A kind of generalization of A036262.
Programs
-
Maple
T:= proc(n, m) option remember; `if`(n=0, ithprime(m), T(n-1, m)*T(n-1, m+1)/igcd(T(n-1, m), T(n-1, m+1))^2) end: seq(seq(T(n, 1+d-n), n=0..d), d=0..10); # Alois P. Heinz, Feb 28 2015
-
Mathematica
T[n_, m_] := T[n, m] = If[n == 0, Prime[m], T[n-1, m]*T[n-1, m+1]/GCD[T[n-1, m], T[n-1, m+1]]^2]; Table[Table[T[n, 1+d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Mar 09 2015, after Alois P. Heinz *)
-
PARI
T=matrix(N=15,N);for(j=1,N,T[1,j]=prime(j));(f(x,y)=x*y/gcd(x,y)^2);for(k=1,N-1,for(j=1,N-k,T[k+1,j]=f(T[k,j],T[k,j+1])));A255483=concat(vector(N,i,vector(i,j,T[j,1+i-j]))) \\ M. F. Hasler, Sep 17 2016
-
PARI
A255483(n,k)=prod(j=0,n,if(bitand(n-j,j),1,prime(j+k))) \\ M. F. Hasler, Sep 18 2016
-
Scheme
(define (A255483 n) (A255483bi (A002262 n) (+ 1 (A025581 n)))) ;; Then use either an almost standalone version (requiring only A000040): (define (A255483bi row col) (if (zero? row) (A000040 col) (let ((a (A255483bi (- row 1) col)) (b (A255483bi (- row 1) (+ col 1)))) (/ (lcm a b) (gcd a b))))) ;; Or one based on M. F. Hasler's new recurrence: (define (A255483bi row col) (if (= 1 col) (A123098 row) (A003961 (A255483bi row (- col 1))))) ;; Antti Karttunen, Sep 18 2016
Formula
T(n,1) = A123098(n), T(n,m+1) = A003961(T(n,m)), for all n >= 0, m >= 1. - M. F. Hasler, Sep 17 2016
T(n,m) = Prod_{k=0..n} prime(k+m)^(!(n-k & k)) where !x is 1 if x=0 and 0 else, and & is binary AND. - M. F. Hasler, Sep 18 2016
From Antti Karttunen, Sep 18 2016: (Start)
For n >= 1, m >= 1, T(n,m) = lcm(T(n-1,m),T(n-1,m+1)) / gcd(T(n-1,m),T(n-1,m+1)).
(End)
From Peter Munn, Jan 08 2020: (Start)
T(n,k) = A329329(T(n,1), T(0,k)).
(End)
A277810 Square array A(r,c) = A019565(A277820(r,c)), read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
2, 6, 3, 10, 15, 30, 210, 21, 14, 5, 22, 1155, 462, 35, 70, 858, 39, 910, 55, 330, 105, 1870, 3315, 72930, 5005, 2002, 33, 42, 9699690, 5187, 2926, 85, 714, 2145, 770, 7, 46, 111546435, 238602, 11305, 248710, 3927, 390, 77, 154, 4002, 87, 93763670, 21505, 152490, 440895, 3094, 91, 546, 231, 7130, 13485, 620310, 1078282205, 2306486, 9867, 114114, 17017, 170170, 1365, 2310
Offset: 1
Comments
Permutation of squarefree numbers (A005117) after their initial term 1.
Examples
The top left corner of the array: 2, 6, 10, 210, 22, 858, 1870, 9699690 3, 15, 21, 1155, 39, 3315, 5187, 111546435 30, 14, 462, 910, 72930, 2926, 238602, 93763670 5, 35, 55, 5005, 85, 11305, 21505, 1078282205 70, 330, 2002, 714, 248710, 152490, 2306486, 60138078 105, 33, 2145, 3927, 440895, 9867, 1870935, 691587897 42, 770, 390, 3094, 114114, 520030, 162690, 581334754 7, 77, 91, 17017, 133, 33649, 50141, 6685349671 154, 546, 170170, 570, 6118, 254562, 357505330, 51269790 231, 1365, 7293, 3135, 1312311, 983535, 11599797, 589602585
Links
Crossrefs
Programs
A276804 Second column T[.,2] of array T = A255483: T[0,j] = prime(j), T[i+1,j] = T[i,j]*T[i,j+1]/gcd(T[i,j],T[i,j+1])^2, i >= 0, j >= 1.
3, 15, 21, 1155, 39, 3315, 5187, 111546435, 87, 13485, 22533, 1575169365, 48633, 6022953885, 12684118629, 961380175077106319535, 183, 61305, 90951, 24466273755, 187941, 88836891585, 157950690807, 133754519645521334494935, 536007, 573342567585
Offset: 0
Keywords
Comments
By construction all terms are divisible by 3, and the n-th term a(n-1) is divisible by prime(n+1). We have a(n)/3 = (1, 5, 7, 385, 13, 1105, 1729, 37182145, 29, 4495, ...). Neither the sequence of primes appearing here, (5, 7, 13, 29, 61, ...), nor its complement in the primes, ([2, 3,] 11, 17, 19, 23, 31, 37, 41, 43, 47, 53, 59, 67, ...), seem to be listed in the OEIS.
This is also the multiplicative encoding of Pascal's triangle in Z_2 (A047999), shifted by prefixing an initial 0 to the n-th row; e.g., n=2 => 1,0,1 => 0,1,0,1 => 2^0 * 3^1 * 5^0 * 7^1 = a(2).
Crossrefs
Programs
-
PARI
A276804(n)=prod(j=0, n, if(bitand(n-j, j), 1, prime(j+2)))
A334205 Under the isomorphism defined in A329329, of polynomials in GF(2)[x,y] to positive integers, a(n) is the image of the polynomial that results when x+1 is substituted for x in the polynomial with image n.
1, 2, 6, 4, 10, 3, 210, 8, 36, 5, 22, 24, 858, 105, 15, 16, 1870, 72, 9699690, 40, 35, 11, 46, 12, 100, 429, 216, 840, 4002, 30, 7130, 32, 33, 935, 21, 9, 160660290, 4849845, 143, 20, 20746, 70, 1008940218, 88, 360, 23, 2569288370, 96, 44100, 200, 2805, 3432, 32589158477190044730, 108, 55, 420, 1616615, 2001, 118, 60, 21594, 3565
Offset: 1
Keywords
Comments
Under the isomorphism (defined in A329329), A059897(.,.), A329329(.,.) and A003961(.) represent polynomial addition, multiplication and multiplication by x respectively; prime(i+1) represents the polynomial x^i.
The equivalent sequence with y+1 substituted for y is A268385.
Self-inverse permutation of natural numbers. Squarefree numbers are mapped to squarefree numbers, squares are mapped to squares, and in general the sequence permutes {m : A267116(m) = k} for any k.
From Peter Munn, May 31 2020: (Start)
The odd numbers represent the polynomials that have x as a factor. So the odd bisection's terms represent polynomials with (x+1) as a factor. They are a permutation of A268390.
A193231 is an equivalent sequence with respect to GF(2)[x]. See the formula showing A019565 as the related injective homomorphism, mapping the usual encoding of GF(2) polynomials in x to their equivalent A329329-defined representation.
(End)
Examples
Calculation for n = 5. 5 = prime(3) = prime(2+1) is the image of the polynomial x^2. Substituting x+1 for x, this becomes (x+1)^2 = x^2 + (1+1)x + 1 = x^2 + 1, as 1 + 1 = 0 in GF(2). The image of x^2 + 1 is A059897(prime(3), prime(1)) = A059897(5, 2) = 10. So a(5) = 10. (Note that A059897 gives the same result as multiplication when its operands are different terms of A050376, such as prime numbers.)
Links
- Antti Karttunen, Table of n, a(n) for n = 1..3670
- Wikipedia, Polynomial ring
- Index entries for sequences that are permutations of the natural numbers
Crossrefs
Programs
-
PARI
A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; }; A225546(n) = if(1==n,1,my(f=factor(n),u=#binary(vecmax(f[, 2])),prods=vector(u,x,1),m=1,e); for(i=1,u,for(k=1,#f~, if(bitand(f[k,2],m),prods[i] *= f[k,1])); m<<=1); prod(i=1,u,prime(i)^A048675(prods[i]))); A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) }; \\ From A193231 A268385(n) = if(1==n, n, my(f=factor(n)); prod(i=1,#f~,f[i,1]^A193231(f[i,2]))); A334205(n) = A225546(A268385(A225546(n)));
-
PARI
\\ This program is better for larger values. A048675 and A193231 as in above: A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565 A334205(n) = if(1==n, n, if(issquare(n), A334205(sqrtint(n))^2, A019565(A193231(A048675(core(n)))) * A334205(n/core(n)))); \\ Antti Karttunen, May 24 2020
Formula
A255484 a(n) = Product_{k=0..n} prime(k+1)*(binomial(n,k) mod 2).
2, 6, 0, 210, 0, 0, 0, 9699690, 0, 0, 0, 0, 0, 0, 0, 32589158477190044730, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 525896479052627740771371797072411912900610967452630, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Keywords
Comments
A123098 is a much better version of this sequence.
Links
- Chai Wah Wu, Table of n, a(n) for n = 0..510
Programs
-
Maple
f:=n->mul(ithprime(k+1)*(binomial(n,k) mod 2),k=0..n); [seq(f(n),n=0..60)];
-
Python
from operator import mul from functools import reduce from sympy import prime def A255484(n): return reduce(mul,(0 if ~n & k else prime(k+1) for k in range(n+1))) # Chai Wah Wu, Feb 09 2016
A277809 Transpose of square array A277810.
2, 3, 6, 30, 15, 10, 5, 14, 21, 210, 70, 35, 462, 1155, 22, 105, 330, 55, 910, 39, 858, 42, 33, 2002, 5005, 72930, 3315, 1870, 7, 770, 2145, 714, 85, 2926, 5187, 9699690, 154, 77, 390, 3927, 248710, 11305, 238602, 111546435, 46, 231, 546, 91, 3094, 440895, 152490, 21505, 93763670, 87, 4002, 2310, 1365, 170170, 17017, 114114, 9867, 2306486, 1078282205, 620310, 13485, 7130
Offset: 1
Comments
See A277810.
Examples
The top left corner of the array: 2, 3, 30, 5, 70, 105, 42, 7, 154 6, 15, 14, 35, 330, 33, 770, 77, 546 10, 21, 462, 55, 2002, 2145, 390, 91, 170170 210, 1155, 910, 5005, 714, 3927, 3094, 17017, 570 22, 39, 72930, 85, 248710, 440895, 114114, 133, 6118 858, 3315, 2926, 11305, 152490, 9867, 520030, 33649, 254562 1870, 5187, 238602, 21505, 2306486, 1870935, 162690, 50141, 357505330
Comments