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.

Showing 1-2 of 2 results.

A362555 Number of distinct n-digit suffixes generated by iteratively multiplying an integer by 6, where the initial integer is 1.

Original entry on oeis.org

2, 7, 28, 129, 630, 3131, 15632, 78133, 390634, 1953135, 9765636, 48828137, 244140638, 1220703139, 6103515640, 30517578141, 152587890642, 762939453143, 3814697265644, 19073486328145, 95367431640646, 476837158203147, 2384185791015648, 11920928955078149, 59604644775390650
Offset: 1

Views

Author

Gil Moses, Apr 24 2023

Keywords

Examples

			For n = 2, we begin with 1, iteratively multiply by 6 and count the terms before the last 2 digits begin to repeat. We obtain 1, 6, 36, 216, 1296, 7776, 46656, ... . The next term is 279936, which repeats the last 2 digits 36. Thus, the number of distinct terms is a(2) = 7.
		

Crossrefs

Cf. A362468 (with 4 as the multiplier).

Programs

Formula

a(n) = 5^(n-1) + n.
From Stefano Spezia, Apr 27 2023: (Start)
O.g.f.: (1 - 5*x + 4*x^2 - 4*x^3)/((1 - x)^2*(1 - 5*x)).
E.g.f.: (4 + exp(5*x) + 5*exp(x)*x)/4. (End)

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
Showing 1-2 of 2 results.