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

A238525 n modulo sopfr(n), where sopfr(n) is the sum of the prime factors of n, with multiplicity.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 3, 3, 0, 5, 0, 5, 7, 0, 0, 2, 0, 2, 1, 9, 0, 6, 5, 11, 0, 6, 0, 0, 0, 2, 5, 15, 11, 6, 0, 17, 7, 7, 0, 6, 0, 14, 1, 21, 0, 4, 7, 2, 11, 1, 0, 10, 7, 4, 13, 27, 0, 0, 0, 29, 11, 4, 11, 2, 0, 5, 17, 0, 0, 0, 0, 35, 10, 7, 5, 6, 0, 2, 9, 39
Offset: 2

Views

Author

J. Stauduhar, Feb 28 2014

Keywords

Comments

a(A036844(n)) = 0. - Reinhard Zumkeller, Jul 21 2014

Examples

			a(6) = 1, because 6 mod sopfr(6) = 6 mod 5 = 1.
		

Crossrefs

Programs

  • Haskell
    a238525 n = mod n $ a001414 n  -- Reinhard Zumkeller, Jul 21 2014
  • Mathematica
    Table[Mod[n, Apply[Dot, Transpose[FactorInteger[n]]]], {n, 105}] (* Wouter Meeussen, Mar 01 2014 *)
    mms[n_]:=Mod[n,Total[Flatten[Table[#[[1]],#[[2]]]&/@FactorInteger[ n]]]]; Array[mms,90,2] (* Harvey P. Dale, May 25 2016 *)

Formula

a(n) = n mod A001414(n).

A238529 a(0) = a(1) = 0, and for n > 1, a(n) = number of iterations of A238525 (n modulo sopfr(n)) needed to reach either 0 or 1. Here sopfr(n) is the sum of the prime factors of n, with multiplicity, A001414.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 1, 3, 1, 2, 1, 2, 2, 2, 2, 1, 1, 3, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 3, 3, 2, 2, 2, 1, 2, 3, 3, 1, 1, 2, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 2, 1, 2, 3, 2, 1, 3, 1, 3, 1
Offset: 0

Views

Author

J. Stauduhar, Feb 28 2014

Keywords

Comments

Previous name was: Recursive depth of n modulo sopfr(n), where sopfr(n) is the sum of the prime factors of n, with multiplicity.
Indices of records are 0, 2, 8, 22, 166, ... (A238530) - David A. Corneth & Antti Karttunen, Oct 20 2017

Examples

			a(2) = 1, because 2 mod sopfr(2) = 2 mod 2 = 0, and further recursion (0 mod sopfr(0)) is undefined.
a(8) = 2, because 8 mod sopfr(8) = 8 mod 6 = 2, and 2 mod sopfr(2) is defined as above, giving 8 a recursive depth of 2.
		

Crossrefs

Programs

  • Mathematica
    Array[-1 + Length@ NestWhileList[Mod[#, Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ #]] &, #, # > 1 &] &, 105, 0] (* Michael De Vlieger, Oct 20 2017 *)
  • PARI
    A001414(n) = { my(f=factor(n)); sum(k=1, matsize(f)[1], f[k, 1]*f[k, 2]); };
    A238525(n) = (n%A001414(n));
    A238529(n) = if(n<=1,0,1+A238529(A238525(n))); \\ Antti Karttunen, Oct 20 2017
  • Sage
    def a(n):
        d = 0
        while n>1:
            n = n % sum([f[0]*f[1] for f in factor(n)])
            d = d+1
       return d
    # Ralf Stephan, Mar 09 2014
    

Formula

a(0) = a(1) = 0; for n > 1, a(n) = 1 + a(A238525(n)). - Antti Karttunen, Oct 20 2017

Extensions

More terms from Ralf Stephan, Mar 09 2014
Terms a(0) = a(1) = 0 prepended and name changed by Antti Karttunen, Oct 20 2017
Showing 1-2 of 2 results.