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-2 of 2 results.

A102653 a(n) = 4 * floor(9*2^n/5).

Original entry on oeis.org

4, 12, 28, 56, 112, 228, 460, 920, 1840, 3684, 7372, 14744, 29488, 58980, 117964, 235928, 471856, 943716, 1887436, 3774872, 7549744, 15099492, 30198988, 60397976, 120795952, 241591908, 483183820, 966367640, 1932735280, 3865470564, 7730941132, 15461882264
Offset: 0

Views

Author

Odimar Fabeny, Feb 02 2005

Keywords

Comments

In binary, each term differs from the previous by a single bit.

Crossrefs

Programs

  • Mathematica
    Table[4Floor[(27 2^n)/15],{n,0,30}] (* or *) LinearRecurrence[ {3,-3,3,-2}, {4,12,28,56},30] (* Harvey P. Dale, Jun 15 2011 *)
  • PARI
    a(n)=27<Charles R Greathouse IV, Feb 04 2016

Formula

From R. J. Mathar, Feb 20 2011: (Start)
a(n) = 4 * A151754(n+1).
G.f.: 4 * ( 1+x^2-x^3 ) / ( (x-1)*(2*x-1)*(x^2+1) ). (End)
a(0)=4, a(1)=12, a(2)=28, a(3)=56, a(n) = 3*a(n-1)-3*a(n-2)+3*a(n-3)-2*a(n-4). - Harvey P. Dale, Jun 15 2011

Extensions

Edited by Don Reble, Mar 28 2006

A151752 a(n) is the unique n-digit number with all digits odd that is divisible by 5^n.

Original entry on oeis.org

5, 75, 375, 9375, 59375, 359375, 3359375, 93359375, 193359375, 3193359375, 73193359375, 773193359375, 3773193359375, 73773193359375, 773773193359375, 5773773193359375, 15773773193359375, 515773773193359375, 7515773773193359375, 97515773773193359375
Offset: 1

Views

Author

David W. Wilson, Jun 16 2009

Keywords

Comments

Another way to phrase the proof of uniqueness: after we take the last n-1 digits to be the previous number in the sequence, all odd possibilities for the first digit give different remainders mod 5. By the pigeonhole principle, exactly one of them generates the required number. - Tanya Khovanova, Jun 18 2009

Crossrefs

Programs

  • Magma
    v:=[5];
    for i in [2..20] do
        for s in [1, 3, 5, 7, 9] do
             v[i]:=s*10^(i-1)+v[i-1];
               if v[i] mod 5^i eq 0 then
                     break;
               end if;
        end for;
    end for;
    v; // Marius A. Burtea, Mar 18 2019
  • Maple
    a:= proc(n) option remember; local k, l;
          if n=1 then 5
        else l:= a(n-1);
             for k from 1 to 9 by 2
               while (parse(cat(k, l)) mod 5^n)<>0 do od;
             parse(cat(k, l))
          fi
        end:
    seq(a(n), n=1..30); # Alois P. Heinz, Jun 18 2009
  • Mathematica
    nxt[n_]:=Module[{x=FromDigits/@(Prepend[IntegerDigits[n],# ]&/@{1,3,5,7,9}),l},l=IntegerLength[n]+1;First[Select[x,Mod[ #,5^l]==0&]]]; NestList[nxt, 5, 25] (* Harvey P. Dale, Jul 06 2009 *)

Formula

a(n) = d(n)*10^(n-1) + a(n-1), where d(n), the leading digit of a(n), is one of the odd digits 1, 3, 5, 7, or 9 (forming the complete set of residues modulo 5) and is uniquely defined by the congruence: d(n) == (-a(n-1) / 10^(n-1)) (mod 5). - Max Alekseyev

Extensions

More terms from Max Alekseyev, Jun 17 2009
Further terms from Alois P. Heinz, Jun 18 2009
More terms from Harvey P. Dale, Jul 06 2009
Showing 1-2 of 2 results.