|
|
A123872
|
|
Start with the seed a(0)=2. The minimum number, different from 1, that multiplied by 2 (seed) produces a number with 2 as its rightmost digit is a(1)=6. Then 6*2=12. Again, the minimum number that multiplied by 12 produces 12 as its rightmost digits is a(2)=26 (12*26=312). And so on.
|
|
3
|
|
|
|
OFFSET
|
0,1
|
|
REFERENCES
|
G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 99.
|
|
LINKS
|
|
|
EXAMPLE
|
a(0)=2;
a(1)=6 because 2*6 = 12;
a(2)=26 because 12*26 = 312;
a(3)=126 because 312*126 = 39312;
a(4)=6251 because 39312*6251 = 245739312;
a(5)=62500001 because 245739312*62500001 = 15358707245739312.
|
|
MAPLE
|
P:=proc(q, h) local a, b, k, n; a:=h; b:=ilog10(a)+1; print(h);
for k from 1 to 10 do for n from 2 to q do
if ((a*n) mod 10^b)=a then print(n); a:=a*n; b:=ilog10(a)+1;
break; fi; od; od; end: P(10^9, 2);
|
|
PROG
|
(Python)
import math
p, n = 2, 0
while n<10:
ndigits, oldp = len(str(p)), p
p += math.lcm(p, 10**ndigits)
print("a(%d) = %d"%(n:=n+1, p//oldp))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|