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

A247462 Number of iterations needed in A058977 to reach a result.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 17 2014

Keywords

Comments

a(A247468(n)) = n and a(m) < n for m < A247468(n).

Examples

			Consider f-trajectories and their lengths, where f(p/q)=A008472(p+q)/A001221(p+q), the iterating function in definition of A058977:
a(454) = 3: 454/1 - 25/3 - 9/2 - 11/1
a(1401) = 4: 1401/1 - 703/2 - 55/3 - 31/2 - 7/1;
a(7364) = 5: 7364/1 - 499/3 - 253/2 - 25/3 - 9/2 - 11/1.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator, Ratio)
    a247462 1 = 1
    a247462 n = fst $ until ((== 1) . denominator . snd)
                            (\(i, x) -> (i + 1, f x)) (0, 1 % n) where
       f x = a008472 x' % a001221 x' where x' = numerator x + denominator x

A058971 For a rational number p/q let f(p/q) = sum of divisors of p+q divided by number of divisors of p+q; a(n) is obtained by iterating f, starting at n/1, until an integer is reached, or if no integer is ever reached then a(n) = 0.

Original entry on oeis.org

3, 2, 6, 3, 3, 4, 10, 87, 6, 6, 9, 7, 6, 6, 87, 9, 6, 10, 7, 8, 9, 12, 9, 15, 12, 10, 16, 15, 9, 16, 12, 12, 15, 12, 87, 19, 15, 14, 19, 21, 12, 22, 14, 13, 18, 24, 34, 19, 12, 18, 0, 27, 15, 18, 15, 20, 24, 30, 14, 31, 24, 18, 51, 21, 18, 34, 21, 24, 18, 36, 24, 37, 30, 21, 37
Offset: 1

Views

Author

N. J. A. Sloane, Jan 14 2001

Keywords

Comments

a(p-1) = (p+1)/2 for all odd primes p. Thus there are infinitely many distinct terms. - Ely Golden, Mar 03 2018

Examples

			1 -> (1+2)/2 = 3/2 -> (1+5)/2 = 3, so a(1) = 3.
51 -> 49/3 -> 49/3 -> ..., so a(51) = 0.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    a058971 n = f [n % 1] where
       f xs@(x:_) | denominator y == 1 = numerator y
                  | y `elem` xs        = 0
                  | otherwise          = f (y : xs)
                  where y = (a000203 x') % (a000005 x')
                        x' = numerator x + denominator x
    -- Reinhard Zumkeller, Aug 02 2012
  • Maple
    with(numtheory); f := proc(n) if whattype(n) = integer then sigma(n+1)/sigma[0](n+1) else sigma(numer(n)+denom(n))/sigma[0](numer(n)+denom(n)); fi; end;
  • Mathematica
    f[x_] := With[{p = Numerator[x], q = Denominator[x]}, DivisorSigma[1, p+q]/DivisorSigma[0, p+q]]; a[n_] := If[ IntegerQ[ r = FixedPoint[f, n, SameTest -> (#1 == #2 || IntegerQ[#2] &)]], r, 0]; Table[a[n], {n, 1, 75}] (* Jean-François Alcover, Jul 18 2012 *)

Extensions

More terms from Matthew Conroy, Apr 18 2001, who remarks that a(51) = a(655) = a(1039) = 0 are all the zeros of a(n) for n < 10^5
No more zero terms <= 10^6 found by Reinhard Zumkeller, Aug 02 2012

A058988 For a rational number p/q let f(p/q) = p*q divided by number of divisors of p+q; a(n) is obtained by iterating f, starting at n/1, until an integer is reached, or if no integer is ever reached then a(n) = 0.

Original entry on oeis.org

1, 1, 1, 2, 30, 3, 14, 12, 18, 5, 33, 6, 26, 21, 3, 8, 51, 9, 38, 5, 28, 11, 92, 8, 50, 0, 9, 14, 116, 15, 93, 8, 66, 17, 105, 18, 74, 0, 156, 20, 492, 21, 86, 22, 60, 23, 0, 16, 147, 0, 17, 26, 212, 27, 330, 14, 114, 29, 354, 30, 61, 186, 9, 16, 260, 33, 201, 17, 138, 35, 426
Offset: 1

Views

Author

N. J. A. Sloane, Jan 17 2001

Keywords

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    a058988 n = numerator $ fst $
      until ((== 1) . denominator . fst) f $ f (fromIntegral n, []) where
      f (x, ys) = if y `elem` ys then (0, []) else (y, y:ys) where
       y = numerator x * denominator x % a000005 (numerator x + denominator x)
    -- Reinhard Zumkeller, Aug 29 2014
    
  • PARI
    f2(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)););}
    a(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);} \\ Michel Marcus, Feb 09 2022

Extensions

More terms from Naohiro Nomoto, Jul 20 2001

A247468 Smallest number m such that A247462(m) = n.

Original entry on oeis.org

1, 5, 164, 501, 7364, 29121, 515504, 2445693, 92781321
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 17 2014

Keywords

Examples

			.  n |    a(n) |                  A058977 trajectory
