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

A325651 a(n) = greatest k such that sigma(k) = sigma(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 11, 7, 8, 9, 17, 11, 12, 13, 23, 23, 25, 17, 18, 19, 41, 31, 22, 23, 59, 25, 41, 27, 39, 29, 71, 31, 32, 47, 53, 47, 36, 37, 59, 39, 89, 41, 77, 43, 83, 45, 71, 47, 75, 49, 50, 71, 97, 53, 95, 71, 95, 79, 89, 59, 167, 61, 77, 103, 64, 83, 119
Offset: 1

Views

Author

Jaroslav Krizek, May 12 2019

Keywords

Examples

			a(6) = 11 because sigma(6) = sigma(11) = 12.
		

Crossrefs

Cf. A000203, A275987 (least k such that sigma(k) = sigma(n)).
See A070242, A325652 and A325653 for number, sum and product of such numbers k.

Programs

  • Magma
    [Max([k: k in[1..10000] | SumOfDivisors(k) eq SumOfDivisors(n)]): n in [1..100]];
    
  • Mathematica
    a[n_] := Block[{s = DivisorSigma[1, n], k}, k=s; While[ DivisorSigma[1, k] != s, k--]; k]; Array[a, 66] (* Giovanni Resta, May 20 2019 *)
  • PARI
    a(n) = {my(s=sigma(n)); forstep(i=s, 1, -1, if (sigma(i) == s, return(i)););} \\ Michel Marcus, May 12 2019

A325652 a(n) = the sum of numbers k such that sigma(k) = sigma(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 17, 7, 8, 9, 27, 17, 12, 13, 52, 52, 41, 27, 18, 19, 87, 52, 22, 52, 121, 41, 87, 27, 67, 29, 253, 52, 32, 115, 87, 115, 36, 37, 121, 67, 187, 87, 250, 43, 192, 45, 253, 115, 123, 49, 50, 253, 149, 87, 292, 253, 292, 136, 187, 121, 663, 61, 250
Offset: 1

Views

Author

Jaroslav Krizek, May 12 2019

Keywords

Comments

a(n)=n if n is in A211656, otherwise a(n) > n. - Robert Israel, Jul 04 2019

Examples

			a(6) = 17 because sigma(6) = sigma(11) = 12; 6 + 11 = 17.
		

Crossrefs

See A070242 and A325653 for number and product of such numbers k.

Programs

  • Magma
    [&+[k: k in[1..10000] | SumOfDivisors(k) eq SumOfDivisors(n)]: n in [1..100]];
    
  • Maple
    N:= 1000: # to get a(n) before the first n with sigma(n) > N
    S:= map(numtheory:-sigma, [$1..N-1]):
    m:=min(select(t -> S[t]>N, [$1..N-1]))-1:
    1,seq(convert(select(s -> S[s]=S[n], [$1..S[n]-1]), `+`), n=2..m); # Robert Israel, Jul 04 2019
  • Mathematica
    a[n_] := Block[{s = DivisorSigma[1, n]}, Sum[Boole[s == DivisorSigma[1, k]] k, {k, s}]]; Array[a, 62] (* Giovanni Resta, Jul 03 2019 *)
  • PARI
    a(n) = {my(s=sigma(n)); sum(k=1, s, (sigma(k)==s)*k);} \\ Michel Marcus, May 12 2019
Showing 1-2 of 2 results.