login
A360496
a(n) is the remainder after dividing n by its largest prime factor plus 1, a(1) = 1.
1
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,2
LINKS
Sebastian F. Orellana, Table of n, a(n) for n = 1..6999
FORMULA
a(n) = n mod (1 + A006530(n)).
EXAMPLE
a(15) = 15 mod (5+1) = 15 mod 6 = 3.
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 *)
PROG
(PARI) a(n) = if (n==1, 1, n % (vecmax(factor(n)[, 1])+1)); \\ Michel Marcus, Feb 10 2023
CROSSREFS
Cf. A006530.
Sequence in context: A086112 A138798 A277708 * A356473 A328661 A345990
KEYWORD
nonn
AUTHOR
STATUS
approved