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.

A289712 Smallest integer such that the sum of its n smallest divisors is a square.

Original entry on oeis.org

1, 3, 15, 22, 12, 36, 24, 66, 126, 420, 90, 364, 270, 264, 240, 210, 672, 780, 864, 1050, 672, 720, 924, 1092, 1344, 3240, 3312, 1260, 3600, 1200, 8910, 1080, 27104, 5940, 1680, 8568, 8910, 14280, 6384, 5670, 5544, 9600, 43092, 42900, 5280, 3360, 9504, 8580, 21600, 54288
Offset: 1

Views

Author

Michel Lagneau, Sep 02 2017

Keywords

Comments

The first corresponding squares are 1, 4, 9, 36, 16, 25, 36, 144, 81, ...
The first squares in the sequence are 1, 36, 3600, ...

Examples

			a(4)=22 because the sum of the first 4 divisors of 22, i.e., 1 + 2 + 11 + 22 = 36, is a square, and 22 is the smallest integer with this property.
		

Crossrefs

Programs

  • Maple
    N:= 5*10^5: # to get terms before the first term > N
    for k from 1 to N do
      d:= sort(convert(numtheory:-divisors(k),list));
      s:= ListTools:-PartialSums(d);
      for m from 1 to nops(d) do
        if not assigned(A[m]) and issqr(s[m]) then A[m]:= k fi
      od
    od:
    iA:= map(op,{indices(A)}):
    seq(A[i],i=1..min({$1..max(iA)+1} minus iA)-1); # Robert Israel, Oct 01 2017
  • Mathematica
    Table[k=1;While[Nand[Length@#>=n,IntegerQ[Sqrt[Total@Take[PadRight[#,n],n]]]]&@Divisors@k,k++];k,{n,1,50}] (* Program from Michael De Vlieger adapted for this sequence. See A289776. *)
  • PARI
    isok(k, n) = {my(v = divisors(k)); if (#v < n, return(0)); issquare(sum(j=1, n, v[j]));}
    a(n) = {my(k = 1); while(!isok(k,n), k++); k;} \\ Michel Marcus, Sep 04 2017

A290126 Least k such that the sum of the n greatest divisors of k is a prime number.

Original entry on oeis.org

2, 2, 4, 28, 16, 140, 24, 90, 120, 108, 60, 144, 300, 288, 120, 672, 252, 432, 240, 630, 960, 756, 480, 1200, 1080, 1728, 1680, 1008, 720, 2016, 840, 3150, 2160, 2700, 1980, 4800, 2520, 3780, 3240, 8736, 3960, 3600, 6720, 6930, 10800, 6300, 4200, 16848, 9240, 5040
Offset: 1

Views

Author

Michel Lagneau, Jul 20 2017

Keywords

Comments

The corresponding primes are 2, 3, 7, 53, 31, 307, 59, 223, 331, 277, 167, 397, 853, 809, 359, 1973, 727, 1237, ...
The squares of the sequence are 4, 16, 144, 3600, ...

Examples

			a(4)=28 because the sum of the last 4 divisors of 28: 28+14+7+4 = 53 is a prime number.
		

Crossrefs

Programs

  • Maple
    M:= 20000: # to get all terms before the first term > M
    R:= 'R':
    for k from 2 to M do
       F:= ListTools:-PartialSums(sort(convert(
          numtheory:-divisors(k),list),`>`));
       for n in select(t -> isprime(F[t]),[$1..nops(F)]) do
        if not assigned(R[n]) then R[n]:= k fi
       od
    od:
    inds:= map(op,{indices(R)}):
    N:= min({$1..max(inds)+1} minus inds):
    seq(R[i],i=1..N-1);  # Robert Israel, Jul 24 2017
  • Mathematica
    Table[k=1;While[Nand[Length@#>=n,PrimeQ[Total@Take[PadLeft[#,n],n]]]&@Divisors@k,k++];k,{n,1,20}](* Program from Michael De Vlieger adapted for this sequence. See A289776 *)
  • PARI
    a(n) = {my(i = 2, d);  while(1, d = divisors(i); if(#d >= n, if(isprime(sum(j=#d-n+1,#d,d[j])), return(i), i++), i++)); i} \\ David A. Corneth, Jul 20 2017
    
  • Python
    from sympy import divisors, isprime
    def A290126(n):
        i = 1
        while len(divisors(i)) < n or not isprime(sum(divisors(i)[-n:])):
            i += 1
        return i # Chai Wah Wu, Aug 05 2017

A290169 a(n) = least k such that both the sum of the smallest n divisors of k and the sum of its greatest n divisors are prime numbers.

Original entry on oeis.org

2, 4, 30, 16, 140, 64, 264, 144, 336, 525, 144, 800, 1200, 576, 1600, 2016, 1440, 1296, 2160, 2304, 7980, 6440, 3360, 8360, 4080, 3960, 2772, 16100, 9108, 10608, 7392, 12320, 14688, 37240, 21780, 18200, 45760, 20160, 9240, 24624, 14364, 8400, 22176, 23760
Offset: 2

Views

Author

Michel Lagneau, Jul 23 2017

Keywords

Comments

The corresponding pairs of primes are (3, 3), (7, 7), (11, 61), (31, 31), (29, 307), (127, 127), (47, 673), (61, 379), (73, 919), ...
The sequence contains a subsequence of numbers having the property that the sum of the first n divisors is equal to the sum of the last n divisors; for instance, for a(n) = 2, 4, 16 and 64 with n = 2, 3, 5 and 7. Is it possible to conjecture that this subsequence contains all the superperfect numbers (A019279)? The answer is no: for instance, A019279(5) = 4096 = 2^12 => the sum of the 13 terms 1 + 2 + 4 + 8 + ... + 4096 = 8191 is a Mersenne prime, but a(13) = 800 instead 4096 > 800, and we obtain the corresponding pair of primes (293, 1933) instead (8191, 8191).
The squares of the terms of the sequence are 4, 16, 64, 144, 576, 1296, 1600, 2304, ...

Examples

			a(4)=30 because both the sum of the first 4 divisors of 30 (1 + 2 + 3 + 5 = 11) and the sum of its last 4 divisors (30 + 15 + 10 + 6 = 61) are prime numbers.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1;While[Nand[Length@#>=n,PrimeQ[Total@Take[PadRight[#,n],n]]]||Nand[Length@#>=n,PrimeQ[Total@Take[PadLeft[#,n],n]]]&@Divisors@k,k++];k,{n,2,10}]

A292467 Smallest integer such that the sum of its n smallest divisors is a Fibonacci number, or 0 if no such integer exists.

Original entry on oeis.org

1, 2, 9, 94, 18, 60, 210, 36, 510, 624, 90, 4290, 2604, 2340, 792, 8512, 9324, 3960, 9396, 600, 3600, 7840, 5472, 6840, 5520, 10296, 7800, 6120, 12768, 9450, 18240, 33600, 16200, 37800, 27360, 68796, 222768, 59400, 118944, 156240, 139320, 99360, 302400, 288512
Offset: 1

Views

Author

Michel Lagneau, Sep 22 2017

Keywords

Comments

The first corresponding Fibonacci numbers are 1, 3, 13, 144, 21, 21, 34, 55, 89, 89, 144, 144, 233, 144, 233, ...
The first squares of the sequence are 1, 9, 36, 3600, ...

Examples

			a(5)=18 because the sum of the 5 smallest divisors of 18, i.e., 1 + 2 + 3 + 6 + 9 = 21, is a Fibonacci number.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1;While[Nand[Length@#>=n,IntegerQ[Sqrt[5*Total@Take[PadRight[#,n],n]^2-4]]||IntegerQ[Sqrt[5*Total@Take[PadRight[#,n],n]^2+4]]]&@Divisors@k,k++];k,{n,1,45}]
  • PARI
    isfib(n) = my(k=n^2); k+=(k+1)<<2; issquare(k) || (n>0 && issquare(k-8)) ;
    a(n) = {my(k = 1); while((d=divisors(k)) && !((#d >= n) && isfib(sum(i=1, n, d[i]))), k++); k;} \\ Michel Marcus, Oct 01 2017
Showing 1-4 of 4 results.