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

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

A218734 a(n) = (31^n - 1)/30.

Original entry on oeis.org

0, 1, 32, 993, 30784, 954305, 29583456, 917087137, 28429701248, 881320738689, 27320942899360, 846949229880161, 26255426126284992, 813918209914834753, 25231464507359877344, 782175399728156197665, 24247437391572842127616, 751670559138758105956097
Offset: 0

Views

Author

M. F. Hasler, Nov 04 2012

Keywords

Comments

Partial sums of powers of 31 (A009975).

Crossrefs

Programs

  • Magma
    [n le 2 select n-1 else 32*Self(n-1)-31*Self(n-2): n in [1..20]]; // Vincenzo Librandi, Nov 07 2012
    
  • Mathematica
    LinearRecurrence[{32, -31}, {0, 1}, 30] (* Vincenzo Librandi, Nov 07 2012 *)
  • Maxima
    A218734(n):=(31^n-1)/30$
    makelist(A218734(n),n,0,30); /* Martin Ettl, Nov 07 2012 */
  • PARI
    a(n)=31^n\30
    

Formula

From Vincenzo Librandi, Nov 07 2012: (Start)
G.f.: x/((1 - x)*(1 - 31*x)).
a(n) = 32*a(n-1) - 31*a(n-2) for n > 1.
a(n) = floor(31^n/30). (End)
E.g.f.: exp(16*x)*sinh(15*x)/15. - Stefano Spezia, Mar 11 2023

A072978 Numbers of the form m*2^Omega(m), where m>1 is odd and Omega(m)=A001222(m), the number of prime factors of m.

Original entry on oeis.org

1, 6, 10, 14, 22, 26, 34, 36, 38, 46, 58, 60, 62, 74, 82, 84, 86, 94, 100, 106, 118, 122, 132, 134, 140, 142, 146, 156, 158, 166, 178, 194, 196, 202, 204, 206, 214, 216, 218, 220, 226, 228, 254, 260, 262, 274, 276, 278, 298, 302, 308, 314, 326, 334, 340, 346
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 20 2002

Keywords

Comments

(number of odd prime factors) = (number of even prime factors).
A000400, A011557, A001023, A001024, A009965, A009966 and A009975 are subsequences. - Reinhard Zumkeller, Jan 06 2008
Subsequence of A028260. - Reinhard Zumkeller, Sep 20 2008

Crossrefs

Programs

  • Mathematica
    Join[{1}, Select[Range[2, 500, 2], First[#] == Total[Rest[#]] & [FactorInteger[#][[All, 2]]] &]] (* Paolo Xausa, Feb 19 2025 *)
  • PARI
    isok(k) = {my(v = valuation(k, 2)); bigomega(k >> v) == v;} \\ Amiram Eldar, May 15 2025
  • Python
    from math import prod, isqrt
    from sympy import primerange, integer_nthroot, primepi
    def A072978(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1)))
        def h(x,n): return sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,1,3,1,n))
        def f(x): return int(n+x-primepi(x>>1)-sum(h(x>>m,m) for m in range(2,x.bit_length()+1))) if x>1 else 1
        return bisection(f,n,n) # Chai Wah Wu, Apr 10 2025
    

Formula

A007814(a(n)) = A087436(a(n)). - Reinhard Zumkeller, Jan 06 2008

A185677 Final prime adjoined in the smallest term of A019518 divisible by 31^n.

Original entry on oeis.org

107, 6619, 496897, 20005649, 308292781, 35800083049
Offset: 1

Views

Author

James G. Merickel, Feb 05 2011

Keywords

Comments

Associated with A019518(i) at i=28, 855, 41297, 1270946, 16677141,...

Crossrefs

A100402 Digital root of 4^n.

Original entry on oeis.org

1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7
Offset: 0

Views

Author

Cino Hilliard, Dec 31 2004

Keywords

Comments

Equals A141725 mod 9. - Paul Curtz, Sep 15 2008
Sequence is the digital root of A016777. - Odimar Fabeny, Sep 13 2010
Digital root of the powers of any number congruent to 4 mod 9. - Alonso del Arte, Jan 26 2014
Period 3: repeat [1, 4, 7]. - Wesley Ivan Hurt, Aug 26 2014
From Timothy L. Tiffin, Dec 02 2023: (Start)
The period 3 digits of this sequence are the same as those of A070403 (digital root of 7^n) but the order is different: [1, 4, 7] vs. [1, 7, 4].
The digits in this sequence appear in the decimal expansions of the following rational numbers: 49/333, 490/333, 4900/333, .... (End)

Examples

			4^2 = 16, digitalroot(16) = 7, the third entry.
		

