A035014
a(n) contains n digits (either '3' or '4') and is divisible by 2^n.
Original entry on oeis.org
4, 44, 344, 3344, 33344, 433344, 3433344, 33433344, 333433344, 3333433344, 43333433344, 343333433344, 3343333433344, 33343333433344, 433343333433344, 3433343333433344, 43433343333433344, 443433343333433344, 3443433343333433344, 43443433343333433344
Offset: 1
-
A035014 := proc(n)
option remember ;
local pre;
if n = 1 then
4;
else
pre := procname(n-1) ;
pre+10^(n-1)*(4-modp(pre/2^(n-1),2)) ;
end if;
end proc: # R. J. Mathar, May 02 2014
-
a(n) = if (n==1, 4, a(n-1) + 10^(n-1)*(4-(a(n-1)/2^(n-1) % 2))); \\ Michel Marcus, Apr 07 2017
A050621
Smallest n-digit number divisible by 2^n.
Original entry on oeis.org
2, 12, 104, 1008, 10016, 100032, 1000064, 10000128, 100000256, 1000000512, 10000001024, 100000002048, 1000000004096, 10000000008192, 100000000016384, 1000000000032768, 10000000000065536, 100000000000131072
Offset: 1
A053312
a(n) contains n digits (either '1' or '2') and is divisible by 2^n.
Original entry on oeis.org
2, 12, 112, 2112, 22112, 122112, 2122112, 12122112, 212122112, 1212122112, 11212122112, 111212122112, 1111212122112, 11111212122112, 211111212122112, 1211111212122112, 11211111212122112, 111211111212122112, 2111211111212122112, 12111211111212122112
Offset: 1
a(5) = 22112 since 22112 = 2^5 * 691 and 22112 contains 5 digits.
-
a:= proc(n) option remember; `if`(n=1, 2, (t-> parse(
cat(`if`(irem(t, 2^n)=0, 2, 1), t)))(a(n-1)))
end:
seq(a(n), n=1..20); # Alois P. Heinz, Feb 02 2025
-
Select[Flatten[Table[FromDigits/@Tuples[{1,2},n],{n,20}]],Divisible[ #,2^IntegerLength[#]]&] (* Harvey P. Dale, Jul 01 2019 *)
RecurrenceTable[{a[1]==2, a[n]==a[n-1]+10^(n-1)(2-Mod[a[n-1]/2^(n-1),2])}, a[n], {n, 1, 20}] (* Paul C Abbott, Feb 03 2025 *)
-
from itertools import count, islice
def A053312_gen(): # generator of terms
a = 0
for n in count(0):
yield (a:=a+(10**n if (a>>n)&1 else 10**n<<1))
A053312_list = list(islice(A053312_gen(),20)) # Chai Wah Wu, Mar 15 2023
A053318
a(n) contains n digits (either '2' or '7') and is divisible by 2^n.
Original entry on oeis.org
2, 72, 272, 2272, 22272, 222272, 7222272, 27222272, 727222272, 2727222272, 72727222272, 772727222272, 7772727222272, 77772727222272, 277772727222272, 2277772727222272, 72277772727222272, 272277772727222272
Offset: 1
-
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]+7*10^(n-1)
fi
od:
seq(A[i],i=1..100); # Robert Israel, Oct 27 2019
-
Table[Select[FromDigits/@Tuples[{2,7},n],Mod[#,2^n]==0&],{n,18}]//Flatten (* Harvey P. Dale, Jul 14 2025 *)
A053316
a(n) contains n digits (either '2' or '3') and is divisible by 2^n.
Original entry on oeis.org
2, 32, 232, 3232, 23232, 223232, 2223232, 32223232, 232223232, 3232223232, 23232223232, 323232223232, 3323232223232, 23323232223232, 323323232223232, 3323323232223232, 33323323232223232, 333323323232223232
Offset: 1
A053317
a(n) contains n digits (either '2' or '5') and is divisible by 2^n.
Original entry on oeis.org
2, 52, 552, 5552, 55552, 255552, 5255552, 55255552, 255255552, 2255255552, 22255255552, 222255255552, 5222255255552, 55222255255552, 255222255255552, 2255222255255552, 22255222255255552, 222255222255255552
Offset: 1
-
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
-
Table[Select[FromDigits/@Tuples[{2,5},n],Divisible[#,2^n]&],{n,18}]//Flatten (* Harvey P. Dale, Oct 12 2022 *)
A053332
a(n) contains n digits (either '4' or '7') and is divisible by 2^n.
Original entry on oeis.org
4, 44, 744, 7744, 47744, 447744, 4447744, 44447744, 444447744, 4444447744, 74444447744, 474444447744, 4474444447744, 44474444447744, 444474444447744, 7444474444447744, 77444474444447744, 477444474444447744
Offset: 1
-
Flatten[Table[Select[FromDigits/@Tuples[{4,7},n],Divisible[#,2^n]&], {n,20}]] (* Harvey P. Dale, Jul 25 2011 *)
A053338
a(n) contains n digits (either '6' or '9') and is divisible by 2^n.
Original entry on oeis.org
6, 96, 696, 9696, 69696, 669696, 6669696, 96669696, 696669696, 9696669696, 69696669696, 969696669696, 9969696669696, 69969696669696, 969969696669696, 9969969696669696, 99969969696669696, 999969969696669696
Offset: 1
-
Table[Select[FromDigits/@Tuples[{6,9},n],Mod[#,2^n]==0&],{n,20}]//Flatten (* Harvey P. Dale, Sep 15 2023 *)
A053376
a(n) contains n digits (either '1' or '8') and is divisible by 2^n.
Original entry on oeis.org
8, 88, 888, 1888, 81888, 181888, 8181888, 18181888, 118181888, 8118181888, 88118181888, 888118181888, 8888118181888, 88888118181888, 888888118181888, 1888888118181888, 81888888118181888, 181888888118181888
Offset: 1
-
Table[Select[FromDigits/@Tuples[{1,8},n],Divisible[#,2^n]&],{n,20}]// Flatten (* Harvey P. Dale, Aug 20 2017 *)
A053380
a(n) contains n digits (either '8' or '9') and is divisible by 2^n.
Original entry on oeis.org
8, 88, 888, 9888, 89888, 989888, 9989888, 89989888, 989989888, 8989989888, 98989989888, 898989989888, 8898989989888, 98898989989888, 998898989989888, 8998898989989888, 98998898989989888, 898998898989989888
Offset: 1
Showing 1-10 of 23 results.
Comments