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

A212813 Number of steps for n to reach 8 under iteration of the map i -> A036288(i), or -1 if 8 is never reached.

Original entry on oeis.org

-1, -1, -1, -1, -1, -1, 1, 0, 2, 1, 2, 1, 3, 2, 3, 3, 4, 3, 3, 2, 3, 3, 3, 2, 3, 4, 2, 2, 4, 3, 4, 3, 4, 3, 4, 3, 5, 4, 5, 2, 5, 4, 5, 4, 2, 5, 3, 2, 4, 4, 4, 4, 3, 2, 5, 3, 4, 4, 5, 4, 5, 4, 3, 4, 4, 5, 5, 4, 3, 4, 5, 4, 4, 3, 3, 3, 4, 4, 4, 3, 4, 5, 5, 4, 4, 6, 5, 4, 4, 3, 4, 3, 5, 5, 4, 3, 6, 5, 4, 4, 5, 4, 4, 3, 4, 4, 4, 3, 5, 4, 6, 4, 5, 4, 5, 4, 3, 5, 4
Offset: 1

Views

Author

N. J. A. Sloane, May 30 2012

Keywords

Comments

It is known that a(n) >= 0 for n >= 7. Bellamy and Cadogan call a(n) the "class number" of n, but this is not a good idea as this term is already overworked.
a(A212911(n)) = n and a(m) < n for m < A212911(n). - Reinhard Zumkeller, May 30 2012

References

  • Bellamy, O. S.; Cadogan, C. C. Subsets of positive integers: their cardinality and maximality properties. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 167--178, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561043 (82b:10006)
  • R. Honsberger, Mathematical Morsels, MAA, 1978, p. 223.

Crossrefs

Programs

  • Haskell
    a212813 n | n < 7     = -1
              | otherwise = fst $ (until ((== 8) . snd))
                                  (\(s, x) -> (s + 1, a036288 x)) (0, n)
    -- Reinhard Zumkeller, May 30 2012
    
  • Maple
    Simple-minded Maple program from N. J. A. Sloane, May 30 2012:
    f:=proc(n) local i,t1; t1:=ifactors(n)[2]; 1+add( t1[i][1]*t1[i][2], i=1..nops(t1)); end; # this is A036288
    g:=proc(n) local i,t1; global f; t1:=n; for i from 1 to 1000 do if t1=8 then RETURN(i-1); fi; t1:=f(t1); od; -1; end; # this is A212813
  • Mathematica
    imax = 11 (* = max term plus 1 *);
    a36288[n_] := If[n == 1, 1, Total[Times @@@ FactorInteger[n]] + 1];
    a[n_] := Module[{i, k}, For[k = n; i = 1, i <= imax, i++, If[k == 8, Return[i - 1]]; k = a36288[k]]; If[n > 6, Print["imax ", imax, " probably too small"]]; -1];
    Array[a, 120] (* Jean-François Alcover, Aug 01 2018 *)
  • PARI
    A212813(n)={ n>8 & for(c=1,9e9,(n=A036288(n))==8 & return(c));(n==7)-(n<7) }  \\ M. F. Hasler, May 30 2012

A359789 Dirichlet inverse of A036288, where A036288(n) = 1 + sopfr(n), where sopfr is the sum of prime divisors with repetition, A001414.

Original entry on oeis.org

1, -3, -4, 4, -6, 18, -8, -4, 9, 28, -12, -40, -14, 38, 39, 4, -18, -63, -20, -64, 53, 58, -24, 64, 25, 68, -18, -88, -30, -253, -32, -4, 81, 88, 83, 216, -38, 98, 95, 104, -42, -347, -44, -136, -144, 118, -48, -88, 49, -175, 123, -160, -54, 180, 127, 144, 137, 148, -60, 820, -62, 158, -198, 4, 149, -535
Offset: 1

Views

Author

Antti Karttunen, Jan 15 2023

Keywords

Crossrefs

Cf. A001414, A036288, A359774 (parity of terms).

Programs

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA036288(n/d) * a(d).

A001414 Integer log of n: sum of primes dividing n (with repetition). Also called sopfr(n).

Original entry on oeis.org

0, 2, 3, 4, 5, 5, 7, 6, 6, 7, 11, 7, 13, 9, 8, 8, 17, 8, 19, 9, 10, 13, 23, 9, 10, 15, 9, 11, 29, 10, 31, 10, 14, 19, 12, 10, 37, 21, 16, 11, 41, 12, 43, 15, 11, 25, 47, 11, 14, 12, 20, 17, 53, 11, 16, 13, 22, 31, 59, 12, 61, 33, 13, 12, 18, 16, 67, 21, 26, 14, 71, 12, 73, 39, 13, 23, 18, 18
Offset: 1

