cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 21-25 of 25 results.

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

Views

Author

Gil Moses, Apr 24 2023

Keywords

Examples

			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.
		

Crossrefs

Cf. A362468 (with 4 as the multiplier).

Programs

  • Mathematica
    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 *)
  • PARI
    a(n)=4*5^(n-1)+ceil(n/3) \\ Charles R Greathouse IV, Apr 28 2023
  • Python
    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)
    

Extensions

a(13)-a(21) from Charles R Greathouse IV, Apr 28 2023

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

Views

Author

Tian Han, Nov 24 2023

Keywords

Comments

Number of permutations of length n avoiding simultaneously the patterns 123 and 132 with the maximum number of non-overlapping descents equal k. A descent in a permutation a(1)a(2)...a(n) is position i such that a(i) > a(i+1).

Examples

			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;
  ...
		

Crossrefs

Row sums give A011782.
Column sums give 3*A005054.
T(2n,n) gives A133494.
T(3n+2,n) gives A000079.
T(3n+1,n) gives A053220(n+1).

Formula

G.f.: (1 + x + x^2 - 2*x^2*z - x^3*z)/(1 - 3*x^2*z - 2*x^3*z).

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

Views

Author

David A. Corneth, Dec 06 2024

Keywords

Comments

A conjecture over at A020666 says that A020666(n) = 2 for n >= 189. Perhaps looking at last digits and some modular arithmetic leads to a proof.
A020666(189) = 2 and a(189) = 33 so the last 33 digits of 2^189 contain all 10 digits. Therefore for k = 189 + 4*5^(33-1) the last 33 digits of 2^k contain all 10 possible digits.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    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

Views

Author

Clark Kimberling, Jul 02 2025

Keywords

Comments

Suppose that U and V are 3-dimensional vectors over the field of real numbers. Define f(1) = U, f(2) = V, f(3) = UxV, where x = cross product, and for n>=2, define f(n) = h(n - 1), g(n) = f(n - 1) + g(n - 1) - h(n - 1), h(n) = f(n) x g(n).
The parallelopiped having edge vectors f(n), g(n), h(n) is the n-th (U,V)-crossbox, with volume |f(n).(g(n) x h(n))|, where . = dot product, and interior diagonal length ||g(n)||. These two sequences, after removal of their first 2 terms, are given for selected U and V by the following table, except for the 3 initial terms:
U V volume squared diagonal length, ||g(n)||^2
(1, 0, 0) (0, 1, 0) A000079 A052548
(1, 0, 0) (0, 1, 1) A008776 3*A052919
(1, 0, 0) (1, 0, 1) A000351 A178676
(1, 0, 0) (1, 1, 1) A167747 5*A204061
(1, 0, 0) (0, 2, 0) A005054 4*A199215
(1, 0, 0) (1, 2, 0) A013731 8*A199552
(1, 0, 0) (2, 1, 0) A011557 10*A000533
(1, 0, 0) (1, 1, 2) A067403 18*A135423
(1, 0, 0) (2, 1, 1) A334603 11*A199750
(1, 0, 1) (0, 1, 0) A008776 this sequence
(1, 1, 0) (0, 1, 1) A081341 6*A199318
(1, 1, 0) (1, 1, 1) A270369 9*A199559
(1, 2, 3) (3, 2, 1) 2*A009992 48 + 96*A009992

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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 *)

Formula

a(0) = 1, a(n) = 1 + 2 * (3^(n-1)+1) for n>=1.
a(n) = 4*a(n-1) - 3*a(n-2) for n>=4.
In general, suppose that U = (a,b,c) and V = (s,t,u), and let D = -(a^2 + b^2 + c^2 + s^2 + t^2 + u^2 + 2 (a s + b t + c u)). Then, linear recurrences are given for n>=3 by f(n) = D*f (n - 2), g(n) = g(n - 1) + D*g(n - 2) - D*g(n - 3), h(n) = D*h(n - 2). If w(n) denotes the volume of the n-th (U,V)-crossbox, then w(n) = D*w(n-1) for n>=2.

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

Views

Author

J. Lowell, Jul 19 2019

Keywords

Comments

Includes all powers of 2.
Conjecture: The sequence includes all numbers of the form 4*5^n.
The number 10100 is a counterexample for: (a) Prime factorizations of numbers of this sequence will always have only 2's and Fermat primes. (b) No number in this sequence is divisible by more than one distinct odd prime.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    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
Previous Showing 21-25 of 25 results.