|
|
A362468
|
|
Number of distinct n-digit suffixes generated by iteratively multiplying an integer by 4, where the initial integer is 1.
|
|
3
|
|
|
3, 11, 52, 252, 1253, 6253, 31254, 156254, 781255, 3906255, 19531256, 97656256, 488281257, 2441406257, 12207031258, 61035156258, 305175781259, 1525878906259, 7629394531260, 38146972656260, 190734863281261, 953674316406261, 4768371582031262, 23841857910156262
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This process produces a family of similar sequences when using different constant multipliers. See crossrefs below.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = t + k, where t = A004526(n+1) and k = A020699(n), since 4^t == 4^(t+k) (mod 10^n). Here, t is the "transient" portion and k = ord_5^n(4), the multiplicative order of 4 modulo 5^n, is the period of the orbit. - Michael S. Branicky, Apr 22 2023
|
|
EXAMPLE
|
For n = 2, we begin with 1, iteratively multiply by 4 and count the number of terms before the last 2 digits begin to repeat. We obtain 1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, ... . The next term is 4194304, which repeats the last 2 digits 04. Thus, the number of distinct terms is a(2) = 11.
|
|
PROG
|
(Python)
def a(n):
s, x, M = set(), 1, 10**n
while x not in s: s.add(x); x = (x<<2)%M
return len(s), x
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|