Views

Author

Keywords

Comments

MacMahon calls this the potency of n.
Downgrades the operators in a prime decomposition. E.g., 40 factors as 2^3 * 5 and sopfr(40) = 2 * 3 + 5 = 11.
Consider all ways of writing n as a product of zero, one, or more factors; sequence gives smallest sum of terms. - Amarnath Murthy, Jul 07 2001
a(n) <= n for all n, and a(n) = n iff n is 4 or a prime.
Look at the graph of this sequence. At the lower edge of the logarithmic scatterplot there is a set of fuzzy but unmistakable diagonal fringes, sloping toward the southeast. Their spacing gradually increases, and their slopes gradually decrease; they are more distinct toward the lower edge of the range. Is any explanation known? - Allan C. Wechsler, Oct 11 2015
For n >= 2, the glb and lub are: 3 * log(n) / log(3) <= a(n) <= n, where the lub occurs when n = 3^k, k >= 1. (Jakimczuk 2012) - Daniel Forgues, Oct 12 2015
Except for the initial term, row sums of A027746. - M. F. Hasler, Feb 08 2016
Atanassov proves that a(n) <= A065387(n) - n. - Charles R Greathouse IV, Dec 06 2016
From Robert G. Wilson v, Aug 15 2022: (Start)
Differs from A337310 beginning with n at 64, 192, 256, 320, 448, 512, ..., .
The number of terms which equal k is A000607(k).
The first occurrence of k>1 is A056240(k).
The last occurrence of k>1 is A000792(k).
The Amarnath Murthy comment of Jul 07 2001 is a result of the fundamental theorem of arithmetic.
(End)

Examples

			a(24) = 2+2+2+3 = 9.
a(30) = 10: 30 can be written as 30, 15*2, 10*3, 6*5, 5*3*2. The corresponding sums are 30, 17, 13, 11, 10. Among these 10 is the least.
		

References

  • K. Atanassov, New integer functions, related to ψ and σ functions. IV., Bull. Number Theory Related Topics 12 (1988), pp. 31-35.
  • Amarnath Murthy, Generalization of Partition function and introducing Smarandache Factor Partition, Smarandache Notions Journal, Vol. 11, 1-2-3, Spring-2000.
  • Amarnath Murthy and Charles Ashbacher, Generalized Partitions and Some New Ideas on Number Theory and Smarandache Sequences, Hexis, Phoenix; USA 2005. See Section 1.4.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 89.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A000607(n) gives the number of values of k for which A001414(k) = n.
