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

A180851 Sum of increasing powers of divisors: a(n) = Sum_{i=1..q} d(i)^i where d(1) < d(2) < ... < d(q) are the divisors of n.

Original entry on oeis.org

1, 5, 10, 69, 26, 1328, 50, 4165, 739, 10130, 122, 2994048, 170, 38764, 50760, 1052741, 290, 34072601, 362, 64100694, 194834, 235592, 530, 110111416192, 15651, 459178, 532180, 482430598, 842, 656271867808, 962, 1074794565, 1187262
Offset: 1

Views

Author

Jason Earls, Sep 21 2010

Keywords

Examples

			For n=4, the divisors of 4 are [1, 2, 4] and summing them as increasing powers yields: 1^1+2^2+4^3 = 69.
For n=12, the divisors of 12 are [1, 2, 3, 4, 6, 12] and summing them as increasing powers yields: 1^1+2^2+3^3+4^4+6^5+12^6 = 2994048.
		

Crossrefs

Cf. A027750.
Positions of primes: A180852.
Comparable sequences: A055225, A264786, A344459.

Programs

  • Maple
    f:= proc(n) local D,k;
      D:=sort(convert(numtheory:-divisors(n),list));
      add(D[k]^k,k=1..nops(D))
    end proc:
    map(f, [$1..100]); # Robert Israel, Sep 11 2020
  • Mathematica
    Total[Divisors[#]^Range[DivisorSigma[0,#]]]&/@Range[40] (* Harvey P. Dale, Aug 16 2011 *)
  • PARI
    a(n) = my(d = divisors(n)); sum(k=1, #d, d[k]^k); \\ Michel Marcus, Jan 01 2016

Extensions

Name made precise by Peter Munn, Sep 19 2024

A358199 a(n) is the least integer whose sum of the i-th powers of the proper divisors is a prime for 1 <= i <= n, or -1 if no such number exists.

Original entry on oeis.org

4, 4, 981, 8829, 8829, 122029105, 2282761881
Offset: 1

Views

Author

Jean-Marc Rebert, Nov 02 2022

Keywords

Examples

			4 is a term since the strict divisors of 4 are {1, 2}, 1^1 + 2^1 = 3 and 1^2 + 2^2 = 5 are prime and no number < 4 has this property.
		

Crossrefs

Subsequence of A037020.

Programs

  • PARI
    card(n)=my(c=1,s=0);s=sigma(n)-n;while(isprime(s),c++;s=sigma(n,c)-n^c);c--
    a(n)=my(x=0);for(k=1,+oo,x=card(k);if(x>=n,return(k)))
    
  • Python
    from itertools import count
    from math import prod
    from sympy import isprime, factorint
    def A358199(n):
        for m in count(2):
            f = factorint(m).items()
            if all(map(isprime,(prod((p**((e+1)*i)-1)//(p**i-1) for p,e in f) - m**i for i in range(1,n+1)))):
                return m # Chai Wah Wu, Nov 15 2022

A376222 Numbers k such that Sum_{i=1..q-1} d(i)^i is prime, where d(1)

Original entry on oeis.org

4, 21, 27, 39, 57, 77, 183, 189, 203, 205, 219, 237, 253, 371, 387, 391, 417, 489, 565, 611, 655, 667, 669, 675, 687, 749, 767, 799, 831, 849, 897, 921, 955, 1007, 1047, 1135, 1189, 1207, 1349, 1371, 1379, 1407, 1421, 1461, 1469, 1497, 1513, 1569, 1633, 1643, 1659
Offset: 1

Views

Author

Michel Lagneau, Sep 16 2024

Keywords

Comments

The corresponding primes are in A376223.

Examples

			39 is a term because the 3 first divisors of 39 are {1,3,13} and 1^1 + 3^2 + 13^3 = 2207 is prime.
189 is a term since the 7 first divisors of 189 are {1, 3, 7, 9, 21, 27, 63} and 1^1+3^2+7^3+9^4+21^5+27^6+63^7 = 3939372150671 is prime.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=1700:
    for n from 1 to nn do:
    d:=divisors(n):n0:=nops(d):s:=sum(‘d[k]^k’, ‘k’=1..n0-1):
       if isprime(s)
        then
         printf(`%d,`,n):
        else
       fi:
    od:
  • Mathematica
    Select[Range[1700],PrimeQ[Sum[Part[Divisors[#],i]^i,{i,DivisorSigma[0,#]-1}]] &] (* Stefano Spezia, Sep 16 2024 *)
  • PARI
    isok(k) = my(d=divisors(k)); isprime(sum(j=1, #d-1, d[j]^j)); \\ Michel Marcus, Sep 16 2024

A376223 a(n) = Sum_{i=1..q-1} d(i)^i where d(i) are the q sorted divisors of A376222(n).

Original entry on oeis.org

5, 353, 739, 2207, 6869, 1381, 226991, 3939372150671, 24439, 68947, 389027, 493049, 12289, 148927, 35726471189, 12457, 2685629, 4330757, 1442923, 103993, 2248117, 24919, 11089577, 74820287157480518691978649, 12008999, 1225093, 205549, 104113, 21253943, 22665197
Offset: 1

Views

Author

Michel Lagneau, Sep 16 2024

Keywords

Comments

By the definition of A376222 all terms are prime.

Examples

			a(4) = 2207 because A376222(4) = 39 and the proper divisors of 39 are {1,3,13} with 1^1 + 3^2 + 13^3 = 2207.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=900:
    for n from 1 to nn do:
    d:=divisors(n):n0:=nops(d):p:=sum(‘d[k]^k’, ‘k’=1..n0-1):
       if isprime(p)
        then
         printf(`%d,`,p):
        else
       fi:
    od:
Showing 1-4 of 4 results.