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!)
A185112 a(1)= 0; for n > 1, a(n) = a(n-1) - P(n) if that number is zero or positive, otherwise a(n)= a(n-1)+ P(n), where P(n) is the largest prime factor of n (A006530). 2
0, 2, 5, 3, 8, 5, 12, 10, 7, 2, 13, 10, 23, 16, 11, 9, 26, 23, 4, 9, 2, 13, 36, 33, 28, 15, 12, 5, 34, 29, 60, 58, 47, 30, 23, 20, 57, 38, 25, 20, 61, 54, 11, 0, 5, 28, 75, 72, 65, 60, 43, 30, 83, 80, 69, 62, 43, 14, 73, 68, 7, 38, 31, 29, 16, 5, 72, 55, 32, 25 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) = 0 for n = 1, 44, 125, 373, 1123, 1353, 5071, 19577, …
LINKS
MAPLE
with(numtheory):a0:=0:for n from 2 to 100 do: x:=factorset(n):n1:=nops(x): p:=x[n1]:a1:=a0-p:if a1< 0 then a1:=a0+p:else fi: printf(`%d, `, a1): a0:=a1: od:
MATHEMATICA
nxt[{n_, a_}]:=Module[{lpf=FactorInteger[n+1][[-1, 1]]}, {n+1, If[ a-lpf> = 0, a-lpf, a+lpf]}]; Transpose[NestList[nxt, {1, 0}, 70]][[2]] (* Harvey P. Dale, Jan 15 2015 *)
CROSSREFS
Cf. A006530.
Sequence in context: A115318 A338060 A169856 * A063955 A097594 A204980
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 23 2012
EXTENSIONS
Definition modified by Harvey P. Dale, Jan 15 2015
STATUS
approved

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 July 24 18:12 EDT 2024. Contains 374585 sequences. (Running on oeis4.)