Cf. A036349 (indices of even terms), A356163 (their char. function), A335657 (indices of odd terms), A289142 (of multiples of 3), A373371 (their char. function).
For sum of squares of prime factors see A067666, for cubes see A224787.
Other completely additive sequences with primes p mapped to a function of p include: A001222 (with a(p)=1), A056239 (with a(p)=primepi(p)), A059975 (with a(p)=p-1), A064097 (with a(p)=1+a(p-1)), A113177 (with a(p)=Fib(p)), A276085 (with a(p)=p#/p), A341885 (with a(p)=p*(p+1)/2), A373149 (with a(p)=prevprime(p)), A373158 (with a(p)=p#).
For other completely additive sequences see the cross-references in A104244.

Programs

  • Haskell
    a001414 1 = 0
    a001414 n = sum $ a027746_row n
    -- Reinhard Zumkeller, Feb 27 2012, Nov 20 2011
    
  • Magma
    [n eq 1 select 0 else (&+[j[1]*j[2]: j in Factorization(n)]): n in [1..100]]; // G. C. Greubel, Jan 10 2019
  • Maple
    A001414 := proc(n) add( op(1,i)*op(2,i),i=ifactors(n)[2]) ; end proc:
    seq(A001414(n), n=1..100); # Peter Luschny, Jan 17 2011
  • Mathematica
    a[n_] := Plus @@ Times @@@ FactorInteger@ n; a[1] = 0; Array[a, 78] (* Ray Chandler, Nov 12 2005 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); sum(k=1,matsize(f)[1],f[k,1]*f[k,2]))
    
  • PARI
    A001414(n) = (n=factor(n))[,1]~*n[,2] \\ M. F. Hasler, Feb 07 2009
    
  • Python
    from sympy import factorint
    def A001414(n):
        return sum(p*e for p,e in factorint(n).items()) # Chai Wah Wu, Jan 08 2016
    
  • Sage
    [sum(factor(n)[j][0]*factor(n)[j][1] for j in range(0,len(factor(n)))) for n in range(1,79)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

If n = Product p_j^k_j then a(n) = Sum p_j * k_j.
Dirichlet g.f. f(s)*zeta(s), where f(s) = Sum_{p prime} p/(p^s-1) = Sum_{k>0} primezeta(k*s-1) is the Dirichlet g.f. for A120007. Totally additive with a(p^e) = p*e. - Franklin T. Adams-Watters, Jun 02 2006
For n > 1: a(n) = Sum_{k=1..A001222(n)} A027746(n,k). - Reinhard Zumkeller, Aug 27 2011
Sum_{n>=1} (-1)^a(n)/n^s = ((2^s + 1)/(2^s - 1))*zeta(2*s)/zeta(s), if Re(s)>1 and 0 if s=1 (Alladi and Erdős, 1977). - Amiram Eldar, Nov 02 2020
a(n) >= k*log(n), where k = 3/log(3). This bound is sharp. - Charles R Greathouse IV, Jul 28 2025

A212814 a(n) = number of integers k >= 7 such that A212813(k) = n.

Original entry on oeis.org

1, 3, 11, 2632
Offset: 0

Views

Author

N. J. A. Sloane, May 30 2012. I added Hans Havermann's comment May 31 2012

Keywords

Comments

The next term may be very large, see A212815.
Comment from Hans Havermann, Sequence Fans Mailing List, May 31 2012: The 11 numbers k for which A212813(k)=2 are 9, 11, 14, 20, 24, 27, 28, 40, 45, 48, 54. Empirically, it appears that 2632 is the sum of the number of prime partitions (A000607) of the eleven numbers 8, 10, 13, 19, 23, 26, 27, 39, 44, 47, 53. I hesitate turning this into a conjecture only because the 3 numbers k for which A212813(k)=1 are 7, 10, 12 and the sum of the number of prime partitions of the three numbers 6, 9, 11 is twelve, not eleven (the extra partition being, I think, 2+2+2).

Examples

			The 11 numbers k for which A212813(k)=2 are 9, 11, 14, 20, 24, 27, 28, 40, 45, 48, 54 (see A212816).
		

References

  • Bellamy, O. S.; Cadogan, C. C. Subsets of positive integers: their cardinality and maximality properties. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 167--178, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561043 (82b:10006)

Crossrefs

A212815 a(n) = largest number k >= 7 such that A212813(k) = n.

Original entry on oeis.org

8, 12, 54, 258280326
Offset: 0

Views

Author

N. J. A. Sloane, May 30 2012

Keywords

Comments

Bellamy and Cadogan say that a(4) = 2*3^86093441, which is too large to include here.

References

  • Bellamy, O. S.; Cadogan, C. C. Subsets of positive integers: their cardinality and maximality properties. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 167--178, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561043 (82b:10006)

Crossrefs

A074372 1 + the sum of the distinct primes dividing n.

Original entry on oeis.org

1, 3, 4, 3, 6, 6, 8, 3, 4, 8, 12, 6, 14, 10, 9, 3, 18, 6, 20, 8, 11, 14, 24, 6, 6, 16, 4, 10, 30, 11, 32, 3, 15, 20, 13, 6, 38, 22, 17, 8, 42, 13, 44, 14, 9, 26, 48, 6, 8, 8, 21, 16, 54, 6, 17, 10, 23, 32, 60, 11, 62, 34, 11, 3, 19, 17, 68, 20, 27, 15, 72, 6, 74, 40, 9, 22, 19, 19, 80, 8
Offset: 1

Views

Author

W. Neville Holmes, Aug 22 2002

Keywords

Comments

Number of maximal subgroups in dihedral group of order 2n. - Eric M. Schmidt, Oct 14 2014

Examples

			2: 3 (1+2); 3: 4 (1+3); 4: 3 (1+2); 5: 6 (1+5); 6: 6 (1+2+3); ...
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local F: F:=convert(factorset(n),list): 1+sum(F[j],j=1..nops(F)) end: seq(a(n),n=1..90); # Emeric Deutsch, Mar 12 2005
  • Mathematica
    Rest[ Range[0, 20] CoefficientList[ Log[E, Series[(1/(1 - x)) Product[ 1/(1 - x^Prime[j]), {j, 200}], {x, 0, 20}]], x]] (* Robert G. Wilson v, Aug 16 2011 *)
    Join[{1},Array[1+Total[FactorInteger[#][[All,1]]]&,80,2]] (* Harvey P. Dale, Sep 18 2022 *)

Formula

a(n) = 1 + A008472(n).

Extensions

Corrected and extended by Emeric Deutsch, Mar 12 2005
Showing 1-6 of 6 results.