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

A008472 Sum of the distinct primes dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A001043(n)) = A191583(n);
For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7;
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022

Examples

			a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
		

Crossrefs

First difference of A024924.
Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).
Cf. A010051.

Programs

  • Haskell
    a008472 = sum . a027748_row  -- Reinhard Zumkeller, Mar 29 2012
    
  • Magma
    [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
    
  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
    A008472 := proc(n)
            add( d, d= numtheory[factorset](n)) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
    Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
    (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
    Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1])
    
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)) \\ Derek Orr, May 13 2015
    
  • PARI
    A008472(n)=vecsum(factor(n)[,1]) \\ M. F. Hasler, Jul 18 2015
    
  • Python
    from sympy import primefactors
    def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
  • Sage
    def A008472(n):
        return add(d for d in divisors(n) if is_prime(d))
    print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
    
  • Sage
    [sum(prime_factors(n)) for n in range(1,74)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End)
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

A319075 Square array T(n,k) read by antidiagonal upwards in which row n lists the n-th powers of primes, hence column k lists the powers of the k-th prime, n >= 0, k >= 1.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 9, 5, 1, 16, 27, 25, 7, 1, 32, 81, 125, 49, 11, 1, 64, 243, 625, 343, 121, 13, 1, 128, 729, 3125, 2401, 1331, 169, 17, 1, 256, 2187, 15625, 16807, 14641, 2197, 289, 19, 1, 512, 6561, 78125, 117649, 161051, 28561, 4913, 361, 23, 1, 1024, 19683, 390625, 823543, 1771561, 371293
Offset: 0

Views

Author

Omar E. Pol, Sep 09 2018

Keywords

Comments

If n = p - 1 where p is prime, then row n lists the numbers with p divisors.
The partial sums of column k give the column k of A319076.

Examples

			The corner of the square array is as follows:
         A000079 A000244 A000351  A000420    A001020    A001022     A001026
A000012        1,      1,      1,       1,         1,         1,          1, ...
A000040        2,      3,      5,       7,        11,        13,         17, ...
A001248        4,      9,     25,      49,       121,       169,        289, ...
A030078        8,     27,    125,     343,      1331,      2197,       4913, ...
A030514       16,     81,    625,    2401,     14641,     28561,      83521, ...
A050997       32,    243,   3125,   16807,    161051,    371293,    1419857, ...
A030516       64,    729,  15625,  117649,   1771561,   4826809,   24137569, ...
A092759      128,   2187,  78125,  823543,  19487171,  62748517,  410338673, ...
A179645      256,   6561, 390625, 5764801, 214358881, 815730721, 6975757441, ...
...
		

Crossrefs

Other rows n: A030635 (n=16), A030637 (n=18), A137486 (n=22), A137492 (n=28), A139571 (n=30), A139572 (n=36), A139573 (n=40), A139574 (n=42), A139575 (n=46), A173533 (n=52), A183062 (n=58), A183085 (n=60), A261700 (n=100).
Main diagonal gives A093360.
Second diagonal gives A062457.
Third diagonal gives A197987.
Removing the 1's we have A182944/ A182945.

Programs

  • PARI
    T(n, k) = prime(k)^n;

Formula

T(n,k) = A000040(k)^n, n >= 0, k >= 1.

A218746 a(n) = (43^n - 1)/42.

Original entry on oeis.org

0, 1, 44, 1893, 81400, 3500201, 150508644, 6471871693, 278290482800, 11966490760401, 514559102697244, 22126041415981493, 951419780887204200, 40911050578149780601, 1759175174860440565844, 75644532518998944331293, 3252714898316954606245600, 139866740627629048068560801
Offset: 0

Views

Author

M. F. Hasler, Nov 04 2012

Keywords

Comments

Partial sums of powers of 43 (A009987).
0 followed by the binomial transform of A170762. - R. J. Mathar, Jul 18 2015

Crossrefs

Programs

Formula

G.f.: x/((1-x)*(1-43*x)). - Vincenzo Librandi, Nov 07 2012
a(n) = 44*a(n-1) - 43*a(n-2). - Vincenzo Librandi, Nov 07 2012
a(n) = floor(43^n/42). - Vincenzo Librandi, Nov 07 2012
E.g.f.: exp(22*x)*sinh(21*x)/21. - Elmo R. Oliveira, Aug 27 2024

A155477 a(n) = 43^(2*n+1).

