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.

A358415 a(n) is the prime or perfect or amicable or sociable number encountered in the aliquot sequence for 2^n.

Original entry on oeis.org

2, 3, 7, 3, 31, 41, 127, 41, 43, 7, 113, 7, 8191, 6, 6, 313, 131071, 211457, 524287, 53, 4217, 433, 41, 547, 2243, 691921, 21275809, 673, 76831, 467, 2147483647, 89, 112337, 401, 17681, 9342799, 12011, 9511, 19, 1061129, 164524721, 5460123943, 71, 106661, 33188053169, 211, 41
Offset: 1

Views

Author

Michel Marcus, Nov 14 2022

Keywords

Crossrefs

Programs

  • PARI
    a(n) = my(b=2); if (n==1, return(b)); my(list = List(), s=b^n); for (i=1, oo, s = sigma(s) - s; if (#select(x->(x==s), list), return(s)); if (isprime(s), return (s)); listput(list, s););

Formula

a(n) = A115350(2^n).

A358239 Numbers k such that the aliquot sequence of 2^k ends with the prime 3.

Original entry on oeis.org

2, 4, 55, 164, 305, 317
Offset: 1

Views

Author

Jean Luc Garambois, Nov 04 2022

Keywords

Examples

			a(3)=55 because the aliquot sequence that starts with the integer 2^55 ends with the prime number 3 and there are only two smaller powers of 2 that do the same: 2^2 and 2^4.
		

Crossrefs

Programs

  • PARI
    f(n) = if (n==1, return(2)); my(list = List(), s=2^n); for (i=1, oo, s = sigma(s) - s; if (#select(x->(x==s), list), return(0)); if (isprime(s), return (s)); listput(list, s););
    isok(m) = f(m) == 3; \\ Michel Marcus, Nov 05 2022

Formula

Define s(i) = sigma(i) - i = A000203(i) - i. Then k is a term of this sequence if the aliquot sequence obtained by repeatedly applying the mapping i->s(i) taking as initial value 2^k terminates in the prime 3.
Showing 1-2 of 2 results.