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.

A360496 a(n) is the remainder after dividing n by its largest prime factor plus 1, a(1) = 1.

Original entry on oeis.org

1, 2, 3, 1, 5, 2, 7, 2, 1, 4, 11, 0, 13, 6, 3, 1, 17, 2, 19, 2, 5, 10, 23, 0, 1, 12, 3, 4, 29, 0, 31, 2, 9, 16, 3, 0, 37, 18, 11, 4, 41, 2, 43, 8, 3, 22, 47, 0, 1, 2, 15, 10, 53, 2, 7, 0, 17, 28, 59, 0, 61, 30, 7, 1, 9, 6, 67, 14, 21, 6, 71, 0, 73, 36, 3, 16, 5, 8, 79, 2, 1, 40, 83, 4, 13
Offset: 1

Views

Author

Sebastian F. Orellana, Feb 09 2023

Keywords

Examples

			a(15) = 15 mod (5+1) = 15 mod 6 = 3.
		

Crossrefs

Cf. A006530.

Programs

  • Maple
    a:= n-> irem(n, max(numtheory[factorset](n))+1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 10 2023
  • Mathematica
    a[n_] := Mod[n, FactorInteger[n][[-1, 1]] + 1]; Array[a, 100] (* Amiram Eldar, Feb 10 2023 *)
  • PARI
    a(n) = if (n==1, 1, n % (vecmax(factor(n)[, 1])+1)); \\ Michel Marcus, Feb 10 2023

Formula

a(n) = n mod (1 + A006530(n)).