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 416 results. Next

A075860 a(n) is the fixed point reached when the map x -> A008472(x) is iterated, starting from x = n, with the convention a(1)=0.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 3, 2, 2, 17, 5, 19, 7, 7, 13, 23, 5, 5, 2, 3, 3, 29, 7, 31, 2, 3, 19, 5, 5, 37, 7, 2, 7, 41, 5, 43, 13, 2, 5, 47, 5, 7, 7, 7, 2, 53, 5, 2, 3, 13, 31, 59, 7, 61, 3, 7, 2, 5, 2, 67, 19, 2, 3, 71, 5, 73, 2, 2, 7, 5, 5, 79, 7, 3, 43, 83, 5, 13, 2, 2, 13, 89
Offset: 1

Views

Author

Joseph L. Pe, Oct 15 2002

Keywords

Comments

For n>1, the sequence reaches a fixed point, which is prime.
From Robert Israel, Mar 31 2020: (Start)
a(n) = n if n is prime.
a(n) = n/2 + 2 if n is in A108605.
a(n) = n/4 + 2 if n is in 4*A001359. (End)

Examples

			Starting with 60 = 2^2 * 3 * 5 as the first term, add the prime factors of 60 to get the second term = 2 + 3 + 5 = 10. Then add the prime factors of 10 = 2 * 5 to get the third term = 2 + 5 = 7, which is prime. (Successive terms of the sequence will be equal to 7.) Hence a(60) = 7.
		

Crossrefs

Cf. A008472 (sum of prime divisors of n), A029908.

