Dan Dima has authored 6 sequences.
A306556
Integers that appear as (unreduced) numerators of segment endpoints when a ternary Cantor set is created.
Original entry on oeis.org
0, 1, 2, 3, 6, 7, 8, 9, 18, 19, 20, 21, 24, 25, 26, 27, 54, 55, 56, 57, 60, 61, 62, 63, 72, 73, 74, 75, 78, 79, 80, 81, 162, 163, 164, 165, 168, 169, 170, 171, 180, 181, 182, 183, 186, 187, 188, 189, 216, 217, 218, 219, 222, 223, 224, 225, 234, 235, 236, 237, 240, 241, 242, 243
Offset: 1
On 1st step we have [0,1/3] U [2/3,3/3] so we get a(1)=0, a(2)=1, a(3)=2, a(4)=3.
On 2nd step we have [0,1/9] U [2/9,3/9] U [6/9,7/9] U [8/9,9/9] so we get in addition a(5)=6, a(6)=7, a(7)=8, a(8)=9.
- Georg Cantor, Über unendliche, lineare Punktmannigfaltigkeiten V" [On infinite, linear point-manifolds (sets), Part 5]. Mathematische Annalen (in German). (1883) 21: 545-591.
- Paul du Bois-Reymond, Der Beweis des Fundamentalsatzes der Integralrechnung, Mathematische Annalen (in German), (1880), 16, footnote on p. 128.
- Eric Weisstein's World of Mathematics, Cantor Set
- Wikipedia, Cantor set
- Index entries for 3-automatic sequences.
-
A306556(n) = {sm=0;while(n>1,ex=floor(log(n)/log(2));if(n-2^ex==0,sm=sm+3^(ex-1),sm=sm+2*3^(ex-1));n=n-2^ex);return(sm)}
-
a(n) = n--; fromdigits(binary(n>>1),3)*2 + (n%2); \\ Kevin Ryde, Apr 23 2021
A189722
Number of self-avoiding walks of length n on square lattice such that at each point the angle turns 90 degrees (the first turn is assumed to be to the left - otherwise the number must be doubled).
Original entry on oeis.org
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 141, 226, 362, 580, 921, 1468, 2344, 3740, 5922, 9413, 14978, 23829, 37686, 59770, 94882, 150606, 237947, 376784, 597063, 946086, 1493497, 2361970, 3737699, 5914635, 9330438, 14741315, 23301716, 36833270, 58071568
Offset: 2
For n=2 the a(2)=1 there is only one snake:
(0,0), (0,1), (-1,1).
For n=3 the a(3)=2 there are two snakes:
(0,0), (0,1), (-1,1), (-1,0);
(0,0), (0,1), (-1,1), (-1,2).
Representing the walk (or snake) as a sequence of turns I and -I in the complex plane, with the initial condition that the first turn is I, for length 2 we have [I], for length 3 we have [I,I], [I,-I], and for length 4 we have [I,I,-I], [I,-I,I], [I,-I,-I].
-
ValidSnake:=proc(P) local S, visited, lastdir, lastpoint, j;
S:={0, 1}; lastdir:=1; lastpoint:=1;
for j from 1 to nops(P) do lastdir:=lastdir*P[j];
lastpoint:=lastpoint+lastdir;
S:=S union {lastpoint};
od;
if (nops(S) = (2+nops(P))) then return(true); else return(false); fi;
end;
NextList:=proc(L) local S, snake, newsnake;
S:={ };
for snake in L do
newsnake:=[op(snake), I];
if ValidSnake(newsnake) then S:=S union {newsnake}; fi;
newsnake:=[op(snake), -I];
if ValidSnake(newsnake) then S:=S union {newsnake}; fi;
od;
return(S union { });
end;
L:={[I]}:
for k from 3 to 25 do
L:=NextList(L):
print(k, nops(L));
od:
# second Maple program:
a:= proc(n) local v, b;
v:= proc() true end: v(0, 0), v(0, 1):= false$2:
b:= proc(n, x, y, d) local c;
if v(x, y) then v(x, y):= false;
c:= `if`(n=0, 1,
`if`(d=1, b(n-1, x, y+1, 2) +b(n-1, x, y-1, 2),
b(n-1, x+1, y, 1) +b(n-1, x-1, y, 1) ));
v(x, y):= true; c
else 0 fi
end;
b(n-2, -1, 1, 1)
end:
seq(a(n), n=2..25); # Alois P. Heinz, Jun 10 2011
-
a[n_] := Module[{v, b}, v[, ] = True; v[0, 0] = v[0, 1] = False; b[m_, x_, y_, d_] := Module[{c}, If[v[x, y], v[x, y] = False; c = If[m == 0, 1, If[d == 1, b[m-1, x, y+1, 2] + b[m-1, x, y-1, 2], b[m-1, x+1, y, 1] + b[m-1, x-1, y, 1]]]; v[x, y] = True; c, 0]]; b[n-2, -1, 1, 1]]; Table[ a[n], {n, 2, 25}] (* Jean-François Alcover, Nov 07 2015, after Alois P. Heinz *)
A126074
Triangle read by rows: T(n,k) is the number of permutations of n elements that have the longest cycle length k.
Original entry on oeis.org
1, 1, 1, 1, 3, 2, 1, 9, 8, 6, 1, 25, 40, 30, 24, 1, 75, 200, 180, 144, 120, 1, 231, 980, 1260, 1008, 840, 720, 1, 763, 5152, 8820, 8064, 6720, 5760, 5040, 1, 2619, 28448, 61236, 72576, 60480, 51840, 45360, 40320, 1, 9495, 162080, 461160, 653184, 604800, 518400, 453600, 403200, 362880
Offset: 1
Triangle T(n,k) begins:
1;
1, 1;
1, 3, 2;
1, 9, 8, 6;
1, 25, 40, 30, 24;
1, 75, 200, 180, 144, 120;
1, 231, 980, 1260, 1008, 840, 720;
1, 763, 5152, 8820, 8064, 6720, 5760, 5040;
...
- Alois P. Heinz, Rows n = 1..141, flattened
- Steven Finch, Permute, Graph, Map, Derange, arXiv:2111.05720 [math.CO], 2021.
- S. W. Golomb and P. Gaal, On the number of permutations of n objects with greatest cycle length k, Adv. in Appl. Math., 20(1), 1998, 98-107.
- IBM Research, Ponder This, December 2006.
- Peter Luschny, Counting with Partitions. [From _Peter Luschny_, Mar 07 2009]
- Peter Luschny, Generalized Stirling_1 Triangles. [From _Peter Luschny_, Mar 07 2009]
- D. Panario and B. Richmond, Exact largest and smallest size of components, Algorithmica, 31 (2001), 413-432.
Cf.
A157386,
A157385,
A157384,
A157383,
A157400,
A157391,
A157392,
A157393,
A157394,
A157395. -
Peter Luschny, Mar 07 2009
-
A:= proc(n,k) option remember; `if`(n<0, 0, `if`(n=0, 1,
add(mul(n-i, i=1..j-1)*A(n-j,k), j=1..k)))
end:
T:= (n, k)-> A(n, k) -A(n, k-1):
seq(seq(T(n,k), k=1..n), n=1..10); # Alois P. Heinz, Feb 11 2013
-
Table[CoefficientList[ Series[(Exp[x^m/m] - 1) Exp[Sum[x^k/k, {k, 1, m - 1}]], {x, 0, 8}], x]*Table[n!, {n, 0, 8}], {m, 1, 8}] // Transpose // Grid (* Geoffrey Critzer, May 23 2009 *)
-
def A126074(n, k):
f = factorial(n)
P = Partitions(n, max_part=k, inner=[k])
return sum(f // p.aut() for p in P)
for n in (1..9): print([A126074(n,k) for k in (1..n)]) # Peter Luschny, Apr 17 2016
A121294
a(m^2) = m^3; a(m^2+k) = m^3 + km, 0 <= k <= m; a(m(m+1)) = (m+1)m^2; a(m(m+1)+k) = (m+1)m^2 + k(2m+1), 0 <= k <= m+1; a((m+1)^2) = (m+1)^3.
Original entry on oeis.org
1, 2, 5, 8, 10, 12, 17, 22, 27, 30, 33, 36, 43, 50, 57, 64, 68, 72, 76, 80, 89, 98, 107, 116, 125
Offset: 1
Edited by R. J. Mathar, Oct 01 2008
A121231
Number of n X n binary matrices M (that is, real matrices with entries 0 and 1) such that M^2 is also a binary matrix.
Original entry on oeis.org
1, 2, 11, 172, 6327, 474286, 67147431, 17080038508
Offset: 0
Edited by R. J. Mathar, Oct 01 2008
a(7) from
R. H. Hardin, Jun 19 2012. This makes it clear that the old
A122527 was really a badly-described version of this sequence, and that a(7) was earlier found by Balakrishnan (bvarada2(AT)jhu.edu), Sep 17 2006. -
N. J. A. Sloane, Jun 19 2012
A107348
Triangle read by rows: T(m,n) = number of different lines in a rectangular m X n array of points with integer coordinates (x,y): 0 <= x <= m, 0 <= y <= n.
Original entry on oeis.org
0, 1, 6, 1, 11, 20, 1, 18, 35, 62, 1, 27, 52, 93, 140, 1, 38, 75, 136, 207, 306, 1, 51, 100, 181, 274, 405, 536, 1, 66, 131, 238, 361, 534, 709, 938, 1, 83, 164, 299, 454, 673, 894, 1183, 1492, 1, 102, 203, 370, 563, 836, 1111, 1470, 1855, 2306
Offset: 0
Triangle begins
0,
1, 6,
1, 11, 20,
1, 18, 35, 62,
1, 27, 52, 93, 140,
1, 38, 75, 136, 207, 306,
1, 51, 100, 181, 274, 405, 536,
1, 66, 131, 238, 361, 534, 709, 938,
1, 83, 164, 299, 454, 673, 894, 1183, 1492,
1, 102, 203, 370, 563, 836, 1111, 1470, 1855, 2306,
...
- M. A. Alekseyev, M. Basova, and N. Yu. Zolotykh, On the minimal teaching sets of two-dimensional threshold functions, SIAM J. Disc. Math. 29(1), 2015, pp. 157-165.
- Les Reid, Problem #7: How Many Lines Does the Lattice of Points Generate?, Problems from the 04-05 academic year, Challenge Archive, Missouri State University's Problem Corner.
-
VR := proc(m,n,q) local a,i,j; a:=0;
for i from -m+1 to m-1 do for j from -n+1 to n-1 do
if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
LL:=(m,n)->(VR(m,n,1)-VR(m,n,2))/2;
for m from 1 to 12 do lprint([seq(LL(m,n),n=1..m)]); od: # N. J. A. Sloane, Feb 10 2020
-
VR[m_, n_, q_] := Sum[If[GCD[i, j] == q, (m - Abs[i])(n - Abs[j]), 0], {i, -m + 1, m - 1}, {j, -n + 1, n - 1}];
LL[m_, n_] := (1/2)(VR[m, n, 1] - VR[m, n, 2]);
Table[LL[m, n], {m, 1, 10}, {n, 1, m}] // Flatten (* Jean-François Alcover, Jun 04 2023, after N. J. A. Sloane *)
T(3,3) corrected and sequence extended by
R. J. Mathar, Dec 17 2017
Comments