login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A360496 a(n) is the remainder after dividing n by its largest prime factor plus 1, a(1) = 1. 1

%I #40 Feb 20 2023 15:18:38

%S 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,

%T 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,

%U 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

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

%H Sebastian F. Orellana, <a href="/A360496/b360496.txt">Table of n, a(n) for n = 1..6999</a>

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

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

%p a:= n-> irem(n, max(numtheory[factorset](n))+1):

%p seq(a(n), n=1..100); # _Alois P. Heinz_, Feb 10 2023

%t a[n_] := Mod[n, FactorInteger[n][[-1, 1]] + 1]; Array[a, 100] (* _Amiram Eldar_, Feb 10 2023 *)

%o (PARI) a(n) = if (n==1, 1, n % (vecmax(factor(n)[, 1])+1)); \\ _Michel Marcus_, Feb 10 2023

%Y Cf. A006530.

%K nonn

%O 1,2

%A _Sebastian F. Orellana_, Feb 09 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 12 22:20 EDT 2024. Contains 375855 sequences. (Running on oeis4.)