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.

A323185 Denominators of rationals whose continued fraction representations show the prime factors of n (for n > 1) in nondecreasing order.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 12, 10, 11, 11, 17, 13, 15, 16, 29, 17, 23, 19, 27, 22, 23, 23, 41, 26, 27, 33, 37, 29, 37, 31, 70, 34, 35, 36, 56, 37, 39, 40, 65, 41, 51, 43, 57, 53, 47, 47, 99, 50, 57, 52, 67, 53, 76, 56, 89, 58, 59, 59, 90, 61, 63, 73, 169, 66, 79, 67, 87
Offset: 2

Views

Author

Chris Boyd, Jan 06 2019

Keywords

Comments

a(n) is the denominator of the generating rational of n (see comments and numerators in A323184).
If n is prime, a(n) is n.

Examples

			a(28) = 37 because 15/37 = [0; 2, 2, 7] and 2*2*7 = 28.
a(29) = 29 because 1/29 = [0; 29] = 29.
		

Crossrefs

Cf. A323184.

Programs

  • Mathematica
    Array[Denominator@ FromContinuedFraction@ Prepend[Flatten@ Map[ConstantArray[ #1, #2] &  @@ # &, FactorInteger@ #], 0] &, 67, 2] (* Michael De Vlieger, Jan 07 2019 *)
  • PARI
    vectorise_factors(m)={v=[0];F=factor(m);for(i=1,matsize(F)[1],for(j=1,F[i,2],v=concat(v,F[i,1])));}
    A323185(n)={vectorise_factors(n); contfracpnqn(v)[2,1];}
    for(k=2,75,print1(A323185(k)", "))