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.

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.

This page as a plain text file.
%I A059514 #7 Mar 02 2015 16:08:45
%S A059514 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,
%T A059514 28,3,42,319,10,189885850,96,11,323323,205530,4,37,228,28,10,123,7,
%U A059514 559,11,5,69,517,4,152152,10,187,28,424,6,11,154,0,77140,2478,10,0
%N 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.
%C A059514 a(A216183(n)) = 0. - _Reinhard Zumkeller_, Mar 11 2013
%H A059514 Reinhard Zumkeller, <a href="/A059514/b059514.txt">Table of n, a(n) for n = 1..10000</a>
%e A059514 14/1 -> 14/5 -> 70/9 -> 630/15 = 42 so a(14)=42.
%e A059514 57/1 -> 19/4 -> 76/13 -> 247/4 -> 247/4 -> ...  so a(57) = 0.
%o A059514 (Haskell)
%o A059514 import Data.Ratio ((%), numerator, denominator)
%o A059514 a059514 n = f [n % 1] where
%o A059514    f xs@(x:_)
%o A059514      | denominator y == 1 = numerator y
%o A059514      | y `elem` xs        = 0
%o A059514      | otherwise          = f (y : xs)
%o A059514      where y = (numerator x * denominator x) %
%o A059514                (a007953 (numerator x) + a007953 (denominator x) - 1)
%o A059514 -- _Reinhard Zumkeller_, Mar 11 2013
%Y A059514 Cf. A059175, A058971, A058972, A058977, A058988.
%Y A059514 Cf. A007953.
%K A059514 base,easy,nonn
%O A059514 1,10
%A A059514 _Floor van Lamoen_, Jan 22 2001
%E A059514 Corrected and extended by _Naohiro Nomoto_, Jul 20 2001