Original entry on oeis.org

43, 79507, 147008443, 271818611107, 502592611936843, 929293739471222707, 1718264124282290785243, 3177070365797955661914307, 5874403106360420018879553643, 10861771343660416614908294685907, 20083415214428110320965436874242043
Offset: 0

Views

Author

Vincenzo Librandi, Jan 23 2009

Keywords

Comments

43*a(n) is a square, hence also a(n)^3+(6*a(n))^3+(11*a(n))^3 = 36*43*a(n)^3 is a square.

Crossrefs

Bisection of A009987 (powers of 43).

Programs

Formula

G.f.: 43/(1-1849*x). - Bruno Berselli, Feb 26 2012

Extensions

More terms from Harvey P. Dale, Oct 03 2011
Offset from 1 to 0 by Vincenzo Librandi, Feb 26 2012

A319074 a(n) is the sum of the first n nonnegative powers of the n-th prime.

Original entry on oeis.org

1, 4, 31, 400, 16105, 402234, 25646167, 943531280, 81870575521, 15025258332150, 846949229880161, 182859777940000980, 23127577557875340733, 1759175174860440565844, 262246703278703657363377, 74543635579202247026882160, 21930887362370823132822661921, 2279217547342466764922495586798
Offset: 1

Views

Author

Omar E. Pol, Sep 11 2018

Keywords

Examples

			For n = 4 the 4th prime is 7 and the sum of the first four nonnegative powers of 7 is 7^0 + 7^1 + 7^2 + 7^3 = 1 + 7 + 49 + 343 = 400, so a(4) = 400.
		

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n-1, prime(n)^k); \\ Michel Marcus, Sep 13 2018

Formula

a(n) = Sum_{k=0..n-1} A000040(n)^k.
a(n) = Sum_{k=0..n-1} A319075(k,n).
a(n) = (A000040(n)^n - 1)/(A000040(n) - 1).
a(n) = (A062457(n) - 1)/A006093(n).
a(n) = A069459(n)/A006093(n).
a(n) = A000203(A000040(n)^(n-1)).
a(n) = A000203(A093360(n)).

A319076 Square array T(n,k) read by antidiagonal upwards in which column k lists the partial sums of the powers of the k-th prime, n >= 0, k >= 1.

Original entry on oeis.org

1, 3, 1, 7, 4, 1, 15, 13, 6, 1, 31, 40, 31, 8, 1, 63, 121, 156, 57, 12, 1, 127, 364, 781, 400, 133, 14, 1, 255, 1093, 3906, 2801, 1464, 183, 18, 1, 511, 3280, 19531, 19608, 16105, 2380, 307, 20, 1, 1023, 9841, 97656, 137257, 177156, 30941, 5220, 381, 24, 1, 2047, 29524, 488281, 960800, 1948717
Offset: 0

Views

Author

Omar E. Pol, Sep 09 2018

Keywords

Comments

T(n,k) is also the sum of the divisors of the n-th nonnegative power of the k-th prime, n >= 0, k >= 1.

Examples

			The corner of the square array is as follows:
         A126646 A003462 A003463  A023000    A016123    A091030     A091045
A000012        1,      1,      1,       1,         1,         1,          1, ...
A008864        3,      4,      6,       8,        12,        14,         18, ...
A060800        7,     13,     31,      57,       133,       183,        307, ...
A131991       15,     40,    156,     400,      1464,      2380,       5220, ...
A131992       31,    121,    781,    2801,     16105,     30941,      88741, ...
A131993       63,    364,   3906,   19608,    177156,    402234,    1508598, ...
.......      127,   1093,  19531,  137257,   1948717,   5229043,   25646167, ...
.......      255,   3280,  97656,  960800,  21435888,  67977560,  435984840, ...
.......      511,   9841, 488281, 6725601, 235794769, 883708281, 7411742281, ...
...
		

Crossrefs

Programs

  • PARI
    T(n, k) = sigma(prime(k)^n); \\ Michel Marcus, Sep 13 2018

Formula

T(n,k) = A000203(A000040(k)^n).
T(n,k) = Sum_{j=0..n} A000040(k)^j.
T(n,k) = Sum_{j=0..n} A319075(j,k).
T(n,k) = (A000040(k)^(n+1) - 1)/(A000040(k) - 1).
T(n,k) = (A000040(k)^(n+1) - 1)/A006093(k).

