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.

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

This page as a plain text file.
%I A362556 #36 Mar 02 2024 14:48:10
%S A362556 5,21,101,502,2502,12502,62503,312503,1562503,7812504,39062504,
%T A362556 195312504,976562505,4882812505,24414062505,122070312506,610351562506,
%U A362556 3051757812506,15258789062507,76293945312507,381469726562507
%N A362556 Number of distinct n-digit suffixes generated by iteratively multiplying an integer by 8, where the initial integer is 1.
%H A362556 Paolo Xausa, <a href="/A362556/b362556.txt">Table of n, a(n) for n = 1..1000</a>
%H A362556 Wikipedia, <a href="https://en.wikipedia.org/wiki/Multiplicative_order">Multiplicative order</a>
%H A362556 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (6,-5,1,-6,5).
%e A362556 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.
%t A362556 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 *)
%o A362556 (Python)
%o A362556 def a(n):
%o A362556      s, x, M = set(), 1, 10**n
%o A362556      while x not in s: s.add(x); x = (x<<3)%M
%o A362556      return len(s)
%o A362556 (PARI) a(n)=4*5^(n-1)+ceil(n/3) \\ _Charles R Greathouse IV_, Apr 28 2023
%Y A362556 Cf. A001018, A005054.
%Y A362556 Cf. A014391, A014392.
%Y A362556 Cf. A362468 (with 4 as the multiplier).
%K A362556 nonn,base,easy
%O A362556 1,1
%A A362556 _Gil Moses_, Apr 24 2023
%E A362556 a(13)-a(21) from _Charles R Greathouse IV_, Apr 28 2023