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 41 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

A153657 Triangle T(n, k) = T(n-1, k) + T(n-1, k-1) + (2*j +7)*prime(j)*T(n-2, k-1) with j=10, read by rows.

Original entry on oeis.org

2, 29, 29, 2, 1678, 2, 2, 24387, 24387, 2, 2, 25955, 1362648, 25955, 2, 2, 27523, 20483624, 20483624, 27523, 2, 2, 29091, 40833912, 1107920632, 40833912, 29091, 2, 2, 30659, 62413512, 17187432136, 17187432136, 62413512, 30659, 2, 2, 32227, 85222424, 49222798744, 901876719128, 49222798744, 85222424, 32227, 2
Offset: 1

Views

Author

Roger L. Bagula, Dec 30 2008

Keywords

Examples

			Triangle begins as:
   2;
  29,    29;
   2,  1678,        2;
   2, 24387,    24387,           2;
   2, 25955,  1362648,       25955,            2;
   2, 27523, 20483624,    20483624,        27523,           2;
   2, 29091, 40833912,  1107920632,     40833912,       29091,       2;
   2, 30659, 62413512, 17187432136,  17187432136,    62413512,    30659,     2;
   2, 32227, 85222424, 49222798744, 901876719128, 49222798744, 85222424, 32227, 2;
		

Crossrefs

Sequences with variable (p,q,j): A153516 (0,1,2), A153518 (0,1,3), A153520 (0,1,4), A153521 (0,1,5), A153648 (1,0,3), A153649 (1,1,4), A153650 (1,4,5), A153651 (1,5,6), A153652 (2,1,7), A153653 (2,1,8), A153654 (2,1,9), A153655 (2,1,10), A153656 (2,3,9), this sequence (2,7,10).
Cf. A009973 (powers of 29).

