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.

A070061 Least number of fecundity n (A070562).

Original entry on oeis.org

0, 5, 25, 19, 23, 18, 9, 7, 4, 2, 1, 282, 1529, 1586, 1397, 898, 658, 538, 477, 529, 736, 586, 397, 366, 294, 246, 243, 187, 3237326, 3677393, 3586673, 3553787, 3515987, 22572473, 518376965, 516675965, 516963965, 41883474553, 41881554553, 41863638649, 35632297938395
Offset: 0

Views

Author

Lekraj Beedassy, May 06 2002

Keywords

Comments

a(41) > 2.75*10^14. - Giovanni Resta, Jun 04 2013

Examples

			a(9)=2 since we have the 9-step chain 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 -> 102.
		

References

  • P. Tougne, Jeux Mathematiques column, Pour La Science (French edition of "Scientific American"), Vol. 82, Aug. 1984, Prob. 6, pp. 101, 104.

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 2; t = Table[0, {50}]; k = 1; While[k < 2300000001, a = f@k; If[ t[[a + 1]] == 0, t[[a + 1]] = k; Print[{k, a}]]; k++ ]; t (* Robert G. Wilson v, Jun 27 2010 *)

Extensions

Corrected and extended by Jason Earls, May 26 2002
a(34)-a(36) from Robert G. Wilson v, Jun 27 2010
a(37)-a(40) from Giovanni Resta, Jun 04 2013

A337789 Numbers k such that trajectory of k under repeated calculation of fecundity (x -> A070562(x)) eventually reaches 0.

Original entry on oeis.org

0, 1, 5, 10, 15, 18, 20, 21, 22, 24, 27, 30, 35, 40, 42, 44, 46, 48, 50, 51, 55, 59, 60, 63, 64, 66, 67, 69, 70, 74, 75, 77, 80, 83, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 115, 118, 120, 121, 122, 124, 127
Offset: 1

Views

Author

Robert Bilinski, Sep 21 2020

Keywords

Examples

			5 is a term in the sequence because the fecundity of 5 is 1, the fecundity of 1 is 10 and the fecundity of 10 is 0.
7 is not a term in the sequence because the fecundity of 7 is 7 and therefore the fecundity will never become 0.
		

Crossrefs

Programs

  • Maple
    fec:= proc(n) local k, x,t;
      x:= n;
      for k from 0 do
        t:= convert(convert(x,base,10),`*`);
        if t = 0 then return k fi;
        x:= x+t
      od
    end proc:
    filter:= proc(n) local v; option remember;
        v:= fec(n);
        if v = 0 then true
        elif v = n then false
        else procname(v)
        fi
    end proc:
    select(filter, [$0..1000]); # Robert Israel, Apr 12 2021
  • Mathematica
    fec[n_] := Length @ FixedPointList[# + Times @@ IntegerDigits[#] &, n] - 2; Select[Range[0, 100], FixedPoint[fec, #] == 0 &] (* Amiram Eldar, Sep 22 2020 *)
  • Python
    from math import prod
    from functools import lru_cache
    def pd(n): return prod(map(int, str(n)))
    def A070562(n):
      s = 0
      while pd(n) != 0: n, s = n + pd(n), s + 1
      return s
    @lru_cache(maxsize=None)
    def ok(n):
      fn = A070562(n)
      if fn == 0: return True
      if fn == n: return False
      return ok(fn)
    print(list(filter(ok, range(128)))) # Michael S. Branicky, Apr 12 2021

Extensions

More terms from Amiram Eldar, Sep 22 2020
Offset changed by Robert Israel, Apr 12 2021

A070257 Fecundity of n sets a new record.

Original entry on oeis.org

1, 187, 3237326, 3515987, 22572473, 516675965, 516963965, 41863638649, 35632297938395
Offset: 1

Views

Author

Jason Earls, May 09 2002

Keywords

Comments

a(9) > 10^11. - Donovan Johnson, Jun 23 2011
a(10) > 2.75*10^14. - Giovanni Resta, Jun 04 2013

Crossrefs

Extensions

a(5)-a(7) from Donovan Johnson, Jul 29 2009
a(8) from Donovan Johnson, Jun 23 2011
a(9) from Giovanni Resta, Jun 04 2013

A070560 a(0) = 1; for n > 0, a(n) = (fecundity of n) + 2.

Original entry on oeis.org

1, 12, 11, 11, 10, 3, 10, 9, 9, 8, 2, 10, 9, 9, 8, 3, 8, 8, 7, 5, 2, 7, 7, 6, 7, 4, 6, 7, 4, 5, 2, 5, 6, 4, 4, 3, 5, 5, 5, 4, 2, 6, 3, 4, 3, 5, 3, 4, 3, 6, 2, 7, 5, 10, 4, 3, 6, 4, 4, 3, 2, 4, 4, 7, 7, 4, 3, 3, 9, 7, 2, 6, 6, 4, 3, 3, 8, 7, 5, 4, 2, 6, 4, 3, 9, 5, 5, 5, 6, 5, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with n, repeatedly replace x by x + product of digits of x until reach 0; fecundity = number of steps - 1.

Examples

			1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 -> 102 -> 0 has fecundity 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n]; f[0] = 1; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)

Extensions

