A362556
Number of distinct n-digit suffixes generated by iteratively multiplying an integer by 8, where the initial integer is 1.
Original entry on oeis.org
5, 21, 101, 502, 2502, 12502, 62503, 312503, 1562503, 7812504, 39062504, 195312504, 976562505, 4882812505, 24414062505, 122070312506, 610351562506, 3051757812506, 15258789062507, 76293945312507, 381469726562507
Offset: 1
For n = 1, we begin with 1, iteratively multiply by 8 and count the number of terms before the last 1 digit begins to repeat. We obtain 1, 8, 64, 512, 4096, ... . The next term is 32768, which repeats the last 1 digit 8. Thus, the number of distinct terms is a(1) = 5.
Cf.
A362468 (with 4 as the multiplier).
-
A362556[n_]:=5^(n-1)4+Ceiling[n/3];Array[A362556,30] (* after Charles R Greathouse IV *) (* or *) LinearRecurrence[{6,-5,1,-6,5},{5,21,101,502,2502},30] (* Paolo Xausa, Nov 18 2023 *)
-
a(n)=4*5^(n-1)+ceil(n/3) \\ Charles R Greathouse IV, Apr 28 2023
-
def a(n):
s, x, M = set(), 1, 10**n
while x not in s: s.add(x); x = (x<<3)%M
return len(s)
A367631
Triangle read by rows: T(n,k) is the number of permutations of length n avoiding simultaneously the patterns 123 and 132 with the maximum number of non-overlapping descents equal k.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 0, 4, 0, 0, 0, 5, 3, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 23, 9, 0, 0, 0, 0, 0, 16, 48, 0, 0, 0, 0, 0, 0, 4, 97, 27, 0, 0, 0, 0, 0, 0, 0, 94, 162, 0, 0, 0, 0, 0, 0, 0, 0, 44, 387, 81, 0, 0, 0, 0, 0, 0, 0, 0, 8, 476, 540, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 320, 1485, 243, 0, 0, 0, 0, 0, 0
Offset: 0
Triangle T(n,k) begins:
1;
1, 0;
1, 1, 0;
0, 4, 0, 0;
0, 5, 3, 0, 0;
0, 2, 14, 0, 0, 0;
0, 0, 23, 9, 0, 0, 0;
0, 0, 16, 48, 0, 0, 0, 0;
0, 0, 4, 97, 27, 0, 0, 0, 0;
0, 0, 0, 94, 162, 0, 0, 0, 0, 0;
0, 0, 0, 44, 387, 81, 0, 0, 0, 0, 0;
0, 0, 0, 8, 476, 540, 0, 0, 0, 0, 0, 0;
0, 0, 0, 0, 320, 1485, 243, 0, 0, 0, 0, 0, 0;
...
A378771
a(n) is the least k such that the last k digits of m = A020666(n)^n contain all 10 possible digits (0 through 9).
Original entry on oeis.org
10, 10, 10, 11, 13, 11, 13, 17, 15, 16, 15, 15, 16, 18, 17, 15, 17, 15, 13, 16, 17, 15, 24, 17, 23, 16, 19, 20, 20, 22, 22, 25, 32, 17, 20, 23, 20, 19, 19, 23, 19, 14, 21, 19, 17, 25, 22, 17, 27, 19, 24, 13, 20, 28, 18, 33, 26, 18, 33, 22, 23, 20, 25, 25, 25, 22
Offset: 1
a(4) = 11 since m = A020666(4)^4 = 763^4 = 338920744561. The last 11 digits contain all 10 possible digits (0 through 9) but the last 10 digits do not; 3 is missing in the last 10 digits.
-
a(n) = {
if(n == 1, return(10));
my(i, todo = 10, v = vector(10), d);
for(i = 2, oo,
d = digits(i^n);
if(#Set(d) == 10,
forstep(i = #d, 1, -1,
if(v[d[i]+1] == 0,
v[d[i]+1] = 1;
todo--;
if(todo == 0,
return(#d - i + 1))))));
}
A384853
Squared length of interior diagonal of n-th (U, V)-crossbox, where U = (1, 0, 1) and V = (0, 1, 0), as in Comments.
Original entry on oeis.org
1, 5, 9, 21, 57, 165, 489, 1461, 4377, 13125, 39369, 118101, 354297, 1062885, 3188649, 9565941, 28697817, 86093445, 258280329, 774840981, 2324522937, 6973568805, 20920706409, 62762119221, 188286357657, 564859072965, 1694577218889, 5083731656661
Offset: 1
Taking U = (1, 0, 1) and V = (0, 1, 0), successive edge vectors are given by
(f(n)) = ( (1, 0, 1), (-1,0,1), (-1,2,-1), (3,0,-3), (3,-6,3), ...)
(g(n)) = ( (0,1,0), (2,1,0), (2,-1,2), (-2,1,4), (-2,7,-2), (10,1,-8), ...)
(h(n)) = ( (-1.0,1), (-1,2,-1), (3,0,-3), (3,-6,3), (-9,0,9),...)
The successive volumes are (2, 6, 18, 54, 162, 486, 1458, 4374, 13122,...).
The lengths of diagonals of the first five crossboxes are 1, sqrt(5), 3, sqrt(21), sqrt(57), so the first five squared lengths are 1, 5, 9, 21, 57.
-
f[1] = {1, 0, 1}; g[1] = {0, 1, 0}; h[1] = Cross[f[1], g[1]];
f[n_] := f[n] = h[n - 1];
g[n_] := g[n] = f[n - 1] + g[n - 1] - h[n - 1];
h[n_] := h[n] = Cross[f[n], g[n]];
v[n_] := f[n] . Cross[g[n], h[n]] (* signed volume of nth parallelopiped P(n) *)
d[n_] := Norm[g[n]] (* length of interior diagonal of P(n) *)
Column[Table[{f[n], g[n], h[n]}, {n, 1, 16}]] (* edge vectors of P(n) *)
Table[v[n], {n, 1, 16}] (* A008776 *)
u = Table[d[n]^2, {n, 1, 30}] (* A384853 *)
Join[{1},Table[1+2*(3^(n-1)+1),{n,40}]] (* or *) LinearRecurrence[{4,-3},{1,5,9},50] (* Harvey P. Dale, Jul 20 2025 *)
A309263
Terms of A140110 that are not divisible by 6.
Original entry on oeis.org
1, 2, 4, 8, 16, 20, 32, 64, 100, 128, 256, 272, 500, 512, 1024, 2048, 2500, 4096, 4624, 8192, 10100, 12500, 16384, 32768, 62500, 65536, 65792, 78608, 131072, 262144, 312500, 524288, 1020100, 1048576, 1336336, 1562500, 2097152, 4194304, 7812500, 8388608
Offset: 1
20 is in this sequence because it is in A140110 and is not divisible by 6.
24, which is in A140110, is not in this sequence because it is divisible by 6.
-
isok(n) = {if(n%6 == 0, return(0)); my(d = divisors(n)); for (k=1, #d - 1, r = d[k+1]/d[k]; if(numerator(r) != denominator(r) + 1, return(0)); ); return(1); } \\ Jinyuan Wang, Aug 03 2019
Comments