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.

A109847 Least common multiple of n and its 9's complement.

Original entry on oeis.org

8, 14, 6, 20, 20, 6, 14, 8, 0, 890, 88, 348, 1118, 1190, 420, 1328, 1394, 162, 1520, 1580, 546, 154, 1748, 600, 1850, 1898, 216, 1988, 2030, 690, 2108, 2144, 66, 2210, 2240, 252, 2294, 2318, 780, 2360, 2378, 798, 2408, 220, 270, 2438, 2444, 816, 2450, 2450
Offset: 1

Views

Author

Amarnath Murthy, Jul 06 2005

Keywords

Examples

			a(2)=14 because 7=9-2 and lcm(2,7)=14
a(9)=lcm(0,9)=0. a(10)=lcm(89,10)=890.
		

Crossrefs

Programs

  • Maple
    digs := proc(inp::integer) local resul,shiftinp : resul := 1 : shiftinp := iquo(inp,10) : while shiftinp > 0 do resul := resul+1 : shiftinp := iquo(shiftinp,10) : od : RETURN(resul) : end: nin := proc(inp::integer) RETURN(10^digs(inp)-1-inp) : end : for n from 1 to 40 do comp := nin(n) ; #print(n,comp,lcm(n,comp)) ; printf("%d,",lcm(n,comp)) ; od : # R. J. Mathar, Mar 27 2006
    # second Maple program:
    a:= n-> ilcm((10^length(n)-1-n), n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Sep 22 2015
  • Mathematica
    Array[LCM[#,10^IntegerLength[#]-1-#]&,50] (* Harvey P. Dale, Apr 17 2012 *)

Extensions

Corrected and extended by R. J. Mathar, Mar 27 2006
More terms from Joshua Zucker, May 03 2006

A109848 Highest common factor of n and its 9's complement.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 1, 1, 9, 1, 11, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 11, 1, 3, 1, 1, 9, 1, 1, 3, 1, 1, 33, 1, 1, 9, 1, 1, 3, 1, 1, 3, 1, 11, 9, 1, 1, 3, 1, 1, 3, 1, 1, 9, 11, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 33, 1, 1, 3, 1, 1, 9, 1, 1, 3, 1, 11, 3, 1, 1, 9, 1, 1, 3, 1, 1, 3, 11, 1, 9, 1, 1, 3, 1, 1, 3, 1, 1, 99, 1, 1, 3
Offset: 1

Views

Author

Amarnath Murthy, Jul 06 2005

Keywords

Examples

			a(55)=11 because the 9's complement of 55 is 99 - 55 = 44 and the greatest common divisor of 44 and 55 is 11.
		

Crossrefs

Programs

  • Maple
    digs := proc(inp::integer) local resul,shiftinp : resul := 1 : shiftinp := iquo(inp,10) : while shiftinp > 0 do resul := resul+1 : shiftinp := iquo(shiftinp,10) : od : RETURN(resul) : end: nin := proc(inp::integer) RETURN(10^digs(inp)-1-inp) : end : for n from 1 to 80 do comp := nin(n) ; #print(n,comp,gcd(n,comp)) ; printf("%d,",gcd(n,comp)) ; od : # R. J. Mathar, Mar 27 2006
  • Mathematica
    hcf[n_]:=Module[{idn=IntegerDigits[n],c9},c9=FromDigits[PadRight[{}, Length[idn],9]-idn];GCD[n,c9]]; Array[hcf,110] (* Harvey P. Dale, Dec 18 2012 *)

Extensions

Corrected and extended by R. J. Mathar, Mar 27 2006
More terms from Joshua Zucker, May 03 2006

A327266 Product of A325907(n) and its 9's complement.

Original entry on oeis.org

18, 2268, 22316868, 2222332266866868, 22222222333322316666886866866868, 2222222222222222333333332222332266666666888866866666886866866868
Offset: 1

Views

Author

Seiichi Manyama, Sep 15 2019

Keywords

Examples

			a(1) =        3 *        6 =         18.
a(2) =       63 *       36 =        2268.
a(3) =     3363 *     6636 =      22316868.
a(4) = 66663363 * 33336636 =  2222332266866868.
-----------------------------------------------
a(1) =        18        =        18        - 2 *        0 +    0 * 10^1.
a(2) =       2268       =       2188       - 2 *       10 +    1 * 10^2.
a(3) =     22316868     =     22218888     - 2 *     1010 +   10 * 10^4.
a(4) = 2222332266866868 = 2222222188888888 - 2 * 11011010 + 1101 * 10^8.
		

Crossrefs

Programs

  • Ruby
    def A(n)
      a = [3, 6]
      b = ([[3]] + (1..n - 1).map{|i| [a[i % 2]] * (2 ** (i - 1))}).reverse.join.to_i
      b * (10 ** (2 ** (n - 1)) - 1 - b)
    end
    def A327266(n)
      (1..n).map{|i| A(i)}
    end
    p A327266(6)

Formula

a(n) = A084021(A325907(n)) = A325907(n) * (A002283(2^(n-1)) - A325907(n)).
a(n) = A327294(n) - 10^(2^(n-1)) = a(n) = (2 * 10^(2^n) - 3 * 10^(2^(n-1)) - 8)/9 - 2 * A325493(n-1) + A325910(n-1) * 10^(2^(n-1)).
Showing 1-3 of 3 results.