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.

A078267 Smallest k such that k*N is an integer where N is obtained by placing the string "n" after a decimal point.

Original entry on oeis.org

10, 5, 10, 5, 2, 5, 10, 5, 10, 10, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 4, 50, 100, 25, 100, 10, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 20, 50, 100, 25, 100, 2, 100, 25, 100, 50, 20, 25, 100, 50, 100, 5, 100, 50, 100, 25, 20
Offset: 1

Views

Author

Amarnath Murthy, Nov 24 2002

Keywords

Comments

From Jaroslav Krizek, Feb 05 2010: (Start)
a(n) is the denominator of fraction a/b, where gcd(a, b) = 1, such that its decimal representation has form 0.(n).
The numerators are in A078268. Example: a(6) = 5; 3/5 = 0.6.
(End)

Examples

			a(40) = 5 since 5*0.40 = 2 is an integer. a(1) = a(10) = 10.
		

Crossrefs

Programs

  • Mathematica
    Array[#2/GCD[#1, #2] & @@ {#, 10^IntegerLength[#]} &, 65] (* Michael De Vlieger, Oct 05 2021 *)
  • PARI
    a(n) = denominator(n/10^(#Str(n))); \\ Michel Marcus, Mar 31 2019
    
  • Python
    from math import gcd
    def a(n): b = 10**len(str(n)); return b//gcd(n, b)
    print([a(n) for n in range(1, 103)]) # Michael S. Branicky, Oct 05 2021

Formula

a(10^m) = 10, a(r*10^m) = a(r).
a(n) = (A078268(n)*10^A055642(n)) / n. [Jaroslav Krizek, Feb 05 2010]
a(n) = 10^A055642(n)/gcd(n, 10^A055642(n)). - Michael S. Branicky, Oct 05 2021

Extensions

Edited and extended by Henry Bottomley, Dec 08 2002