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

A268609 Record values in A004290.

Original entry on oeis.org

1, 10, 111, 1110, 111111111, 1111111110, 11111111100, 111111111000, 111111111111111111, 1111111111111111110, 11111111111111111100, 111111111111111111000, 111111111111111111111111111, 1111111111111111111111111110, 11111111111111111111111111100, 111111111111111111111111111000
Offset: 1

Views

Author

David Radcliffe, Feb 08 2016

Keywords

Comments

a(18) is the first term that is neither a repunit nor the product of a repunit and a power of 10.

Examples

			1110 is a term because A004290(6) = 1110 and A004290(n) < 1110 for all n < 6, where A004290(n) is the least positive multiple of n that when written in base 10 uses only 0's and 1's.
		

Crossrefs

Cf. A004290, A268610. Subsequence of A007088.

Programs

  • Maple
    A004290:= proc(n)
    local L,x,m,r,k,j;
    for x from 2 to n-1 do L[0,x]:= 0 od:
    L[0,0]:= 1: L[0,1]:= 1;
    for m from 1 do
       if L[m-1,(-10^m) mod n] = 1 then break fi;
       L[m,0]:= 1;
       for k from 1 to n-1 do
         L[m,k]:= max(L[m-1,k],L[m-1,k-10^m mod n])
       od;
    od;
    r:= 10^m; k:= -10^m mod n;
    for j from m-1 by -1 to 1 do
        if L[j-1,k] = 0 then
          r:= r + 10^j; k:= k - 10^j mod n;
        fi
    od;
    if k = 1 then r:= r + 1 fi;
    r
    end proc:
    A004290(1):= 1:
    count:= 0: m:= 0;
    for n from 1 to 20000 do
      v:= A004290(n);
      if v > m then
        count:= count+1;
        A[count]:= v;
        m:= v;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Feb 09 2016

Extensions

a(1)=0 prepended to terms, b-file and Maple by Georg Fischer, Jun 24 2020
Initial 0 removed for consistency with change in A004290 by Sean A. Irvine, Feb 19 2024
Showing 1-1 of 1 results.