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-10 of 24 results. Next

A250030 a(n) is the number of iterations of A008474 needed to reach 5, starting at n, where A008474(Product p_i^e_i) = Sum(p_i+e_i).

Original entry on oeis.org

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

Views

Author

Ivan N. Ianakiev, Nov 11 2014

Keywords

Comments

If the canonical representation of m is Product(p(i)^k(i)), where p(i) is the i-th prime and k(i) is its exponent, then A008474(m) equals Sum(p(i)+k(i)).
Conjecture 1: for m > 4, by iterating the map m -> A008474(m) one always reaches 5. Tested for m up to 320000.
a(n) = -1 in the cases (if such exist) where the iteration acting on n does not reach 5. - Ivan N. Ianakiev, Jun 03 2015
a(A247095(n)) = n and a(m) != n for m < A247095(n). - Reinhard Zumkeller, Nov 18 2014
Conjecture 2: Let S(n) be the sum of the first a(n) numbers in the n-to-5 orbit, i.e., the sum of all the numbers in the orbit without 5. Except for n in [8,9], S(n) is not divisible by n. Verified for n up to 10^6. - Ivan N. Ianakiev, May 06 2015
From Ivan N. Ianakiev, Aug 12 2015: (Start)
Proof outline for Conjecture 1:
1. a(n) < n is true for:
a) all composite numbers n such that A001221(n) = 1 in the cases where the exponent of the prime is greater than 2,
b) all composite numbers n such that A001221(n) = 2 in the cases where one of the exponents of the primes is greater than 1, and
c) all composite numbers n such that A001221(n) > 2, the smallest of which is 30 = 2^1*3^1*5^1.
2. a(a(n)) < n is true for all primes p such that p+1 equals a composite number handled in item 1 above.
3. The only thing needed to complete the proof is to exhaustively confirm the conjecture for all numbers in [5, 29] that were not handled in items 1 and 2 above, i.e., 5, 6, 8, 9, 10, 11, 13, 14, 15, 21, 22, 25, 26. (End)

Examples

			3 iterations are needed to start at 11 and finish at 5 (11 -> 12 -> 8 -> 5), therefore a(11) is 3.
Conjecture 2: For n = 11, S(n) = 11 + 12 + 8 = 31, which is not divisible by 11. - _Ivan N. Ianakiev_, May 06 2015
		

Crossrefs

