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.

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