A086874 Seventh power of odd primes.

Original entry on oeis.org

2187, 78125, 823543, 19487171, 62748517, 410338673, 893871739, 3404825447, 17249876309, 27512614111, 94931877133, 194754273881, 271818611107, 506623120463, 1174711139837, 2488651484819, 3142742836021, 6060711605323
Offset: 1

Views

Author

Douglas Winston (douglas.winston(AT)srupc.com), Sep 16 2003

Keywords

Crossrefs

Programs

A165864 Totally multiplicative sequence with a(p) = 43.

Original entry on oeis.org

1, 43, 43, 1849, 43, 1849, 43, 79507, 1849, 1849, 43, 79507, 43, 1849, 1849, 3418801, 43, 79507, 43, 79507, 1849, 1849, 43, 3418801, 1849, 1849, 79507, 79507, 43, 79507, 43, 147008443, 1849, 1849, 1849, 3418801, 43, 1849, 1849, 3418801, 43, 79507, 43
Offset: 1

Views

Author

Jaroslav Krizek, Sep 28 2009

Keywords

Programs

  • Mathematica
    43^PrimeOmega[Range[100]] (* G. C. Greubel, Apr 15 2016 *)
  • PARI
    a(n) = 43^bigomega(n); \\ Altug Alkan, Apr 16 2016

Formula

a(n) = A009987(A001222(n)) = 43^bigomega(n) = 43^A001222(n).

A359059 Numbers k such that phi(k) + rad(k) + psi(k) is a multiple of 3.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 11, 13, 17, 18, 19, 20, 23, 27, 29, 31, 32, 36, 37, 41, 42, 43, 44, 45, 47, 49, 50, 53, 54, 59, 61, 63, 67, 68, 71, 72, 73, 78, 79, 80, 81, 83, 84, 89, 90, 92, 97, 99, 101, 103, 105, 107, 108, 109, 110, 113, 114, 116, 117, 125, 126, 127, 128, 131, 135, 137, 139
Offset: 1

Views

Author

Torlach Rush, Dec 14 2022

Keywords

Comments

When k is prime (denote as p), phi(p) = p - 1, rad(p) = p, and psi(p) = p + 1, so phi(p) + rad(p) + psi(p) = 3*p. Therefore, A000040 is a subsequence.
When k = p^m (m>=1) with p prime, phi(p^m) = (p-1)*p^(m-1), rad(p^m) = p, and psi(p^m) = (p+1)*p^(m-1), so phi(p^m) + rad(p^m) + psi(p^m) = 2*p^m + p = p * (1+2*p^(m-1)). Then, this expression is a multiple of 3 iff p == 0 or 1 (mod 3), equivalently iff p is a generalized cuban prime of A007645. Therefore, as 1 is also a term, every sequence {p^m, p in A007645, m>=0} is a subsequence. See crossrefs section. - Bernard Schott, Jan 25 2023 after an observation of Alois P. Heinz

Examples

			8 is a term because 4+2+12 is divisible by 3.
		

Crossrefs

Cf. A000010 (phi), A000040, A001615 (psi), A007645, A007947 (rad), A001748 (3*p), A000244.
Subsequences of the form {p^n, n>=0}: A000244 (p=3), A000420 (p=7), A001022 (p=13), A001029 (p=19), A009975 (p=31), A009981 (p=37), A009987 (p=43).

Programs

  • Mathematica
    q[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; Divisible[Times @@ ((p - 1)*p^(e - 1)) + Times @@ p + Times @@ ((p + 1)*p^(e - 1)), 3]]; Select[Range[170], q] (* Amiram Eldar, Dec 15 2022 *)
  • PARI
    isok(m) = ((eulerphi(m) + factorback(factorint(m)[, 1]) + m*sumdiv(m, d, moebius(d)^2/d)) % 3) == 0; \\ Michel Marcus, Dec 27 2022
  • Python
    from sympy.ntheory.factor_ import totient
    from sympy import primefactors, prod
    def rad(n): return 1 if n < 2 else prod(primefactors(n))
    def psi(n):
        plist = primefactors(n)
        return n*prod(p+1 for p in plist)//prod(plist)
    # Output display terms.
    for n in range(1,170):
        if(0 == (totient(n) + rad(n) + psi(n)) % 3):
            print(n, end = ", ")
    
Showing 1-9 of 9 results.