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.

A058973 First integer reached in A058972.

Original entry on oeis.org

1, 2, 3, 2, 4, 2, 5, 9, 2, 4, 8, 8, 9, 9, 10, 8, 8, 11, 2, 2, 12, 2, 13, 13, 14, 15, 4, 16, 2, 17, 4, 35, 19, 8, 23, 9, 8, 22, 25, 2, 26, 25, 2, 2, 24, 28, 8, 10, 4, 29, 2, 26, 29, 2, 2, 35, 33, 6, 2, 38, 33, 33, 40, 2, 68, 4, 8, 44, 41, 8, 4, 46, 35, 43, 49, 50, 2, 42, 8, 40, 58, 4, 59, 43, 61
Offset: 1

Views

Author

N. J. A. Sloane, Jan 14 2001

Keywords

Examples

			A058972(1) = 3: f(3/1) = 3/3 = 1 = a(1);
A058972(2) = 9: f(9/1) = 8/4 = 2 = a(2);
A058972(3) = 15: f(15/1) = 15/5 = 3 = a(3);
A058972(4) = 24: f(24/1) = 6/3 = 2 = a(4).
		

Crossrefs

Cf. A058972.

Programs

  • PARI
    f2(p,q) = (sigma(p+q)-p-q)/numdiv(p+q);
    f1(r) = f2(numerator(r), denominator(r));
    loop(list) = {my(v=Vecrev(list)); for (i=2, #v, if (v[i] == v[1], return(1)););}
    ff(n) = {my(ok=0, m=f2(n,1), list=List()); while(denominator(m) != 1, m = f1(m); listput(list, m); if (loop(list), return (0));); return(m);}
    lista(nn) = {for (n=1, nn, my(x=ff(n)); if (x, print1(x, ", ")););} \\ Michel Marcus, Feb 09 2022

Extensions

Corrected and extended by Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 22 2003