Programs

  • Maple
    f:= proc(n) option remember;
      if isprime(n) then n
      else procname(convert(numtheory:-factorset(n), `+`))
      fi
    end proc:
    f(1):= 0:
    map(f, [$1..100]); # Robert Israel, Mar 31 2020
  • Mathematica
    f[n_] := Module[{a}, a = n; While[ !PrimeQ[a], a = Apply[Plus, Transpose[FactorInteger[a]][[1]]]]; a]; Table[f[i], {i, 2, 100}]
    (* Second program: *)
    a[n_] := If[n == 1, 0, FixedPoint[Total[FactorInteger[#][[All, 1]]]&, n]];
    Array[a, 100] (* Jean-François Alcover, Apr 01 2020 *)
  • PARI
    fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
    a(n) = if (n==1, 0, fp(n, 0)); \\ Michel Marcus, Sep 02 2023
  • Python
    from sympy import primefactors
    def a(n, pn):
        if n == pn:
            return n
        else:
            return a(sum(primefactors(n)), n)
    print([a(i, None) for i in range(1, 100)]) # Gleb Ivanov, Nov 05 2021
    

Extensions

Better description from Labos Elemer, Apr 09 2003
Name clarified by Michel Marcus, Sep 02 2023

A323171 Numerator of the average of distinct prime factors of n (A008472(n)/A001221(n)).

Original entry on oeis.org

2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 9, 4, 2, 17, 5, 19, 7, 5, 13, 23, 5, 5, 15, 3, 9, 29, 10, 31, 2, 7, 19, 6, 5, 37, 21, 8, 7, 41, 4, 43, 13, 4, 25, 47, 5, 7, 7, 10, 15, 53, 5, 8, 9, 11, 31, 59, 10, 61, 33, 5, 2, 9, 16, 67, 19, 13, 14, 71, 5, 73, 39, 4, 21, 9, 6, 79, 7, 3, 43, 83, 4, 11, 45, 16, 13, 89, 10, 10, 25, 17, 49, 12, 5
Offset: 2

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Examples

			Fractions begins with 2, 3, 2, 5, 5/2, 7, 2, 3, 7/2, 11, 5/2, 13, ...
		

Crossrefs

Cf. A323172 (denominators).

Programs

  • Mathematica
    a[n_] := Numerator[Mean[FactorInteger[n][[;; , 1]]]]; Array[a, 100, 2] (* Amiram Eldar, Sep 17 2024 *)
  • PARI
    A008472(n) = vecsum(factor(n)[, 1]); \\ From A008472
    A323171(n) = (numerator(A008472(n)/omega(n)));

A323172 Denominator of the average of distinct prime factors of n (A008472(n)/A001221(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Crossrefs

Cf. A323171 (numerators).

Programs

  • Mathematica
    a[n_] := Denominator[Mean[FactorInteger[n][[;; , 1]]]]; Array[a, 100, 2] (* Amiram Eldar, Sep 17 2024 *)
  • PARI
    A008472(n) = vecsum(factor(n)[, 1]); \\ From A008472
    A323172(n) = (denominator(A008472(n)/omega(n)));

A089352 Numbers that are divisible by the sum of their distinct prime factors (A008472).

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 30, 31, 32, 37, 41, 43, 47, 49, 53, 59, 60, 61, 64, 67, 70, 71, 73, 79, 81, 83, 84, 89, 90, 97, 101, 103, 105, 107, 109, 113, 120, 121, 125, 127, 128, 131, 137, 139, 140, 149, 150, 151, 157, 163, 167, 168, 169, 173
Offset: 1

Views

Author

Ramin Naimi (rnaimi(AT)oxy.edu), Dec 26 2003

Keywords

Comments

The Koninck & Luca bound of x / exp(c(1 + o(1))sqrt(log x log log x)) on A158804 applies equally to this sequence. - Charles R Greathouse IV, Sep 08 2012

Examples

			84=2*2*3*7 is divisible by 2+3+7.
		

Crossrefs

Cf. A008472 (sopf).
Different from A071139.

Programs

  • Mathematica
    primeDivisors[n_] := Select[Divisors[n], PrimeQ]; primeSumDivQ[n_] := 0 == Mod[n, Apply[Plus, primeDivisors[n]]]; Select[Range[2, 300], primeSumDivQ]
    Select[Range[2, 175], Divisible[#, Plus @@ First /@ FactorInteger[#]] &] (* Jayanta Basu, Aug 13 2013 *)
  • PARI
    is(n)=my(f=factor(n)[,1]);n%sum(i=1,#f,f[i])==0 \\ Charles R Greathouse IV, Feb 01 2013

Extensions

Name edited by Michel Marcus, Jul 15 2020

A075657 Numbers n such that sum of digits (A007953) is a divisor of sum of prime divisors (A008472).

Original entry on oeis.org

2, 3, 5, 7, 10, 42, 70, 84, 91, 100, 104, 110, 114, 115, 130, 143, 148, 154, 160, 170, 182, 185, 212, 215, 221, 222, 228, 230, 234, 238, 250, 266, 295, 304, 312, 326, 336, 372, 402, 412, 425, 437, 460, 468, 485, 494, 516, 555, 558, 583, 700, 702, 721, 730
Offset: 1

Views

Author

Floor van Lamoen, Sep 23 2002 and Sep 30 2002

Keywords

Examples

			digsum(10) = 1 + 0 = 1, PrimeDivisors(10) = PrimeDivisors(2 *5) = {2,5} and sopf(10) = 2 + 5 = 7 = 7*1.
digsum(154) = 1 + 5 + 4 = 10, PrimeDivisors(154) = PrimeDivisors(2 * 7 * 11) = {2,7,11} and sopf(154) = 2+7+11 = 20 = 2*10.
		

Programs

  • Magma
    [m:m in [2..730]| &+PrimeDivisors(m) mod &+Intseq(m) eq 0]; // Marius A. Burtea, Jul 11 2019
  • Mathematica
    Select[Range[2,800],Divisible[Total[Select[Divisors[#],PrimeQ]], Total[ IntegerDigits[#]]]&] (* Harvey P. Dale, Sep 23 2012 *)

A134382 a(n) is the smallest number k larger than a(n-1) such that n*d(k)*sopf(k)=sigma(k), where d is the number of divisors (A000005) and sopf the sum of prime factors without repetition (A008472).

Original entry on oeis.org

20, 140, 464, 660, 1276, 1365, 2204, 2508, 2805, 2907, 5590, 5698, 5742, 6006, 7395, 8680, 14645, 15052, 18875, 19170, 19740, 23871, 34579, 34804, 35164, 35244, 35934, 38121, 106805, 114953, 261536, 503082
Offset: 1

Views

Author

Enoch Haga, Oct 23 2007

Keywords

Comments

Sequence suggested by Puzzle 419 in Carlos Rivera's The Prime Puzzles & Problems Connection.
For n=33, the search for terms k that satisfy 33*d(k)*sopf(k)=sigma(k), without being greater than a(32), gives 21070, 25585, 30702, 36120, 41710, 49256, 52269, 68906, 74692, 92785, 95702, 111342, 117626, 383086 with no other terms up to 10^9. So this sequence might well be complete. - Michel Marcus, Oct 02 2019
I confirm that the solutions for n=33 listed above are complete, thus the sequence stops at n=32. - Max Alekseyev, Sep 18 2024

Crossrefs

Subsequence of A070222. - R. J. Mathar, Feb 05 2010

Programs

  • Maple
    A008472 := proc(n) local divs,i ; if n = 1 then 0; else divs := ifactors(n)[2] ; add( op(1,i),i=divs) ; fi ; end: A134382 := proc(n) option remember ; local k,kmin ; if n = 1 then kmin := 1 ; else kmin := procname(n-1)+1 ; fi ; for k from kmin do if numtheory[sigma](k) = n* numtheory[tau](k)*A008472(k) then RETURN(k) ; fi ; od: end: for n from 1 to 30 do print( A134382(n)) ; od: # R. J. Mathar, Nov 16 2007, Jun 24 2009
  • Mathematica
    sopf[1] = 0; sopf[n_] := Total[FactorInteger[n][[All, 1]]]; a[n_] := a[n] = For[k = If[n == 1, 1, a[n-1] + 1], True, k++, If[DivisorSigma[1, k] == n*DivisorSigma[0, k]*sopf[k], Return[k]]]; Table[Print[a[n]]; a[n], {n, 1, 32}] (* Jean-François Alcover, Sep 12 2013 *)
  • PARI
    lista(nn) = {lasta = 2; for (n=1, nn, k = lasta; while ((f = factor(k)) && (n*numdiv(k)*sum(j=1,#f~,f[j,1]) != sigma(k)), k++); print1(k, ", "); lasta = k;);} \\ Michel Marcus, Feb 25 2016

Formula

a(n) > a(n-1): n*A000005(a(n))*A008472(a(n)) = A000203(a(n)). - R. J. Mathar, Nov 16 2007, Jun 24 2009

Extensions

Edited by R. J. Mathar, Nov 16 2007
A-number in formula and Maple program corrected by R. J. Mathar, Jun 24 2009
a(32) from R. J. Mathar, Feb 05 2010
full,fini keywords added by Max Alekseyev, Sep 18 2024

A058977 For a rational number p/q let f(p/q) = sum of distinct prime factors (A008472) of p+q divided by number of distinct prime factors (A001221) of p+q; 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.

Original entry on oeis.org

2, 3, 2, 5, 7, 7, 2, 3, 3, 11, 7, 13, 11, 4, 2, 17, 7, 19, 3, 5, 4, 23, 7, 5, 17, 3, 11, 29, 13, 31, 2, 7, 5, 6, 7, 37, 23, 8, 3, 41, 4, 43, 4, 4, 3, 47, 7, 7, 3, 10, 17, 53, 7, 8, 11, 11, 7, 59, 13, 61, 6, 5, 2, 9, 19, 67, 5, 13, 17, 71, 7, 73, 41, 4, 23, 9, 6, 79, 3, 3, 4, 83, 4, 11, 47
Offset: 1

Views

Author

N. J. A. Sloane, Jan 14 2001

Keywords

Comments

A247462 gives number of iterations needed to reach a(n). - Reinhard Zumkeller, Sep 17 2014

Examples

			f(5/1) = 5/2 and f(5/2) = 7, so a(5)=7.
		

Crossrefs

Programs

  • Haskell
    import Data.Ratio ((%), numerator, denominator)
    a058977 = numerator . until ((== 1) . denominator) f . f . fromIntegral
       where f x = a008472 z % a001221 z
                   where z = numerator x + denominator x
    -- Reinhard Zumkeller, Aug 29 2014
    
  • Mathematica
    nxt[n_]:=Module[{s=Numerator[n]+Denominator[n]},Total[Transpose[ FactorInteger[ s]][[1]]]/PrimeNu[s]]; Table[NestWhile[nxt,nxt[n],!IntegerQ[#]&],{n,90}] (* Harvey P. Dale, Mar 15 2013 *)
  • PARI
    f2(p,q) = my(f=factor(p+q)[,1]~); vecsum(f)/#f;
    f1(r) = f2(numerator(r), denominator(r));
    loop(list) = {my(v=Vecrev(list)); for (i=2, #v, if (v[i] == v[1], return(1)););}
    a(n) = {my(ok=0, m=f2(n,1), list=List()); while(denominator(m) != 1, m = f1(m); listput(list, m); if (loop(list), return (0));); return(m);} \\ Michel Marcus, Feb 09 2022

Extensions

More terms from Matthew Conroy, Apr 18 2001

A068936 Numbers having the sum of distinct prime factors not greater than the sum of exponents in prime factorization, A008472(k) <= A001222(k).

Original entry on oeis.org

1, 4, 8, 16, 27, 32, 48, 64, 72, 81, 96, 108, 128, 144, 162, 192, 216, 243, 256, 288, 320, 324, 384, 432, 486, 512, 576, 640, 648, 729, 768, 800, 864, 972, 1024, 1152, 1280, 1296, 1458, 1536, 1600, 1728, 1792, 1944, 2000, 2048, 2187, 2304, 2560, 2592, 2916
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 08 2002

Keywords

Comments

The product of any two terms is also a term. - Amiram Eldar, May 14 2025

Examples

			a(5) = 27 = 3^3, 3 = 3.
a(10) = 81 = 3^4, 3 < 4.
a(100) = 16000 = 2^7 * 5^3,  2+5 < 7+3.
a(1000) = 10321920 = 2^15 * 3^2 * 5 * 7, 2+3+5+7 < 15+2+1+1.
		

Crossrefs

Programs

  • Haskell
    a068936 n = a068936_list !! (n-1)
    a068936_list = [x | x <- [1..], a008472 x <= a001222 x]
    -- Reinhard Zumkeller, Nov 10 2013
    
  • Mathematica
    fQ[n_] := Block[{f = FactorInteger@n}, Plus @@ Last /@ f >= Plus @@ First /@ f]; Select[ Range@3000, fQ@ # &] (* Robert G. Wilson v, Jan 16 2006 *)
    Select[Range@ 3000, First@ Differences@ Map[Total, Transpose@ FactorInteger@ #] >= 0 &] (* Michael De Vlieger, Dec 08 2016 *)
  • PARI
    isok(k) = {my(f = factor(k)); vecsum(f[,1]) <= bigomega(f);} \\ Amiram Eldar, May 14 2025

Extensions

More terms from Robert G. Wilson v, Jan 16 2006

A076387 Numbers n such that sum of digits in base 9 is a divisor of sum of prime divisors (A008472).

Original entry on oeis.org

2, 3, 5, 7, 9, 21, 27, 65, 69, 70, 81, 84, 90, 110, 123, 126, 130, 133, 154, 189, 222, 228, 243, 252, 259, 264, 327, 329, 333, 340, 342, 343, 350, 365, 372, 381, 402, 434, 450, 516, 528, 580, 588, 618, 621, 650, 684, 729, 730, 731, 738, 740, 741, 756, 765, 774
Offset: 1

Views

Author

Floor van Lamoen, Oct 08 2002

Keywords

Comments

The sequence is infinite because, for m = 9^k, k >= 0, digsum(m_9) = 1. - Marius A. Burtea, Jul 10 2019

Examples

			21 = 23_9, digsum(23_9) = 5, PrimeDivisors(21) = {3, 7}, sopf(21) = 3+7 = 10 = 5*2.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..800]| &+PrimeDivisors(n) mod &+Intseq(n,9) eq 0] ; // Marius A. Burtea, Jul 10 2019
  • Maple
    A076387 := proc(n) local i,j,t,t1, sod, sopd; t := NULL; for i from 2 to n do t1 := i; sod := 0; while t1 <> 0 do sod := sod + (t1 mod 9); t1 := floor(t1/9); od; sopd := 0; j := 1; while ithprime(j) <= i do if i mod ithprime(j) = 0 then sopd := sopd+ithprime(j); fi; j := j+1; od; if sopd mod sod = 0 then t := t,i; fi; od; t; end;
  • PARI
    {for(ixp=2,783,
    casi=ixp;cvst=0;dsu=0;M=factor(ixp);smt=0;
    for(i=1,matsize(M)[1],smt=smt+M[i, 1]);
    while(casi!=0,
    cvd=casi%9;dsu=dsu+cvd;casi=(casi-cvd)/9);
    if(smt%dsu==0,print1(ixp,", ")))} \\ Douglas Latimer, May 08 2012
    

A068938 Numbers having the sum of distinct prime factors greater than the sum of exponents in prime factorization, A008472(n)>A001222(n).

Original entry on oeis.org

2, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 08 2002

Keywords

Examples

			12 is included because 12 = 2^2 * 3^1 and 2+3 > 2+1.
		

Crossrefs

Programs

  • Mathematica
    sdfQ[n_]:=Module[{fi=Transpose[FactorInteger[n]]},Total[fi[[1]]] > Total[ fi[[2]]]]; Select[Range[80],sdfQ] (* Harvey P. Dale, Jul 23 2013 *)

Extensions

More terms from David Wasserman, Jun 17 2002
Showing 1-10 of 416 results. Next