Programs

  • Haskell
    a250030 n = snd $ until ((== 5) . fst)
                      (\(x, s) -> (a008474 x, s + 1)) (a008474 n, 1)
    -- Reinhard Zumkeller, Nov 18 2014
    
  • Maple
    f:= n -> convert(map(convert,ifactors(n)[2],`+`),`+`):
    a:= proc(n) option remember;
    if n = 5 then 0 else 1+procname(f(n)) fi
    end proc:
    4, seq(a(n),n=6..200); # Robert Israel, May 11 2015
  • Mathematica
    trajLen={0};Do[lst={};g[n_]:=Total[Flatten[FactorInteger[n]]];While[n>5,n=g[n];AppendTo[lst,n]];AppendTo[trajLen,Length[lst]],{n,6,105}];trajLen
  • PARI
    A008474(n)=my(f=factor(n)); sum(i=1,#f~,f[i,1]+f[i,2])
    a(n)=my(k); while(n!=5, n=A008474(n); k++); k \\ Charles R Greathouse IV, Jun 03 2015

Extensions

a(5) in b-file corrected by Andrew Howroyd, Feb 22 2018

A238764 Numbers m such that A008474(m) divides m.

Original entry on oeis.org

4, 20, 36, 50, 54, 64, 112, 120, 180, 192, 210, 220, 240, 270, 288, 300, 364, 392, 425, 432, 448, 450, 504, 528, 550, 560, 624, 648, 729, 748, 750, 756, 792, 858, 918, 924, 936, 972, 975, 988, 1040, 1134, 1188, 1190, 1210, 1274, 1280, 1300, 1326, 1372, 1400, 1428, 1440, 1456, 1472, 1539
Offset: 1

Views

Author

Ivan N. Ianakiev, Mar 05 2014

Keywords

Comments

If m = Product (p_i ^ a_i) then Sum (p_i + a_i) divides m.

Examples

			A008474(20) = 10 and 10 is a divisor of 20.
		

Crossrefs

Cf. A008474.

Programs

  • Mathematica
    Select[Range[2000], Mod[#, Plus @@ Flatten@ FactorInteger@ #] == 0 &] (* Giovanni Resta, Mar 05 2014 *)

A109496 a(n) is the first integer k for which b(b(...b(n)...))=5, where the transformation b(m), the m-th term of A008474, is taken k-1 times.

Original entry on oeis.org

1, 4, 3, 2, 2, 3, 4, 3, 6, 5, 4, 5, 4, 3, 5, 4, 4, 5, 4, 3, 4, 5, 5, 4, 8, 7, 5, 4, 6, 5, 6, 3, 6, 5, 4, 5, 6, 5, 7, 6, 5, 6, 5, 4, 3, 4, 6, 4, 4, 3, 4, 7, 4, 7, 7, 6, 8, 7, 7, 3, 5, 6, 7, 6, 5, 5, 5, 4, 8, 7, 5, 4, 5, 5, 5, 4, 4, 6, 7, 6, 4, 6, 6, 5, 7, 6, 6, 5, 4, 7, 6, 5, 5, 4, 5, 5, 6, 5, 7, 6, 4, 5, 5, 4, 6
Offset: 5

Views

Author

Y. Kallus (yoav(AT)rice.edu), Aug 29 2005

Keywords

Examples

			a(6)=4 because b(6=2^1*3^1)=7, b(7=7^1)=8, b(8=2^3)=5, so we apply b(m) 3 times to get 5.
		

Crossrefs

Cf. A008474.

Programs

  • Mathematica
    f[n_] := Sum[FactorInteger[n][[i]][[1]] + FactorInteger[n][[i]][[2]], { i, Length[FactorInteger[n]]}] g[t_, n_] := If[t == 1, n, f[g[t - 1, n]]]; a[n_] := Position[Array[g[ #, n] &, 100], 5, {1}, 1][[1, 1]]

A138682 a(n) = least number m such that A008474(m) = n.

Original entry on oeis.org

2, 3, 8, 5, 6, 7, 10, 15, 14, 11, 30, 13, 22, 33, 26, 17, 66, 19, 34, 51, 38, 23, 102, 95, 46, 69, 184, 29, 138, 31, 58, 87, 62, 93, 174, 37, 186, 217, 74, 41, 296, 43, 82, 123, 86, 47, 246, 215, 94, 141, 376, 53, 282, 329, 106, 159, 424, 59, 318, 61, 118, 177, 122, 183
Offset: 3

Views

Author

Zak Seidov, Mar 26 2008

Keywords

Crossrefs

Cf. A008474.

A159076 A008474(n) + 2.

Original entry on oeis.org

2, 5, 6, 6, 8, 9, 10, 7, 7, 11, 14, 10, 16, 13, 12, 8, 20, 10, 22, 12, 14, 17, 26, 11, 9, 19, 8, 14, 32, 15, 34, 9, 18, 23, 16, 11, 40, 25, 20, 13, 44, 17, 46, 18, 13, 29, 50, 12, 11, 12, 24, 20, 56, 11, 20, 15, 26, 35, 62, 16, 64, 37, 15, 10, 22, 21, 70, 24, 30, 19, 74, 12, 76, 43
Offset: 1

Views

Author

Jaroslav Krizek, Apr 04 2009

Keywords

Comments

The numbers can be constructed from the standard prime factorization n = Product (q_k^e_k), including a factor with q=1, then a(n) = Sum (q_k + e_k).

Examples

			For n=10=1^1*2^1*5^1 the a(10)=1+1+2+1+5+1=11.
		

Crossrefs

Cf.: A008474.

Extensions

Edited by R. J. Mathar, Apr 06 2009

A056911 Odd squarefree numbers.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 29, 31, 33, 35, 37, 39, 41, 43, 47, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 101, 103, 105, 107, 109, 111, 113, 115, 119, 123, 127, 129, 131, 133, 137, 139, 141, 143, 145, 149, 151
Offset: 1

Views

Author

James Sellers, Jul 07 2000

Keywords

Comments

From Daniel Forgues, May 27 2009: (Start)
For any prime p, there are as many squarefree numbers having p as a factor as squarefree numbers not having p as a factor amongst all the squarefree numbers (one-to-one correspondence, both cardinality aleph_0).
E.g. there are as many even squarefree numbers as there are odd squarefree numbers.
For any prime p, the density of squarefree numbers having p as a factor is 1/p of the density of squarefree numbers not having p as a factor.
E.g. the density of even squarefree numbers is 1/p = 1/2 of the density of odd squarefree numbers (which means that 1/(p + 1) = 1/3 of the squarefree numbers are even and p/(p + 1) = 2/3 are odd). As a consequence the n-th even squarefree number is very nearly p = 2 times the n-th odd squarefree number (which means that the n-th even squarefree number is very nearly (p + 1) = 3 times the n-th squarefree number while the n-th odd squarefree number is very nearly (p + 1)/p = 3/2 the n-th squarefree number).
For any prime p, the n-th squarefree number not divisible by p is: n * (1 + 1/p) * zeta(2) + O(n^(1/2)) = n * (1 + 1/p) * (Pi^2 / 6) + O(n^(1/2)) (End)

Examples

			The exponents in the prime factorization of 15 are all equal to 1, so 15 appears here. The number 75 does not appear in this sequence, as it is divisible by the square number 25.
		

Crossrefs

Subsequence of A005117 and A036537.
Equals A039956/2.
Cf. A238711 (subsequence).

Programs

  • Haskell
    a056911 n = a056911_list !! (n-1)
    a056911_list = filter ((== 1) . a008966) [1,3..]
    -- Reinhard Zumkeller, Aug 27 2011
    
  • Magma
    [n: n in [1..151 by 2] | IsSquarefree(n)]; // Bruno Berselli, Mar 03 2011
    
  • Mathematica
    Select[Range[1,151,2],SquareFreeQ] (* Ant King, Mar 17 2013 *)
  • PARI
    is(n)=n%2 && issquarefree(n) \\ Charles R Greathouse IV, Mar 26 2013
    
  • PARI
    list(lim)=my(v=List()); forsquarefree(k=1,lim\1, if(k[1]%2, listput(v,k[1]))); Vec(v) \\ Charles R Greathouse IV, Jan 14 2025

Formula

A123314(A100112(a(n))) > 0. - Reinhard Zumkeller, Sep 25 2006
a(n) = n * (3/2) * zeta(2) + O(n^(1/2)) = n * (Pi^2 / 4) + O(n^(1/2)). - Daniel Forgues, May 27 2009
A008474(a(n)) * A000035(a(n)) = 1. - Reinhard Zumkeller, Aug 27 2011
Sum_{n>=1} 1/a(n)^s = ((2^s)* zeta(s))/((1+2^s)*zeta(2*s)). - Enrique Pérez Herrero, Sep 15 2012 [corrected by Amiram Eldar, Sep 26 2023]

A000026 Mosaic numbers or multiplicative projection of n: if n = Product (p_j^k_j) then a(n) = Product (p_j * k_j).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 6, 6, 10, 11, 12, 13, 14, 15, 8, 17, 12, 19, 20, 21, 22, 23, 18, 10, 26, 9, 28, 29, 30, 31, 10, 33, 34, 35, 24, 37, 38, 39, 30, 41, 42, 43, 44, 30, 46, 47, 24, 14, 20, 51, 52, 53, 18, 55, 42, 57, 58, 59, 60, 61, 62, 42, 12, 65, 66, 67, 68, 69, 70, 71, 36
Offset: 1

Views

Author

Keywords

Comments

a(n) = n if n is squarefree.
a(2n) = 2n if and only if n is squarefree. - Peter Munn, Feb 05 2017

Examples

			24 = 2^3*3^1, a(24) = 2*3*3*1 = 18.
		

References

  • 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

Programs

  • Haskell
    a000026 n = f a000040_list n 1 (0^(n-1)) 1 where
       f _  1 q e y  = y * e * q
       f ps'@(p:ps) x q e y
         | m == 0    = f ps' x' p (e+1) y
         | e > 0     = f ps x q 0 (y * e * q)
         | x < p * p = f ps' 1 x 1 y
         | otherwise = f ps x 1 0 y
         where (x', m) = divMod x p
    a000026_list = map a000026 [1..]
    -- Reinhard Zumkeller, Aug 27 2011
    
  • Maple
    A000026 := proc(n) local e,j; e := ifactors(n)[2]:
    mul(e[j][1]*e[j][2], j=1..nops(e)) end:
    seq(A000026(n), n=1..80); # Peter Luschny, Jan 17 2011
  • Mathematica
    Array[ Times@@Flatten[ FactorInteger[ # ] ]&, 100 ]
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],f[k,1]*f[k,2]))
    
  • PARI
    a(n)=my(f=factor(n)); factorback(f[,1])*factorback(f[,2]) \\ Charles R Greathouse IV, Apr 04 2016
    
  • Python
    from math import prod
    from sympy import factorint
    def a(n): f = factorint(n); return prod(p*f[p] for p in f)
    print([a(n) for n in range(1, 73)]) # Michael S. Branicky, May 27 2021

Formula

n = Product (p_j^k_j) -> a(n) = Product (p_j * k_j).
Multiplicative with a(p^e) = p*e. - David W. Wilson, Aug 01 2001
a(n) = A005361(n) * A007947(n). - Enrique Pérez Herrero, Jun 24 2010
a(A193551(n)) = n and a(m) != n for m < A193551(n). - Reinhard Zumkeller, Aug 27 2011
Sum_{k=1..n} a(k) ~ c * n^2, where c = (zeta(2)^2/2) * Product_{p prime} (1 - 3/p^2 + 2/p^3 + 1/p^4 - 1/p^5) = 0.4175724194... . - Amiram Eldar, Oct 25 2022

Extensions

Example, program, definition, comments and more terms added by Olivier Gérard (02/99).

A035306 List prime factors of each number in order (each prime factor is followed by its power). Start with 1 = {1,1}.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 2, 5, 1, 2, 1, 3, 1, 7, 1, 2, 3, 3, 2, 2, 1, 5, 1, 11, 1, 2, 2, 3, 1, 13, 1, 2, 1, 7, 1, 3, 1, 5, 1, 2, 4, 17, 1, 2, 1, 3, 2, 19, 1, 2, 2, 5, 1, 3, 1, 7, 1, 2, 1, 11, 1, 23, 1, 2, 3, 3, 1, 5, 2, 2, 1, 13, 1, 3, 3, 2, 2, 7, 1, 29, 1, 2, 1, 3, 1, 5, 1, 31, 1, 2, 5, 3, 1, 11, 1, 2
Offset: 1

Views

Author

Keywords

Comments

This entry also serves to show how to factor numbers in various languages.
Memo: in Maple, use ifactors, not ifactor!
Length of n-th row = 2*A001221(n). - Reinhard Zumkeller, Jan 10 2013

Examples

			The table starts as follows:
   n  |  (p, valuation_p(n)) for primes p | n
  ----+---------------------------------------
   1  |  (1, 1),   (row 1, by definition of this sequence)
   2  |  (2, 1),           (i.e.: 2 = 2^1)
   3  |  (3, 1),
   4  |  (2, 2),           (i.e.: 4 = 2^2)
   5  |  (5, 1),
   6  |  (2, 1), (3, 1),   (i.e.: 6 = 2^1 * 3^2)
   7  |  (7, 1),
   8  |  (2, 3),
   9  |  (3, 2),
   10 |  (2, 1), (5, 1),
   11 |  (11, 1),
   12 |  (2, 2), (3, 1),
   13 |  (13, 1),
   14 |  (2, 1), (7, 1),
   15 |  (3, 1), (5, 1),
   16 |  (2, 4),
   17 |  (17, 1),
   18 |  (2, 1), (3, 2),
  ... | ...
		

Crossrefs

Cf. A008474 (row sums, apart from initial row).

Programs

  • Haskell
    import Data.List (transpose)
    a035306 n k = a035306_row n !! (k-1)
    a035306_row 1 = [1,1]
    a035306_row n = concat $ transpose [a027748_row n, a124010_row n]
    a035306_tabf = map a035306_row [1..]
    -- Reinhard Zumkeller, Jan 10 2013
    
  • Magma
    [ Factorization(n) : n in [1..120]];
    
  • Maple
    ListTools[Flatten]([[[1, 1]], seq(op(2..-1, ifactors(n)), n=2..34)], 2); # Peter Luschny, Sep 02 2018
  • Mathematica
    Flatten[ Array[ FactorInteger[ # ]&, 40 ] ]
  • PARI
    upto(n) = {n = max(n, 1); my(res = List([1, 1])); for(i = 2, n, f = factor(i); for(j = 1, #f~, listput(res, f[j, 1]); listput(res, f[j, 2]))); res} \\ David A. Corneth, Sep 02 2018
    
  • PARI
    A035306_row(n)=if(n>1, concat(Col(factor(n))~), [1, 1]) \\ M. F. Hasler, Jun 04 2024
    
  • Python
    A035306_row = lambda n: [x for f in factorint(n).items() for x in f]
    from sympy import factorint # M. F. Hasler, Jun 06 2024

Formula

For 1 <= k <= A001221(n): T(n,2*k-1) = A027748(n,k), T(n,2*k) = A124010(n,k). - Reinhard Zumkeller, Jan 10 2013

A338038 a(n) is the sum of the primes and exponents in the prime factorization of n, but ignoring 1-exponents.

Original entry on oeis.org

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

Views

Author

Michel Marcus, Oct 08 2020

Keywords

Comments

First differs from A106492 for n=64.

Examples

			For n = 18 = 2*3^2, a(18) = 2 + (3+2) = 7.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t;
      add(t[1]+t[2],t=subs(1=0,ifactors(n)[2]));
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 13 2020
  • Mathematica
    a[1] = 0; a[n_] := Plus @@ First /@ (f = FactorInteger[n]) + Plus @@ Select[Last /@ f, # > 1 &]; Array[a, 100] (* Amiram Eldar, Oct 08 2020 *)
  • PARI
    a(n) = my(f=factor(n)); vecsum(f[,1]) + sum(k=1, #f~, if (f[k,2]!=1, f[k,2]));

Formula

a(n) = A008474(n) for powerful numbers (A001694).

A381202 a(n) is the sum of the elements of the set of bases and exponents (including exponents = 1) in the prime factorization of n.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Feb 16 2025

Keywords

Comments

The prime factorization of 1 is the empty set, so a(1) = 0 by convention (empty sum).

Examples

			a(12) = 6 because 12 = 2^2*3^1, the set of these bases and exponents is {1, 2, 3} and 1 + 2 + 3 = 6.
a(31500) = 18 because 31500 = 2^2*3^2*5^3*7^1, the set of these bases and exponents is {1, 2, 3, 5, 7} and 1 + 2 + 3 + 5 + 7 = 18.
		

Crossrefs

Programs

  • Mathematica
    A381202[n_] := If[n == 1, 0, Total[Union[Flatten[FactorInteger[n]]]]];
    Array[A381202, 100]
  • PARI
    a(n) = my(f=factor(n)); vecsum(setunion(Set(f[,1]), Set(f[,2]))); \\ Michel Marcus, Feb 18 2025
Showing 1-10 of 24 results. Next