A074650
Table T(n,k) read by downward antidiagonals: number of Lyndon words (aperiodic necklaces) with n beads of k colors, n >= 1, k >= 1.
Original entry on oeis.org
1, 2, 0, 3, 1, 0, 4, 3, 2, 0, 5, 6, 8, 3, 0, 6, 10, 20, 18, 6, 0, 7, 15, 40, 60, 48, 9, 0, 8, 21, 70, 150, 204, 116, 18, 0, 9, 28, 112, 315, 624, 670, 312, 30, 0, 10, 36, 168, 588, 1554, 2580, 2340, 810, 56, 0, 11, 45, 240, 1008, 3360, 7735, 11160, 8160, 2184, 99, 0
Offset: 1
T(4, 3) counts the 18 ternary prime strings of length 4 which are: 0001, 0002, 0011, 0012, 0021, 0022, 0102, 0111, 0112, 0121, 0122, 0211, 0212, 0221, 0222, 1112, 1122, 1222.
Square array starts:
1, 2, 3, 4, 5, 6, 7, ...
0, 1, 3, 6, 10, 15, 21, ...
0, 2, 8, 20, 40, 70, 112, ...
0, 3, 18, 60, 150, 315, 588, ...
0, 6, 48, 204, 624, 1554, 3360, ...
0, 9, 116, 670, 2580, 7735, 19544, ...
0, 18, 312, 2340, 11160, 39990, 117648, ...
...
The transposed array starts:
1 0 0 0 0 0 0 0 0 0,
2 1 2 3 6 9 18 30 56 99,
3 3 8 18 48 116 312 810 2184 5880,
4 6 20 60 204 670 2340 8160 29120 104754,
5 10 40 150 624 2580 11160 48750 217000 976248,
6 15 70 315 1554 7735 39990 209790 1119720 6045837,
7 21 112 588 3360 19544 117648 720300 4483696 28245840,
8 28 168 1008 6552 43596 299592 2096640 14913024 107370900,
9 36 240 1620 11808 88440 683280 5380020 43046640 348672528,
10 45 330 2475 19998 166485 1428570 12498750 111111000 999989991,
11 55 440 3630 32208 295020 2783880 26793030 261994040 2593726344,
12 66 572 5148 49764 497354 5118828 53745120 573308736 6191711526,
...
The initial antidiagonals are:
1
2 0
3 1 0
4 3 2 0
5 6 8 3 0
6 10 20 18 6 0
7 15 40 60 48 9 0
8 21 70 150 204 116 18 0
9 28 112 315 624 670 312 30 0
10 36 168 588 1554 2580 2340 810 56 0
11 45 240 1008 3360 7735 11160 8160 2184 99 0
12 55 330 1620 6552 19544 39990 48750 29120 5880 186 0
- F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, p. 97 (2.3.74)
- Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, p. 495.
- D. E. Knuth, Generating All Tuples and Permutations. The Art of Computer Programming, Vol. 4, Fascicle 2, pp. 26-27, Addison-Wesley, 2005.
- Alois P. Heinz, Antidiagonals n = 1..141, flattened
- B. Hayes, The invention of the genetic code, American Scientist, Vol. 86, No. 1 (January-February 1998), pp. 8-14.
- Veronika Irvine, Lace Tessellations: A mathematical model for bobbin lace and an exhaustive combinatorial search for patterns, PhD Dissertation, University of Victoria, 2016.
- Irem Kucukoglu and Yilmaz Simsek, On k-ary Lyndon words and their generating functions, AIP Conference Proceedings 1863, 300004 (2017).
- R. C. Lyndon, On Burnside's problem, Transactions of the American Mathematical Society 77, (1954) 202-215.
- Dominique Perrin and Christophe Reutenauer, Hall sets, Lazard sets and comma-free codes, arXiv preprint arXiv:1609.05438 [math.CO] (2016).
- Dominique Perrin and Christophe Reutenauer, Hall sets, Lazard sets and comma-free codes, Discrete Math., 341 (2018), 232-243.
- Dominique Perrin and Christophe Reutenauer, Hall sets, Lazard sets and comma-free codes, Discrete Math., 341 (2018), 232-243. [Annotated scanned copy of page 236 only.]
- Wikipedia, Lyndon word
- Index entries for sequences related to Lyndon words
Columns k:
A001037 (k=2),
A027376 (k=3),
A027377 (k=4),
A001692 (k=5),
A032164 (k=6),
A001693 (k=7),
A027380 (k=8),
A027381 (k=9),
A032165 (k=10),
A032166 (k=11),
A032167 (k=12),
A060216 (k=13),
A060217 (k=14),
A060218 (k=15),
A060219 (k=16),
A060220 (k=17),
A060221 (k=18),
A060222 (k=19).
-
t:= func< n,k | (&+[MoebiusMu(Floor(n/d))*k^d: d in Divisors(n)])/n >; // array
A074650:= func< n,k | t(k, n-k+1) >; // downward diagonals
[A074650(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Aug 01 2024
-
with(numtheory):
T:= proc(n, k) add(mobius(n/d)*k^d, d=divisors(n))/n end:
seq(seq(T(i, 1+d-i), i=1..d), d=1..11); # Alois P. Heinz, Mar 28 2008
-
max = 12; t[n_, k_] := Total[ MoebiusMu[n/#]*k^# & /@ Divisors[n]]/n; Flatten[ Table[ t[n-k+1, k], {n, 1, max}, {k, n, 1, -1}]] (* Jean-François Alcover, Oct 18 2011, after Maple *)
-
T(n,k)=sumdiv(n,d,moebius(n/d)*k^d)/n \\ Charles R Greathouse IV, Oct 18 2011
-
# This algorithm generates and counts all k-ary n-tuples (a_1,..,a_n) such
# that the string a_1...a_n is prime. It is algorithm F in Knuth 7.2.1.1.
def A074650(n, k):
a = [0]*(n+1); a[0]=-1
j = 1; count = 0
while(j != 0) :
if j == n : count += 1; # print("".join(map(str,a[1:])))
else: j = n
while a[j] >= k-1 : j -= 1
a[j] += 1
for i in (j+1..n): a[i] = a[i-j]
return count # Peter Luschny, Aug 14 2012
A208535
Square array read by descending antidiagonals: T(n,k) is the number of n-bead necklaces of k colors not allowing reversal, with no adjacent beads having the same color (n, k >= 1).
Original entry on oeis.org
1, 2, 0, 3, 1, 0, 4, 3, 0, 0, 5, 6, 2, 1, 0, 6, 10, 8, 6, 0, 0, 7, 15, 20, 24, 6, 1, 0, 8, 21, 40, 70, 48, 14, 0, 0, 9, 28, 70, 165, 204, 130, 18, 1, 0, 10, 36, 112, 336, 624, 700, 312, 36, 0, 0, 11, 45, 168, 616, 1554, 2635, 2340, 834, 58, 1, 0, 12, 55, 240, 1044, 3360, 7826, 11160
Offset: 1
Table T(n,k) (with rows n >= 1 and columns k >= 1) starts:
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
0 1 3 6 10 15 21 28 36 45 55 66 78 ...
0 0 2 8 20 40 70 112 168 240 330 440 572 ...
0 1 6 24 70 165 336 616 1044 1665 2530 3696 5226 ...
0 0 6 48 204 624 1554 3360 6552 11808 19998 32208 49764 ...
0 1 14 130 700 2635 7826 19684 43800 88725 166870 295526 498004 ...
0 0 18 312 2340 11160 39990 117648 299592 683280 1428570 2783880 5118828 ...
0 1 36 834 8230 48915 210126 720916 2097684 5381685 12501280 26796726 53750346 ...
...
All solutions for n = 4 and k = 3:
1 2 1 1 1 1
3 3 2 2 3 2
2 2 3 1 1 1
3 3 2 2 3 3
-
T[n_, k_] := If[n == 1, k, Sum[ EulerPhi[n/d]*(k-1)^d, {d, Divisors[n]}]/n - If[OddQ[n], k-1, 0]]; Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Oct 31 2017, after Andrew Howroyd *)
-
T(n,k) = if(n==1, k, sumdiv(n,d,eulerphi(n/d)*(k-1)^d)/n - if(n%2, k-1));
for(n=1, 10, for(k=1, 10, print1(T(n,k), ", ")); print) \\ Andrew Howroyd, Oct 14 2017
A208537
Number of 7-bead necklaces of n colors not allowing reversal, with no adjacent beads having the same color.
Original entry on oeis.org
0, 0, 18, 312, 2340, 11160, 39990, 117648, 299592, 683280, 1428570, 2783880, 5118828, 8964072, 15059070, 24408480, 38347920, 58619808, 87460002, 127695960, 182857140, 257298360, 356336838, 486403632, 655210200, 871930800, 1147401450
Offset: 1
All solutions for n=3:
..1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1...1
..2...2...2...3...2...2...2...2...2...3...3...3...2...2...2...2...2...2
..1...1...1...1...1...1...3...3...3...2...2...1...3...1...3...1...3...1
..2...3...2...3...3...3...2...1...2...3...1...3...2...2...1...3...1...2
..3...2...1...2...1...2...1...3...3...2...3...1...3...3...3...1...2...1
..1...3...3...3...2...1...3...1...2...3...2...3...1...2...2...3...3...2
..3...2...2...2...3...3...2...3...3...2...3...2...3...3...3...2...2...3
- J. Jeffries, Differentiating by prime numbers, Notices Amer. Math. Soc., 70:11 (2023), 1772-1779.
- R. H. Hardin, Table of n, a(n) for n = 1..210
- Wikipedia, p-derivation.
- Index entries for linear recurrences with constant coefficients, signature (8,-28,56,-70,56,-28,8,-1).
A138426
a(n) = ((prime(n))^5-prime(n))/5.
Original entry on oeis.org
6, 48, 624, 3360, 32208, 74256, 283968, 495216, 1287264, 4102224, 5725824, 13868784, 23171232, 29401680, 45868992, 83639088, 142984848, 168919248, 270025008, 360845856, 414614304, 615411264, 787808112, 1116811872
Offset: 1
-
[(NthPrime((n))^5 - NthPrime((n)))/5: n in [1..30] ]; // Vincenzo Librandi, Jun 18 2011
-
seq((ithprime(i)^5-ithprime(i))/5, i = 1 .. 50); # Robert Israel, Jan 07 2015
-
a = {}; Do[p = Prime[n]; AppendTo[a, (p^5 - p)/5], {n, 1, 50}]; a
(#^5-#)/5&/@Prime[Range[30]] (* Harvey P. Dale, Mar 12 2018 *)
-
forprime(p=2,1e3,print1((p^5-p)/5", ")) \\ Charles R Greathouse IV, Jul 15 2011
A366488
a(n) = (n^11 - n)/11.
Original entry on oeis.org
0, 0, 186, 16104, 381300, 4438920, 32981550, 179756976, 780903144, 2852823600, 9090909090, 25937424600, 67546215516, 162923672184, 368142288150, 786341441760, 1599289640400, 3115626937056, 5842582734474, 10590023536200, 18618181818180, 31843409140200, 53119845582846, 86619068901264, 138334649379000, 216744162819600
Offset: 0
- Stefano Spezia, Table of n, a(n) for n = 0..10000
- Jack Jeffries, Differentiating by prime numbers, Notices Amer. Math. Soc., 70:11 (2023), 1772-1779.
- Index entries for linear recurrences with constant coefficients, signature (12,-66,220,-495,792,-924,792,-495,220,-66,12,-1).
-
A366488[n_]:=(n^11-n)/11;Array[A366488,30,0] (* Paolo Xausa, Nov 14 2023 *)
LinearRecurrence[{12,-66,220,-495,792,-924,792,-495,220,-66,12,-1},{0,0,186,16104,381300,4438920,32981550,179756976,780903144,2852823600,9090909090,25937424600},30] (* Harvey P. Dale, Aug 03 2025 *)
A366489
a(n) = (n^13 - n)/13.
Original entry on oeis.org
0, 0, 630, 122640, 5162220, 93900240, 1004668770, 7453000800, 42288908760, 195528140640, 769230769230, 2655593241840, 8230246567620, 23298085122480, 61054982558010, 149707312950720, 346430740566960, 761890617915840, 1601766528128550, 3234844881712080
Offset: 0
- Stefano Spezia, Table of n, a(n) for n = 0..10000
- Jack Jeffries, Differentiating by prime numbers, Notices Amer. Math. Soc., 70:11 (2023), 1772-1779.
- Index entries for linear recurrences with constant coefficients, signature (14,-91,364,-1001,2002,-3003,3432,-3003,2002,-1001,364,-91,14,-1).
A366490
a(n) = (n^17 - n)/17.
Original entry on oeis.org
0, 0, 7710, 7596480, 1010580540, 44878791360, 995685849690, 13684147881600, 132458812569720, 981010688215680, 5882352941176470, 29732178147017280, 130506535690613940, 508847995257725760, 1793608631137129170, 5795654431511374080, 17361641481138401520
Offset: 0
- Stefano Spezia, Table of n, a(n) for n = 0..10000
- Jack Jeffries, Differentiating by prime numbers, Notices Amer. Math. Soc., 70:11 (2023), 1772-1779.
- Index entries for linear recurrences with constant coefficients, signature (18,-153,816,-3060,8568,-18564,31824,-43758,48620,-43758,31824,-18564,8568, -3060,816,-153,18,-1).
A366491
a(n) = (n^19 - n)/19.
Original entry on oeis.org
0, 0, 27594, 61171656, 14467258260, 1003867701480, 32071565263710, 599941851861744, 7585009898729256, 71097458824894320, 526315789473684210, 3218899497284976120, 16814736808980154044, 76943173177655058456, 314542313628890231430, 1166756747396368729440, 3976729669784964390480, 12582759772902701307744, 37275544492386193492506, 104127350297911241532840, 275941052631578947368420
Offset: 0
- Stefano Spezia, Table of n, a(n) for n = 0..10000
- Jack Jeffries, Differentiating by prime numbers, Notices Amer. Math. Soc., 70:11 (2023), 1772-1779.
- Index entries for linear recurrences with constant coefficients, signature (20, -190, 1140, -4845, 15504, -38760, 77520, -125970, 167960, -184756, 167960, -125970, 77520, -38760, 15504, -4845, 1140, -190, 20, -1).
A246445
Numbers of the form (x^y - x)/y for positive x,y.
Original entry on oeis.org
0, 1, 2, 3, 6, 8, 10, 15, 18, 20, 21, 28, 36, 40, 45, 48, 55, 63, 66, 70, 78, 91, 105, 112, 120, 121, 136, 153, 155, 168, 171, 186, 190, 204, 210, 231, 240, 253, 276, 300, 312, 325, 330, 351, 378, 406, 435, 440, 465, 496, 528, 561, 572, 595, 624, 630, 666, 682, 703
Offset: 1
8 is in this sequence because (3^3 - 3)/3 = 8.
Showing 1-9 of 9 results.
Comments