cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 23 results. Next

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

Views

Author

Keywords

Comments

If (n-1)st term is divisible by 2^n, then n-th term begins with a 4. If not, then n-th term begins with a 3.
Proof of conjecture that a(n) ends with a(n-1): If a(n) is divisible by 2^n, then a(n) is divisible by 2^(n-1), so a(n)-k*10^(n-1) is divisible by 2^(n-1) for integer k, but if k is first digit of a(n) then a(n)-k*10^(n-1) is an (n-1)-digit number made up of 3s and 4s and divisible by 2^(n-1) and so must be a(n-1). - Henry Bottomley, Feb 14 2000

Crossrefs

Programs

  • Maple
    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
  • PARI
    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

Formula

a(n) = a(n-1) + 10^(n-1)*(4-[a(n-1)/2^(n-1) mod 2]), i.e., a(n) ends with a(n-1). - Henry Bottomley, Feb 14 2000

Extensions

Corrected and extended by Patrick De Geest, Jun 15 1999
More terms from Henry Bottomley, Feb 14 2000

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

Views

Author

Patrick De Geest, Jun 15 1999

Keywords

Comments

Quotients arising from this sequence give A034478 ((5^(n-1)+1)/2).

Crossrefs

Programs

Formula

a(n) = 10^(n-1) + 2^(n-1).
G.f.: Q(0) where Q(k)= 1 + 5^k/(1 - 2*x/(2*x + 5^k/Q(k+1) )); (continued fraction ). - Sergei N. Gladkovskii, Apr 10 2013
G.f.: 2*x*(1-6*x)/((1-2*x)*(1-10*x)). - Vincenzo Librandi, Sep 12 2014
a(n) = 12*a(n-1) - 20*a(n-2) for n>1. - Vincenzo Librandi, Sep 12 2014

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Comments

Corresponding quotients a(n) / 2^n are in A126933. - Bernard Schott, Mar 15 2023

Examples

			a(5) = 22112 since 22112 = 2^5 * 691 and 22112 contains 5 digits.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)
  • Python
    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

Formula

a(n) = a(n-1) + 10^(n-1)*(2-[a(n-1)/2^(n-1) mod 2]), i.e., a(n) ends with a(n-1); if the (n-1)-th term is divisible by 2^n then the n-th term begins with a 2; if not, then the n-th term begins with a 1.

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Programs

  • 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]+7*10^(n-1)
         fi
    od:
    seq(A[i],i=1..100); # Robert Israel, Oct 27 2019
  • Mathematica
    Table[Select[FromDigits/@Tuples[{2,7},n],Mod[#,2^n]==0&],{n,18}]//Flatten (* Harvey P. Dale, Jul 14 2025 *)

Formula

a(n) = a(n-1) + 10^(n-1)*(2 + 5*(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 7.

Extensions

Formula corrected by Robert Israel, Oct 27 2019

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Programs

  • 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]+3*10^(n-1)
         fi
    od:
    seq(A[i],i=1..100); # Robert Israel, Oct 27 2019

Formula

a(n) = a(n-1) + 10^(n-1)*(2 + (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 3.

Extensions

Formula corrected by Robert Israel, Oct 27 2019

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Programs

  • 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 *)

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.

Extensions

Formula corrected by Robert Israel, Oct 27 2019

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{4,7},n],Divisible[#,2^n]&], {n,20}]] (* Harvey P. Dale, Jul 25 2011 *)

Formula

a(n) = a(n-1)+10^(n-1)*(4+3*[a(n-1)/2^(n-1) mod 2]) i.e. a(n) ends with a(n-1); if (n-1)-th term is divisible by 2^n then n-th term begins with a 4, if not then n-th term begins with a 7.

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Select[FromDigits/@Tuples[{6,9},n],Mod[#,2^n]==0&],{n,20}]//Flatten (* Harvey P. Dale, Sep 15 2023 *)

Formula

a(n)=a(n-1)+10^(n-1)*(6+3*[a(n-1)/2^(n-1) mod 2]) i.e. a(n) ends with a(n-1); if (n-1)-th term is divisible by 2^n then n-th term begins with a 6, if not then n-th term begins with a 9.

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Select[FromDigits/@Tuples[{1,8},n],Divisible[#,2^n]&],{n,20}]// Flatten (* Harvey P. Dale, Aug 20 2017 *)

Formula

a(n)=a(n-1)+10^(n-1)*(8-7*[a(n-1)/2^(n-1) mod 2]) i.e. a(n) ends with a(n-1); if (n-1)-th term is divisible by 2^n then n-th term begins with an 8, if not then n-th term begins with a 1.

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

Views

Author

Henry Bottomley, Mar 06 2000

Keywords

Crossrefs

Formula

a(n)=a(n-1)+10^(n-1)*(8+[a(n-1)/2^(n-1) mod 2]) i.e. a(n) ends with a(n-1); if (n-1)-th term is divisible by 2^n then n-th term begins with an 8, if not then n-th term begins with a 9.
Showing 1-10 of 23 results. Next