Programs

  • Magma
    f:= func< n,j | Round(((3-(-1)^n)/2)*NthPrime(j)^(n-1) - 2^((3-(-1)^n)/2)) >;
    function T(n,k,p,q,j)
      if n eq 2 then return NthPrime(j);
      elif (n eq 3 and k eq 2 or n eq 4 and k eq 2 or n eq 4 and k eq 3) then return f(n,j);
      elif (k eq 1 or k eq n) then return 2;
      else return T(n-1,k,p,q,j) + T(n-1,k-1,p,q,j) + (p*j+q)*NthPrime(j)*T(n-2,k-1,p,q,j);
      end if; return T;
    end function;
    [T(n,k,2,7,10): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 06 2021
  • Mathematica
    T[n_, k_, p_, q_, j_]:= T[n,k,p,q,j]= If[n==2, Prime[j], If[n==3 && k==2 || n==4 && 2<=k<=3, ((3-(-1)^n)/2)*Prime[j]^(n-1) -2^((3-(-1)^n)/2), If[k==1 || k==n, 2, T[n-1,k,p,q,j] + T[n-1,k-1,p,q,j] + (p*j+q)*Prime[j]*T[n-2,k-1,p,q,j] ]]];
    Table[T[n,k,2,7,10], {n,12}, {k,n}]//Flatten (* modified by G. C. Greubel, Mar 06 2021 *)
  • Sage
    @CachedFunction
    def f(n,j): return ((3-(-1)^n)/2)*nth_prime(j)^(n-1) - 2^((3-(-1)^n)/2)
    def T(n,k,p,q,j):
        if (n==2): return nth_prime(j)
        elif (n==3 and k==2 or n==4 and 2<=k<=3): return f(n,j)
        elif (k==1 or k==n): return 2
        else: return T(n-1,k,2,7,10) + T(n-1,k-1,p,q,j) + (p*j+q)*nth_prime(j)*T(n-2,k-1,p,q,j)
    flatten([[T(n,k,p,q,j) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 06 2021
    

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + (2*j +7)*prime(j)*T(n-2, k-1) with j=10.
From G. C. Greubel, Mar 06 2021: (Start)
T(n,k,p,q,j) = T(n-1,k,p,q,j) + T(n-1,k-1,p,q,j) + (p*j+q)*prime(j)*T(n-2,k-1,p,q,j) with T(2,k,p,q,j) = prime(j), T(3,2,p,q,j) = 2*prime(j)^2 -4, T(4,2,p,q,j) = T(4,3,p,q,j) = prime(j)^2 -2, T(n,1,p,q,j) = T(n,n,p,q,j) = 2 and (p,q,j) = (2,7,10).
Sum_{k=0..n} T(n,k,p,q,j) = 2*prime(j)^(n-1), for (p,q,j)=(2,7,10), = 2*A009973(n-1). (End)

Extensions

Edited by G. C. Greubel, Mar 06 2021

A230644 Values of x such that x^2 + y^2 = 29^n with x and y coprime and 0 < x < y.

Original entry on oeis.org

2, 20, 65, 41, 1475, 15939, 60422, 68880, 1063438, 12631900, 55535695, 86719879, 743336365, 9948240141, 50564635018, 96971881440, 496655601122, 7778740572980, 45669244934945, 101577438080201, 308633722311395, 6032082927439779, 40960925870541542
Offset: 1

Views

Author

Colin Barker, Oct 26 2013

Keywords

Comments

The corresponding y-values are in A230645.

Examples

			a(3)=65 because 65^2+142^2=24389=29^3.
		

Crossrefs

Programs

  • Mathematica
    Table[Select[PowersRepresentations[29^n, 2, 2], CoprimeQ@@#&][[1, 1]], {n, 1, 40}] (* Vincenzo Librandi, Mar 02 2014 *)

Extensions

Incorrect formula deleted by Colin Barker, Jan 08 2014

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.

A230645 Values of y such that x^2 + y^2 = 29^n with x and y coprime and 0 < x < y.

Original entry on oeis.org

5, 21, 142, 840, 4282, 18460, 116615, 703919, 3657355, 16159899, 95479298, 588467880, 3115779158, 14092223060, 77925646825, 490757504161, 2647731283685, 12245345216181, 63384393297262, 408260456356200, 2244457157941402, 10605018345084220
Offset: 1

Views

Author

Colin Barker, Oct 26 2013

Keywords

Comments

The corresponding x-values are in A230644.

Examples

			a(3)=142 because 65^2+142^2=24389=29^3.
		

Crossrefs

Extensions

Incorrect formula deleted by Colin Barker, Jan 08 2014

A218732 a(n) = (29^n - 1)/28.

Original entry on oeis.org

0, 1, 30, 871, 25260, 732541, 21243690, 616067011, 17865943320, 518112356281, 15025258332150, 435732491632351, 12636242257338180, 366451025462807221, 10627079738421409410, 308185312414220872891, 8937374060012405313840, 259183847740359754101361
Offset: 0

Views

Author

M. F. Hasler, Nov 04 2012

Keywords

Comments

Partial sums of powers of 29 (A009973).

Crossrefs

Programs

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

Formula

a(n) = floor(29^n/28).
G.f.: x/((1-x)*(1-29*x)). - Vincenzo Librandi, Nov 07 2012
a(n) = 30*a(n-1) - 29*a(n-2). - Vincenzo Librandi, Nov 07 2012
E.g.f.: exp(15*x)*sinh(14*x)/14. - Elmo R. Oliveira, Aug 27 2024

A262715 a(n) = 29^(2*n+1).

Original entry on oeis.org

29, 24389, 20511149, 17249876309, 14507145975869, 12200509765705829, 10260628712958602189, 8629188747598184440949, 7257147736730073114838109, 6103261246589991489578849669, 5132842708382182842735812571629, 4316720717749415770740818372739989
Offset: 0

Views

Author

Vincenzo Librandi, Oct 02 2015

Keywords

Comments

29*a(n) is a square.

Crossrefs

Second bisection of A009973 (powers of 29).
Cf. similar sequences of the form p^(2*n+1), with p prime: A004171 (p=2), A013708 (p=3), A013710 (p=5), A013712 (p=7), A013716 (p=11), A013718 (p=13), A013722 (p=17), A013724 (p=19), A013728 (p=23), this sequence (p=29), A262716 (p=31), A262786 (p=37), A262787 (p=41), A155477 (p=43).

Programs

  • Magma
    [29^(2*n+1): n in [0..15]];
    
  • Mathematica
    29^Range[1, 30, 2]
    NestList[841#&,29,20] (* Harvey P. Dale, May 16 2025 *)
  • PARI
    vector(20, n, n--; 29^(2*n+1)) \\ Altug Alkan, Oct 02 2015

Formula

G.f.: 29/(1 - 841*x).
a(n) = 841*a(n-1).
Sum_{i>=0} (-1)^i/a(i) = 29*A021846; Sum_{i>=0} 1/a(i) = 2.9*A021088. [Bruno Berselli, Oct 06 2015]

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).

A339794 a(n) is the least integer k satisfying rad(k)^2 < sigma(k) and whose prime factors set is the same as the prime factors set of A005117(n+1).

Original entry on oeis.org

4, 9, 25, 18, 49, 80, 121, 169, 112, 135, 289, 361, 441, 352, 529, 416, 841, 360, 961, 891, 1088, 875, 1369, 1216, 1053, 1681, 672, 1849, 1472, 2209, 2601, 2809, 3025, 3249, 1856, 3481, 3721, 1984, 4225, 1584, 4489, 4761, 1960, 5041, 5329, 4736, 5929, 2496, 6241
Offset: 1

Views

Author

Michel Marcus, Dec 17 2020

Keywords

Comments

Equivalently, subsequence of terms of A339744 excluding terms whose prime factor set has already been encountered.
a(n) = A005117(n + 1)^2 when A005117(n + 1) is prime. Proof: if A005117(n + 1) is a prime p then rad(A005117(n + 1))^2 = rad(p)^2 = p^2 and so integers whose prime factors set is the same as the prime factors set of A005117(n + 1) = p are p^m where m >= 1. p^2 > sigma(p^1) = p + 1 but p^2 < sigma(p^2) = p^2 + p + 1. Q.E.D. - David A. Corneth, Dec 19 2020
From Bernard Schott, Jan 19 2021: (Start)
Indeed, a(n) satisfies the double inequality A005117(n+1) < a(n) <= A005117(n+1)^2.
It is also possible that a(n) = A005117(n+1)^2, even when A005117(n+1) is not prime; the smallest such example is for a(13) = 441 = 21^2 = A005117(14)^2. (End)

Examples

			   n  a(n) prime factor set
   1    4  [2]           A000079
   2    9  [3]           A000244
   3   25  [5]           A000351
   4   18  [2, 3]        A033845
   5   49  [7]           A000420
   6   80  [2, 5]        A033846
   7  121  [11]          A001020
   8  169  [13]          A001022
   9  112  [2, 7]        A033847
  10  135  [3, 5]        A033849
  11  289  [17]          A001026
  12  361  [19]          A001029
  13  441  [3, 7]        A033850
  14  352  [2, 11]       A033848
  15  529  [23]          A009967
  16  416  [2, 13]       A288162
  17  841  [29]          A009973
  18  360  [2, 3, 5]     A143207
		

Crossrefs

Cf. A000203 (sigma), A007947 (rad).
Cf. A005117 (squarefree numbers), A027748, A265668, A339744.
Subsequence: A001248 (squares of primes).

Programs

  • PARI
    u(n) = {my(fn=factor(n)[,1]); for (k = n, n^2, my(fk = factor(k)); if (fk[,1] == fn, if (factorback(fk[,1])^2 < sigma(fk), return (k));););}
    lista(nn) = {for (n=2, nn, if (issquarefree(n), print1(u(n), ", ");););}

Formula

a(n) <= A005117(n+1)^2. - David A. Corneth, Dec 19 2020
Showing 1-10 of 41 results. Next