. ---+---------+---------------------------------------------------------
.  2 |       5 | 1/a(2)-5/2-7
.  3 |     164 | 1/a(3)-19/3-13/2-4
.  4 |     501 | 1/a(4)-253/2-25/3-9/2-11
.  5 |    7364 | 1/a(5)-499/3-253/2-25/3-9/2-11
.  6 |   29121 | 1/a(6)-14563/2-979/3-493/2-19/3-13/2-4
.  7 |  515504 | 1/a(6)-34375/3-17191/2-535/3-271/2-23/3-15/2-17
.  8 | 2445693 | 1/a(8)-1222849/2-58241/3-14563/2-979/3-493/2-19/3-13/2-4
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a247468 = (+ 1) . fromJust . (`elemIndex` a247462_list)
    
  • PARI
    f2(p, q) = my(f=factor(p+q)[, 1]~); vecsum(f)/#f;
    f1(r) = f2(numerator(r), denominator(r));
    loop(list) = {my(v=Vecrev(list)); for (i=2, #v, if (v[i] == v[1], return(1)); ); }
    f(n) = {my(ok=0, m=f2(n, 1), list=List(), nb=1); while(denominator(m) != 1, m = f1(m); nb++; listput(list, m); if (loop(list), return (0)); ); return(nb); } \\ A247462
    a(n) = my(k=1); while(f(k) != n, k++); k; \\ Michel Marcus, Feb 09 2022

Formula

A247462(a(n)) = n and A247462(m) < n for m < a(n).

Extensions

a(9) from Michel Marcus, Feb 09 2022

A059514 For a rational number p/q let f(p/q) = p*q divided by (the sum of digits of p and of q) minus 1; a(n) is obtained by iterating f, starting at n/1, until an integer is reached, or if no integer is ever reached then a(n) = 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 4, 28, 42, 7315, 208, 136, 2, 19, 10, 7, 11, 69, 4, 2310, 28, 3, 42, 319, 10, 189885850, 96, 11, 323323, 205530, 4, 37, 228, 28, 10, 123, 7, 559, 11, 5, 69, 517, 4, 152152, 10, 187, 28, 424, 6, 11, 154, 0, 77140, 2478, 10, 0
Offset: 1

Views

Author

Floor van Lamoen, Jan 22 2001

Keywords

Comments

a(A216183(n)) = 0. - Reinhard Zumkeller, Mar 11 2013

Examples

			14/1 -> 14/5 -> 70/9 -> 630/15 = 42 so a(14)=42.
57/1 -> 19/4 -> 76/13 -> 247/4 -> 247/4 -> ...  so a(57) = 0.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    a059514 n = f [n % 1] where
       f xs@(x:_)
         | denominator y == 1 = numerator y
         | y `elem` xs        = 0
         | otherwise          = f (y : xs)
         where y = (numerator x * denominator x) %
                   (a007953 (numerator x) + a007953 (denominator x) - 1)
    -- Reinhard Zumkeller, Mar 11 2013

Extensions

Corrected and extended by Naohiro Nomoto, Jul 20 2001

A145833 The "Wild Numbers", from the novel of the same title (Version 2).

Original entry on oeis.org

11, 67, 4769, 67
Offset: 1

Views

Author

Aaron Swartz (me(AT)aaronsw.com), Oct 20 2008

Keywords

Comments

Apparently these are completely fictional and there is no mathematical explanation. However, see the pseudo-wild numbers in A058971, A058972, A058973, A058977, A058988, A059175. See also the Lagarias article.

References

  • P. Schogt, De Wilde Getallen, De Arbeiderspers, Amsterdam, 1998.
  • P. Schogt, The Wild Numbers, Four Walls Eight Windows Pub., New York, 2000.
  • D. F. Wallace, Rhetoric and the math melodrama, Science, 290 (Dec 22 2000), 2263-2267.
  • A number of other reviews of this book exist on the Web.

Crossrefs

A variant of A058883, which is the main entry for this sequence.

A058883 The "Wild Numbers", from the novel of the same title (Version 1).

Original entry on oeis.org

11, 67, 2, 4769, 67
Offset: 0

Views

Author

N. J. A. Sloane, Jan 08 2001

Keywords

Comments

Apparently these are completely fictional and there is no mathematical explanation. However, see the pseudo-wild numbers in A058971, A058972, A058973, A058977, A058988, A059175. See also the Lagarias article.

References

  • P. Schogt, De Wilde Getallen, De Arbeiderspers, Amsterdam, 1998.
  • P. Schogt, The Wild Numbers, Four Walls Eight Windows Pub., New York, 2000.
  • D. F. Wallace, Rhetoric and the math melodrama, Science, 290 (Dec 22 2000), 2263-2267.
  • A number of other reviews of this book exist on the Web.

Crossrefs

See A145833 for another version.

Extensions

Thanks to Enoch Haga for investigating these numbers (Jan 14 2001).
Offset changed to 0 by Sean A. Irvine, Sep 03 2022, because of the Wikipedia link.
Showing 1-7 of 7 results.