Search: keyword:new
|
|
|
|
11, 23, 59, 41, 51, 62, 83, 13, 43, 74, 14, 55, 5, 55, 5, 56, 16, 77, 47, 18, 99, 89, 71, 81, 91, 1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 1, 11, 21, 31, 41, 51, 61, 71, 82, 2, 22, 42, 62, 82, 2, 22, 42, 62, 82, 2, 22, 42, 62, 82, 2, 22, 42, 62, 82, 2, 22, 42, 63, 93, 23, 53, 83, 13, 43, 73, 3, 33, 63, 93, 23, 53, 83, 13, 43, 73, 3, 33, 63, 94, 34, 74, 14, 54, 94, 34, 74, 14, 54, 94
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
PROG
|
(Python)
from itertools import islice
def agen(): # generator of terms
an, y = 1, 1
while y < 10:
prevan = an
an, y = an + 10*(an%10), 1
while y < 10:
if str(an+y)[0] == str(y):
an += y
break
y += 1
yield an - prevan
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,fini,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A367252
|
|
a(n) is the number of ways to tile an n X n square as explained in comments.
|
|
+0
0
|
|
|
1, 0, 1, 4, 88, 3939, 534560, 185986304, 175655853776, 437789918351688, 2898697572048432368, 50698981110982431863735, 2342038257118692026082013568, 285250169294740386915765591840768, 91531011920509198679773321121428857296, 77312253225939431362091700178995800855209496
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Draw a Dyck path from (0,0) to (n,n) so the path always stays above the diagonal. Now section the square into horizontal rows of height one to the left of the path and tile these rows using 1 X 2 and 1 X 1 tiles. Similarly, section the part to the right of the path into columns with width one and tile these using 2 X 1 and 1 X 1 tiles. Furthermore, no 1 X 1 tiles are allowed in the bottom row.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
b:= proc(x, y) option remember; (F->
`if`(x=0 and y=0, 1, `if`(x>0, b(x-1, y)*F(y-1), 0)+
`if`(y>x, b(x, y-1)*F(x+1), 0)))(combinat[fibonacci])
end:
a:= n-> b(n$2):
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 0, 6, 12, 20, 41, 42, 56, 72, 90, 110, 155, 156, 182, 270, 271, 272, 306, 379, 380, 420, 462, 551, 552, 600, 650, 702, 756, 812, 870, 930, 1055, 1056, 1122, 1190, 1260, 1405, 1406, 1482, 1560, 1640, 1805, 1806, 1892, 1980, 2254, 2255, 2256, 2352, 2450, 2550, 2652, 2861, 2862, 2970
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
PROG
|
(PARI) ispp(n) = {ispower(n) || n==1}; \\ A001597
f(n) = my(k=0); while(!ispp(n+k) && !ispp(n-k), k++); k; \\ A301573
a(n) = my(k=0); while (f(k) != n, k++); k; \\ Michel Marcus, Oct 29 2023
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,new
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
|
|
1, 1, 2, 1, 2, 2, 4, 1, 2, 2, 6, 2, 4, 4, 8, 1, 2, 2, 6, 2, 6, 6, 12, 2, 4, 4, 18, 4, 8, 8, 16, 1, 2, 2, 6, 2, 6, 6, 12, 2, 6, 6, 24, 6, 12, 12, 24, 2, 4, 4, 18, 4, 18, 18, 36, 4, 8, 8, 54, 8, 16, 16, 32, 1, 2, 2, 6, 2, 6, 6, 12, 2, 6, 6, 24, 6, 12, 12, 24, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(2n + 1) = a(n).
a(4n) = a(2n) with a(0) = 1.
a(4n + 2) = 2*b(n), b(2n + 1) = 2*b(n), b(2n) = 3*с(n - 1, 1) with b(0) = 1.
c(2n + 1, k) = c(n, k), c(4n + 2, k) = (k + 2)*c(2n, k), c(4n, k) = (k + 3)*c(n - 1, k + 1) with c(0, k) = 1.
Another way to compute a(4n + 2):
a(2*(4^n - 1)/3) = (n + 1)!.
a(2^(2m)*(2k + 1) + 2*(4^m - 1)/3) = (m + 1)*a(2^(2m)*k + 2*(4^m - 1)/3).
a(2^(2m + 1)*(2k + 1) + 2*(4^(m + 1) - 1)/3) = a(2^(2m + 1)*k + 2*(4^(m + 1) - 1)/3).
Note that a(4n + 2) is completely defined by these 3 last formulas. However, it looks like that it is not so easy to identify m and k for a given n, which makes these formulas useless for computing this sequence.
|
|
EXAMPLE
|
a(6) = 4 because the binary expansion of 6 is 110 and we have [(10), 1(10)] -> [1, 1]. Increasing these values by 1 gives us 2*2 = 4.
a(18) = 6 because the binary expansion of 18 is 10010 and we have [(10), (10)0(10)] -> [1, 2]. Increasing these values by 1 gives us 2*3 = 6.
a(26) = 18 because the binary expansion of 26 is 11010 and we have [(10), (10)(10), 1(10)(10)] -> [1, 2, 2]. Increasing these values by 1 gives us 2*3*3 = 18.
For n=482, the bits of n and the resulting product for a(n) are
n = 482 = binary 1 1 1 1 0 0 0 1 0
a(n) = 162 = 3*3*3*3 *2
n=3863 = binary 111100010111 is the same a(n) = 162 since its final trailing "111" has no effect.
|
|
PROG
|
(PARI) a(n) = my(A = 1, B = 1); if(n, for(i=1, logint(n, 2), if(bittest(n, i), A *= (B += !bittest(n, i-1))))); A
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A366195
|
|
Integers whose binary expansion has the property that there exists a length-k substring of bits in the expansion that is strictly lexicographically later than the first k bits.
|
|
+0
0
|
|
|
11, 19, 22, 23, 35, 37, 38, 39, 43, 44, 45, 46, 47, 55, 67, 69, 70, 71, 74, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 103, 110, 111, 131, 133, 134, 135, 137, 138, 139, 140, 141, 142, 143, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
These are numbers whose binary expansion corresponds to an invalid prefix of a Lyndon word on a two-letter alphabet. If the alphabet is {x, y}, where x < y, then taking the binary expansion of a(n) and mapping 1 to x and 0 to y results in a string that is not a prefix to any Lyndon word. Moreover, this sequence enumerates all strings starting with x that are not prefixes of Lyndon words on this alphabet.
A328870 is a subsequence of this sequence.
For k>=4, the number of k-bit terms in this sequence is 1,3,10,24,58,130,287,613,1302,2720,5655,11665,23969...
|
|
LINKS
|
|
|
EXAMPLE
|
The binary expansion of a(3) = 22 is 10110, which has a length-2 substring ("11") which is strictly lexicographically later than the first 2 bits ("10"). This also means that xyxxy is not a prefix of any Lyndon word over the alphabet {x,y}.
|
|
PROG
|
(Python)
def ok(n):
w = bin(n)[2:]
return any(any(w[:k] < w[i:i+k] for i in range(1, len(w)-k+1)) for k in range(2, len(w)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A364842
|
|
Table read by antidiagonals: row n gives the Euler transform of the sequence (2,...,2,0,0,...) that contains n 2s followed by 0s.
|
|
+0
0
|
|
|
1, 1, 2, 1, 2, 3, 1, 2, 5, 4, 1, 2, 5, 8, 5, 1, 2, 5, 10, 14, 6, 1, 2, 5, 10, 18, 20, 7, 1, 2, 5, 10, 20, 30, 30, 8, 1, 2, 5, 10, 20, 34, 49, 40, 9, 1, 2, 5, 10, 20, 36, 59, 74, 55, 10, 1, 2, 5, 10, 20, 36, 63, 94, 110, 70, 11, 1, 2, 5, 10, 20, 36, 65, 104, 149, 158, 91, 12
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
Table begins:
| 0 1 2 3 4 5 6 7 8 9 10
--+----------------------------------
1 | 1 2 3 4 5 6 7 8 9 10 11
2 | 1 2 5 8 14 20 30 40 55 70 91
3 | 1 2 5 10 18 30 49 74 110 158 221
4 | 1 2 5 10 20 34 59 94 149 224 334
5 | 1 2 5 10 20 36 63 104 169 264 405
6 | 1 2 5 10 20 36 65 108 179 284 445
7 | 1 2 5 10 20 36 65 110 183 294 465
8 | 1 2 5 10 20 36 65 110 185 298 475
9 | 1 2 5 10 20 36 65 110 185 300 479
|
|
MATHEMATICA
|
Seed[i_, n_] := ConstantArray[2, i]~Join~ConstantArray[0, n - i];
A364842Table[n_] := Table[Seed[i, n] // EulerTransform, {i, 1, n}]
(*EulerTransform is defined in A005195*)
|
|
CROSSREFS
|
Analogous for initial 1s sequence A008284.
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A367250
|
|
a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 9.
|
|
+0
0
|
|
|
0, 1, 35, 703, 11231, 158311, 2062655, 25466743, 302423471, 3487593511, 39314599775, 435241463383, 4748453693711, 51186327429511, 546278900354495, 5781325731101623, 60750456603203951, 634502309615150311, 6592506388026870815, 68188442304165981463, 702543059232886986191
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
a(n) is the number of n-digit numbers in A366966.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 9*10^(n-1) - 17*9^(n-1) + 8^n.
a(n) = 27*a(n-1) - 242*a(n-2) + 720*a(n-3) for n > 3.
O.g.f.: x^2*(1 + 8*x)/((1 - 8*x)*(1 - 9*x)*(1 - 10*x)).
E.g.f.: (81*exp(10*x) - 170*exp(9*x) + 90*exp(8*x) - 1)/90.
|
|
MATHEMATICA
|
LinearRecurrence[{27, -242, 720}, {0, 1, 35}, 21]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A367249
|
|
a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 8.
|
|
+0
0
|
|
|
0, 3, 79, 1323, 18175, 223323, 2555119, 27828363, 292407775, 2990349243, 29943991759, 294872615403, 2864776362175, 27525734996763, 262061152909999, 2475899571994443, 23240879960425375, 216963121865909883, 2015960236625789839, 18656492902684557483, 172056837889322101375
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is the number of n-digit numbers in A366965.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 17*9^(n-1) - 31*8^(n-1) + 2*7^n.
a(n) = 24*a(n-1) - 191*a(n-2) + 504*a(n-3) for n > 3.
O.g.f.: x^2*(3 + 7*x)/((1 - 7*x)*(1 - 8*x)*(1 - 9*x)).
E.g.f.: (136*exp(9*x) - 279*exp(8*x) + 144*exp(7*x) - 1)/72.
|
|
MATHEMATICA
|
LinearRecurrence[{24, -191, 504}, {0, 3, 79}, 21]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A367248
|
|
a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 7.
|
|
+0
0
|
|
|
0, 5, 111, 1601, 19095, 204545, 2045511, 19508081, 179752215, 1613908385, 14202967911, 123028446161, 1052237271735, 8907026785025, 74758478722311, 623053865857841, 5162154289325655, 42558224511290465, 349394287423788711, 2858263098464575121, 23311522539676521975
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is the number of n-digit numbers in A366964.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 23*8^(n-1) - 41*7^(n-1) + 3*6^n.
a(n) = 21*a(n-1) - 146*a(n-2) + 336*a(n-3) for n > 3.
O.g.f.: x^2*(5 + 6*x)/((1 - 6*x)*(1 - 7*x)*(1 - 8*x)).
E.g.f.: (161*exp(8*x) - 328*exp(7*x) + 168*exp(6*x) - 1)/56.
|
|
MATHEMATICA
|
LinearRecurrence[{21, -146, 336}, {0, 5, 111}, 21]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A367247
|
|
a(n) is the number of n-digit numbers whose difference between the largest and smallest digits is equal to 6.
|
|
+0
0
|
|
|
0, 7, 131, 1609, 16415, 150817, 1296191, 10641169, 84520175, 654958177, 4980233951, 37312922929, 276288797135, 2026564724737, 14750977566911, 106695818055889, 767748717541295, 5500729672814497, 39270143125479071, 279511731951144049, 1984459091985376655, 14059238393314971457
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n) is the number of n-digit numbers in A366963.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 27*7^(n-1) - 47*6^(n-1) + 4*5^n.
a(n) = 21*a(n-1) - 146*a(n-2) + 336*a(n-3) for n > 3.
O.g.f.: x^2*(7 + 5*x)/((1 - 5*x)*(1 - 6*x)*(1 - 7*x)).
E.g.f.: (162*exp(7*x) - 329*exp(6*x) + 168*exp(5*x) - 1)/42.
|
|
MATHEMATICA
|
LinearRecurrence[{18, -107, 210}, {0, 7, 131}, 22]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy,new
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.114 seconds
|