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.

Previous Showing 21-24 of 24 results.

A039773 phi(n) is equal to the sum of prime factors and exponents of n-1.

Original entry on oeis.org

5, 34, 66, 130, 490, 18130
Offset: 1

Views

Author

Keywords

Examples

			phi(34)=16, 33=3^1*11^1, 3+1+11+1=16.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[20000],Total[Flatten[FactorInteger[#-1]]]==EulerPhi[#]&] (* Harvey P. Dale, Mar 27 2017 *)

Extensions

Next term if it exists is >= 5*10^7 - Naohiro Nomoto, Jun 24 2001.

A039778 phi(n) is equal to the sum of prime factors and exponents of n+1.

Original entry on oeis.org

32, 38, 54, 56, 84, 20720
Offset: 1

Views

Author

Keywords

Comments

a(7) > 10^8. - Naohiro Nomoto, Jun 21 2001
a(7) > 10^9. - Michel Marcus, Jun 03 2014
a(7) > 10^12. - Giovanni Resta, Jun 11 2016

Examples

			phi(38)=18, 39=3^1*13^1, 3+1+13+1=18.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[30000], EulerPhi[#] == Plus @@ Flatten@ FactorInteger[# + 1] &] (* Giovanni Resta, Jun 11 2016 *)
  • PARI
    isok(n) = (f = factor(n+1)) && (sum(i=1, #f~, f[i,2]) + sum(i=1, #f~, f[i,1]) == eulerphi(n)); \\ Michel Marcus, Jun 03 2014

A343923 If n = Product (p_j^k_j) then a(n) = Sum (abs(p_j-k_j)) (a(1) = 0 by convention).

Original entry on oeis.org

0, 1, 2, 0, 4, 3, 6, 1, 1, 5, 10, 2, 12, 7, 6, 2, 16, 2, 18, 4, 8, 11, 22, 3, 3, 13, 0, 6, 28, 7, 30, 3, 12, 17, 10, 1, 36, 19, 14, 5, 40, 9, 42, 10, 5, 23, 46, 4, 5, 4, 18, 12, 52, 1, 14, 7, 20, 29, 58, 6, 60, 31, 7, 4, 16, 13, 66, 16, 24, 11, 70, 2, 72
Offset: 1

Views

Author

Peter Schorn, May 04 2021

Keywords

Examples

			a(24) = a(2^3 * 3) = abs(2 - 3) + abs(3 - 1) = 3. a(27) = a(3^3) = 0.
		

Crossrefs

Cf. A008474.

Programs

  • Mathematica
    a[n_] := Plus @@ (Abs[#[[1]] - #[[2]]] & /@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, May 04 2021 *)
  • PARI
    a(n)=local(t); if(n<1, 0, t=factor(n); vecsum(abs(t[,1]-t[,2])))

Formula

Additive with a(p^e) = abs(p-e).

A376157 Numbers k such that the sum of the digits of k equals the sum of its prime factors plus the sum of the multiplicities of each prime factor.

Original entry on oeis.org

4, 25, 36, 54, 125, 192, 289, 297, 343, 392, 448, 676, 756, 1089, 1536, 1764, 1936, 2646, 2888, 3872, 4802, 4860, 6174, 6250, 6776, 6860, 7290, 7488, 7680, 8750, 8775, 9408, 9747, 10648, 14739, 15309, 16848, 18432, 18865, 21296, 22869, 25725, 29988, 33750, 33957
Offset: 1

Views

Author

Jordan Brooks, Sep 12 2024

Keywords

Examples

			For k = 54, its prime factorization is 2^1*3^3: 5+4 = 2+1+3+3 = 9.
For k = 756, its prime factorization is 2^2*3^3*7^1: 7+5+6 = 2+2+3+3+7+1 = 18.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[34000], DigitSum[#]==Total[Flatten[FactorInteger[#]]] &] (* Stefano Spezia, Sep 14 2024 *)
  • PARI
    isok(k)={my(f=factor(k)); vecsum(f[,1]) + vecsum(f[,2]) == sumdigits(k)} \\ Andrew Howroyd, Sep 26 2024
  • Python
    from sympy.ntheory import factorint
    c = 2
    while c < 10000:
        charsum = 0
        for char in str(c):
            charsum += int(char)
        pf = factorint(c)
        cand = 0
        for p in pf.keys():
            cand += p
            cand += pf[p]
        if charsum == cand:
            print(c)
            print(pf)
        c += 1
    

Formula

{ k : A007953(k) = A008474(k) }.
Previous Showing 21-24 of 24 results.