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

A023397 In base 10, if any power of 2 ends with k 2's and 3's, they must be the first k terms of this sequence in reverse order.

Original entry on oeis.org

2, 3, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 3, 2, 3, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 3, 3, 3, 2, 2, 3, 3, 3, 2, 3, 3, 3, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2
Offset: 1

Views

Author

Keywords

Examples

			No power of 2 ends with 3, so the first term is 2.
No power of 2 is == 22 (mod 100), since 4 does not divide 22, so the next term is 3 (and 4 does divide 32).
No power of 2 is == 332 (mod 1000), since 8 does not divide 332, so the next term is 2 (and 8 does divide 232). And so on.
		

Crossrefs

A023409 If any power of 2 ends with k 6's and 7's, they must be the first k terms of this sequence in reverse order.

Original entry on oeis.org

6, 7, 7, 7, 6, 6, 6, 6, 7, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 7, 7, 6, 6, 7, 7, 7, 6, 6, 6, 6, 7, 6, 7, 7, 7, 7, 7, 6, 6, 6, 6, 7, 6, 7, 7, 6, 6, 6, 6, 7, 6, 7, 6, 6, 7, 6, 7, 7, 7, 6, 6, 6, 7, 6, 7, 7, 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 7, 7, 6, 7, 7, 6, 7, 7, 6, 7, 6, 6, 7, 7, 6, 7, 6, 7, 7, 6, 6, 7, 7, 6, 6, 7
Offset: 0

Views

Author

Keywords

Comments

From Robert Israel, Mar 30 2018: (Start)
a(0)=6. If the concatenation 6a(n)...a(0) (as a decimal number) is divisible by 2^(n+2) then a(n+1)=6, otherwise a(n+1)=7.
Pomerance (see link) shows the sequence is not eventually periodic. (End)

Crossrefs

Programs

  • Maple
    a[0]:= 6: v:= 6:
    for n from 1 to 100 do
      if 6*10^n+v mod 2^(n+1)=0 then a[n]:= 6 else a[n]:= 7 fi;
      v:= v + a[n]*10^n
    od:
    seq(a[i],i=0..100); # Robert Israel, Mar 30 2018

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.
Showing 1-3 of 3 results.