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 26 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

A050622 Numbers m that are divisible by 2^k, where k is the digit length of m.

Original entry on oeis.org

2, 4, 6, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320, 328, 336, 344, 352, 360
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1999

Keywords

Comments

The number of terms of length k is equal to (9*5^(k-1) - 1)/2. - Bernard Schott, Apr 06 2020

Crossrefs

Programs

  • Maple
    seq(seq(j*2^k, j=(5^(k-1)+1)/2 .. 5^k-1),k=1..3); # Robert Israel, Apr 05 2020
  • Mathematica
    Select[Range[360], IntegerQ[#/2^IntegerLength[#]] &] (* Jayanta Basu, May 25 2013 *)
  • PARI
    isok(n) = n % (2^#Str(n)) == 0; \\ Michel Marcus, Sep 17 2015

A155594 10^n+2^n-1.

Original entry on oeis.org

1, 11, 103, 1007, 10015, 100031, 1000063, 10000127, 100000255, 1000000511, 10000001023, 100000002047, 1000000004095, 10000000008191, 100000000016383, 1000000000032767, 10000000000065535, 100000000000131071
Offset: 0

Views

Author

Mohammad K. Azarian, Jan 24 2009

Keywords

Crossrefs

Programs

Formula

G.f.: 1/(1-10*x)+1/(1-2*x)-1/(1-x). E.g.f.: e^(10*x)+e^(2*x)-e^x.
a(n)=12*a(n-1)-20*a(n-2)-9 with a(0)=1, a(1)=11 - Vincenzo Librandi, Jul 21 2010
a(0)=1, a(1)=11, a(2)=103, a(n)=13*a(n-1)-32*a(n-2)+20*a(n-3). - Harvey P. Dale, Mar 07 2015
a(n) = A050621(n+1)-1. - R. J. Mathar, Mar 10 2022

A034478 a(n) = (5^n + 1)/2.

Original entry on oeis.org

1, 3, 13, 63, 313, 1563, 7813, 39063, 195313, 976563, 4882813, 24414063, 122070313, 610351563, 3051757813, 15258789063, 76293945313, 381469726563, 1907348632813, 9536743164063, 47683715820313, 238418579101563
Offset: 0

Views

Author

Keywords

Comments

Terms (with the offset changed to 1) are also the quotients arising from sequence A050621.
Partial sums of A020699. - Paul Barry, Sep 03 2003
Binomial transform of A081294. - Paul Barry, Jan 13 2005

Examples

			G.f. = 1 + 3*x + 13*x^2 + 63*x^3 + 313*x^4 + 1563*x^5 + 7813*x^6 + ...
		

Crossrefs

Programs

  • Maple
    seq((5^n + 1)/2, n=0..20); # Zerinvary Lajos, Jun 16 2007
  • Mathematica
    LinearRecurrence[{6, -5},{1, 3},22] (* Ray Chandler, May 25 2021 *)
  • Sage
    [lucas_number2(n,6,5)/2 for n in range(0,22)] # Zerinvary Lajos, Jul 08 2008

Formula

E.g.f.: exp(3*x)*cosh(2*x). - Paul Barry, Mar 17 2003
G.f.: (1-3*x)/((1-x)*(1-5*x)). - Paul Barry, Sep 03 2003
a(n) = Sum_{k=0..n} Sum_{j=0..k} binomial(n, k)*binomial(2*k, 2*j). - Paul Barry, Jan 13 2005
a(n) = 6*a(n-1) - 5*a(n-2) for n>1, a(0)=1, a(1)=3. - Philippe Deléham, Jul 11 2005
a(n)^2 + (a(n) - 1)^2 = a(2*n). E.g., 63^2 + 62^2 = 7813 = a(6). - Gary W. Adamson, Jun 17 2006
a(n) = 5*a(n-1) - 2 for n>0, a(0)=1. - Vincenzo Librandi, Aug 01 2010
a(n) = A034474(n)/2. - Elmo R. Oliveira, Dec 10 2023

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

A050623 Smallest n-digit number divisible by 3^n.

Original entry on oeis.org

3, 18, 108, 1053, 10206, 100602, 1001646, 10005525, 100009323, 1000053864, 10000125297, 100000190088, 1000000837998, 10000002002688, 100000000895004, 1000000037647854, 10000000032104772, 100000000321047720
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1999

Keywords

Crossrefs

Formula

a(n) = 3^n*ceiling(10^(n-1)/3^n). - Vladeta Jovovic, Feb 14 2003

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.
Showing 1-10 of 26 results. Next