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.

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

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 5, 3, 5, 1, 7, 1, 7, 5, 12, 1, 10, 1, 11, 7, 11, 1, 17, 5, 13, 10, 15, 1, 16, 1, 29, 11, 17, 7, 23, 1, 19, 13, 27, 1, 22, 1, 23, 16, 23, 1, 41, 7, 26, 17, 27, 1, 33, 11, 37, 19, 29, 1, 37, 1, 31, 22, 70, 13, 34, 1, 35, 23, 36, 1, 56, 1, 37, 26
Offset: 2

Views

Author

Chris Boyd, Jan 06 2019

Keywords

Comments

Denominators are given in A323185.
From its prime factorization, each natural number N>1 can be uniquely represented as a tuple of nondecreasing first powers (e.g., 60 = 2*2*3*5 -> (2, 2, 3, 5)).
There is a unique positive finite continued fraction associated with N whose coefficients in the standard abbreviated notation (except for the first coefficient, which is arbitrarily set to zero) map 1-to-1 to the elements of the tuple, from which the corresponding generating rational can be calculated (e.g. 60 -> [0; 2, 2, 3, 5] = 37/90).
The first few generating rationals are:
N ... GR .... continued fraction
2 ... 1/2 ... [0; 2]
3 ... 1/3 ... [0; 3]
4 ... 2/5 ... [0; 2, 2]
5 ... 1/5 ... [0; 5]
6 ... 3/7 ... [0; 2, 3]
7 ... 1/7 ... [0; 7]
8 ... 5/12 .. [0; 2, 2, 2]
9 ... 3/10 .. [0; 3, 3]
10 .. 5/11 .. [0; 2, 5]
a(n) is the numerator of the generating rational of n.
Iff n is prime, a(n) is 1.

Examples

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

Crossrefs

Cf. A323185.

Programs

  • Mathematica
    Array[Numerator@ FromContinuedFraction@ Prepend[Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #], 0] &, 74, 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])));}
    A323184(n)={vectorise_factors(n); contfracpnqn(v)[1,1];}
    for(k=2,75,print1(A323184(k)", "))
Showing 1-1 of 1 results.