OFFSET
1,1
COMMENTS
Also defined as all n not coprime with 10 where there exists k > 1 such that n^k mod 10^floor(log_10(n)) = n.
For n > 1, a(n) <= a(n-1) + 2^(ceiling(log_10(a(n))) + 1) (conjectured).
For a(n) >= 10^k where k >= 1, there exists a(m) = a(n) mod 10^j where m < n and j < k.
From Robert Israel, May 14 2015: (Start)
n with d digits is in the sequence if and only if n is either divisible by 2^d but not by 5, or divisible by 5^d but not by 2.
For d >= 2 the number of terms with d digits is 4*5^(d-1) + 2^(d-1) - 4*floor(5^d/50) - floor(2^d/20) - x(d) where x(d) = 3 if d == 2 or 3 mod 4, 2 otherwise.
(End)
LINKS
Seyed Ali Tavakoli-Nabavi, Table of n, a(n) for n = 1..100000
Seyed Ali Tavakoli-Nabavi, Scatter plots: (n, a(n)) and (n, a(n) - a(n-1))
Seyed Ali Tavakoli-Nabavi, Tcl program to generate the b-file
FORMULA
For n > 6, a(n) > 2n since no term is divisible by 10 (but all are divisible by either 2 or 5). - Charles R Greathouse IV, May 13 2015
EXAMPLE
For n = 2, we have n^5 = 2^5 = 32, whose last digit is 2 = n, so 2 is in the sequence.
For n = 3, we have n^5 = 3^5 = 243, so 3 is in the sequence.
For n = 4, we have n^3 = 4^3 = 64, so 4 is in the sequence.
...
As a counterexample, n = 41 is not in the sequence because it is coprime with 10, even though we have 41^6 = 4750104241, whose last 2 digits are 41.
MAPLE
F:= d -> (seq(seq(2^d*(5*j+i), i=1..4), j=0..5^(d-1)-1), seq(5^d*(2*j+1), j=0..2^(d-1)-1)):
sort(convert({seq(F(d), d=1..4)}, list)); # Robert Israel, May 14 2015
PROG
(Tcl) See a255577.tcl in LINKS.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Seyed Ali Tavakoli-Nabavi, May 05 2015
STATUS
approved