login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A053317 a(n) contains n digits (either '2' or '5') and is divisible by 2^n. 2
2, 52, 552, 5552, 55552, 255552, 5255552, 55255552, 255255552, 2255255552, 22255255552, 222255255552, 5222255255552, 55222255255552, 255222255255552, 2255222255255552, 22255222255255552, 222255222255255552 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(n) = a(n-1) + 10^(n-1)*(2 + 3*(a(n-1)/2^(n-1) mod 2)), i.e., a(n) ends with a(n-1); if a(n-1) is divisible by 2^n then a(n) begins with a 2, if not then a(n) begins with a 5.
MAPLE
A[1]:= 2:
for n from 2 to 100 do
if A[n-1] mod 2^n = 0 then A[n]:= A[n-1]+2*10^(n-1)
else A[n]:= A[n-1]+5*10^(n-1)
fi
od:
seq(A[i], i=1..100); # Robert Israel, Oct 27 2019
MATHEMATICA
Table[Select[FromDigits/@Tuples[{2, 5}, n], Divisible[#, 2^n]&], {n, 18}]//Flatten (* Harvey P. Dale, Oct 12 2022 *)
CROSSREFS
Sequence in context: A299461 A300104 A034311 * A123803 A284767 A101930
KEYWORD
base,nonn
AUTHOR
Henry Bottomley, Mar 06 2000
EXTENSIONS
Formula corrected by Robert Israel, Oct 27 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:02 EDT 2024. Contains 371918 sequences. (Running on oeis4.)