More terms from Robert G. Wilson v, Jun 27 2010

A070561 a(0) = 0; for n > 0, a(n) = (fecundity of n) + 1.

Original entry on oeis.org

0, 11, 10, 10, 9, 2, 9, 8, 8, 7, 1, 9, 8, 8, 7, 2, 7, 7, 6, 4, 1, 6, 6, 5, 6, 3, 5, 6, 3, 4, 1, 4, 5, 3, 3, 2, 4, 4, 4, 3, 1, 5, 2, 3, 2, 4, 2, 3, 2, 5, 1, 6, 4, 9, 3, 2, 5, 3, 3, 2, 1, 3, 3, 6, 6, 3, 2, 2, 8, 6, 1, 5, 5, 3, 2, 2, 7, 6, 4, 3, 1, 5, 3, 2, 8, 4, 4, 4, 5, 4, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2002

Keywords

Comments

Start with n, repeatedly replace x by x + product of digits of x until the product of digits reaches 0; fecundity = number of steps - 1.
Equivalently, with A230099 = f, a(n) is the number k of distinct values that are obtained with iterations: n, f(n), f(f(n)), f(f(f(n))), ... until a term of this sequence contains a 0. - Bernard Schott, Jul 31 2023

Examples

			1 -> 2 -> 4 -> 8 -> 16 -> 22 -> 26 -> 38 -> 62 -> 74 ->102 -> 102 -> ... has fecundity 10.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length@FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 1; f[0] = 0; Array[f, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)

Formula

a(n) = 1 iff n positive is in A011540. - Bernard Schott, Jul 31 2023

Extensions

More terms from Robert G. Wilson v, Jun 27 2010

A145280 Fecundity of n-th prime.

Original entry on oeis.org

9, 9, 1, 7, 8, 7, 6, 3, 4, 3, 3, 3, 4, 2, 2, 8, 1, 2, 1, 4, 2, 2, 1, 3, 1, 0, 0, 0, 0, 7, 5, 3, 3, 2, 8, 6, 2, 6, 1, 2, 4, 5, 1, 1, 1, 1, 5, 5, 2, 4, 5, 9, 9, 4, 7, 7, 9, 5, 2, 6, 2, 8, 0, 11, 3, 2, 1, 1, 7, 4, 8, 7, 2, 2, 2, 3, 1, 22, 0, 0, 3, 2, 6, 4, 3, 5, 3, 3, 5, 2, 4, 5, 4, 4, 4, 0, 0, 5, 4, 6, 2, 3, 7, 2, 1
Offset: 1

Views

Author

Keywords

Examples

			7 -> 7+7=14 -> 14+1*4=18 -> 18+1*8=26 -> 26+2*6=38 -> 38+3*8=62 -> 62+6*2=74 -> 74+7*4=102 -> 7 steps to reach a zero digit.
		

Crossrefs

Programs

  • Maple
    P:=proc(i) local a,b,c,ok,k,w,n; for n from 1 by 1 to i do a:=ithprime(n); b:=1; c:=0; ok:=1; while ok=1 do k:=a; w:=1; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w=0 then ok:=0; else c:=c+1; a:=a+w; fi; od; print(c); od; end: P(100);
  • Mathematica
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 2; Array[f@Prime@# &, 105] (* Robert G. Wilson v, Jun 27 2010 *)

Formula

a(n) = A070562(prime(n)). - Michel Marcus, Aug 01 2015

A145279 Fecundity of n-th Fibonacci number.

Original entry on oeis.org

0, 10, 10, 9, 9, 1, 7, 7, 5, 2, 1, 3, 1, 5, 8, 0, 5, 2, 1, 3, 1, 0, 1, 1, 7, 0, 2, 3, 3, 5, 0, 1, 0, 5, 0, 1, 0, 5, 0, 1, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 1, 3, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

Subset of A070562. After the 184th Fibonacci number 127127879743834334146972278486287885163, the fecundity is equal to zero.
The indices of Fibonacci numbers whose fecundity is not zero are {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 26, 27, 28, 29, 31, 33, 35, 37, 39, 42, 43, 53, 54, 55, 56, 57, 58, 78, 80, 85, 87, 97, 125, 184}. - Robert G. Wilson v, Jun 27 2010

Examples

			Fib(6)=8 -> 8+8=16 -> 16+1*6=22 -> 22+2*2=26 -> 26+2*6=38 -> 38+3*8=62 -> 62+6*2=74 -> 74+7*4=102 -> 7 steps to reach a zero digit.
		

Crossrefs

Programs

  • Maple
    P:=proc(i) local a,b,c,d,f,g,ok,k,w,n; d:=0; f:=1; print(d); print(10); for n from 0 by 1 to i do a:=d+f; g:=f; f:=a; d:=g; b:=1; c:=0; ok:=1; while ok=1 do k:=a; w:=1; while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w=0 then ok:=0; else c:=c+1; a:=a+w; fi; od; print(c); od; end: P(200);
  • Mathematica
    f[n_] := Length@ FixedPointList[ # + Times @@ IntegerDigits@# &, n] - 2; Array[f@ Fibonacci@# &, 105, 0] (* Robert G. Wilson v, Jun 27 2010 *)
Showing 1-7 of 7 results.