References

  • Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

Crossrefs

Cf. Digital roots of powers of c mod 9: c = 2, A153130; c = 5, A070366; c = 7, A070403; c = 8, A010689.

Programs

Formula

a(n) = 4^n mod 9. - Zerinvary Lajos, Nov 25 2009
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-3) for n>2.
G.f.: (1+4*x+7*x^2)/ ((1-x)*(1+x+x^2)). (End)
a(n) = A010888(A000302(n)). - Michel Marcus, Aug 25 2014
a(n) = 3*A010872(n) + 1. - Robert Israel, Aug 25 2014
a(n) = 4 - 3*cos(2*n*Pi/3) - sqrt(3)*sin(2*n*Pi/3). - Wesley Ivan Hurt, Jun 30 2016
a(n) = A153130(2n). - Timothy L. Tiffin, Dec 01 2023
a(n) = A010888(A001022(n)) = A010888(A009966(n)) = A010888(A009975(n)) = A010888(A009984(n)) = A010888(A087752(n)) = A010888(A121013(n)). - Timothy L. Tiffin, Dec 02 2023
a(n) = A010888(4*a(n-1)). - Stefano Spezia, Mar 20 2025

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.

A135640 Powers of 839: a(n) = 839^n.

Original entry on oeis.org

1, 839, 703921, 590589719, 495504774241, 415728505588199, 348796216188498961, 292640025382150628279, 245524981295624377126081, 205995459307028852408781959, 172830190358597207170968063601, 145004529710863056816442205361239, 121658800427414104668995010298079521
Offset: 0

Views

Author

Omar E. Pol, Nov 27 2007

Keywords

Comments

The prime number 839 is related with the exceptional Lie group E_8 calculation. For more information, see: A134888, A134960 and A135639.

Examples

			a(2) = 703921 because 839^2 = 839*839 = 703921.
		

Crossrefs

Programs

Formula

a(n) = 839^n.
From Elmo R. Oliveira, Jul 05 2025: (Start)
G.f.: 1/(1-839*x).
E.g.f.: exp(839*x).
a(n) = 839*a(n-1). (End)

A138128 Powers of 127.

Original entry on oeis.org

1, 127, 16129, 2048383, 260144641, 33038369407, 4195872914689, 532875860165503, 67675234241018881, 8594754748609397887, 1091533853073393531649, 138624799340320978519423, 17605349516220764271966721, 2235879388560037062539773567, 283956682347124706942551243009
Offset: 0

Views

Author

Omar E. Pol, Mar 09 2008

Keywords

Comments

127 is the 4th Mersenne prime A000668.

Crossrefs

Programs

  • Mathematica
    127^Range[0, 15] (* Paolo Xausa, Jun 26 2025 *)
  • PARI
    my(x='x+O('x^15)); Vec(1/(1-127*x)) \\ Elmo R. Oliveira, Jun 23 2025

Formula

a(n) = 127^n.
From Elmo R. Oliveira, Jun 23 2025: (Start)
G.f.: 1/(1-127*x).
E.g.f.: exp(127*x).
a(n) = 127*a(n-1). (End)

Extensions

More terms from Elmo R. Oliveira, Jun 23 2025

A262716 a(n) = 31^(2*n+1).

Original entry on oeis.org

31, 29791, 28629151, 27512614111, 26439622160671, 25408476896404831, 24417546297445042591, 23465261991844685929951, 22550116774162743178682911, 21670662219970396194714277471, 20825506393391550743120420649631, 20013311644049280264138724244295391
Offset: 0

Views

Author

Vincenzo Librandi, Oct 07 2015

Keywords

Comments

31*a(n) is a square.
In general, Sum_{i>=0} 1/m^(2*i+1) = m/(m^2-1) when |m|>1. In this case, Sum_{i>=0} 1/a(i) = 31/960. [Bruno Berselli, Oct 07 2015]

Crossrefs

Second bisection of A009975 (powers of 31).
Cf. similar sequences listed in A262715.

Programs

  • Magma
    [31^(2*n+1): n in [0..15]];
    
  • Mathematica
    31^Range[1, 30, 2]
  • PARI
    Vec(31/(1 - 961*x) + O(x^30)) \\ Michel Marcus, Oct 07 2015
    
  • PARI
    vector(15, n, n--; 31^(2*n+1)) \\ Bruno Berselli, Oct 07 2015
    
  • Sage
    [31^(2*n+1) for n in (0..15)] # Bruno Berselli, Oct 07 2015

Formula

G.f.: 31/(1 - 961*x).
a(n) = 961*a(n-1).

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)).
Showing 1-10 of 44 results. Next