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!)
A289052 a(1) = 1; a(n) = a(n-A006530(n-1)) + 1 for n > 1. 1
1, 2, 2, 2, 3, 2, 3, 2, 4, 4, 3, 2, 5, 2, 3, 4, 4, 2, 5, 2, 5, 4, 3, 2, 5, 6, 3, 6, 5, 2, 7, 2, 8, 4, 3, 6, 5, 2, 3, 4, 7, 2, 7, 2, 5, 8, 3, 2, 9, 8, 9, 4, 5, 2, 5, 6, 9, 4, 3, 2, 7, 2, 3, 10, 4, 6, 7, 2, 5, 4, 11, 2, 5, 2, 3, 12, 5, 8, 7, 2, 13, 8, 3, 2, 9, 6, 3, 4, 9, 2, 7, 8, 5, 4, 3, 6, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Indranil Ghosh, Table of n, a(n) for n = 1..10000

Altug Alkan, Alternative scatterplot

MATHEMATICA

a[1] = 1; a[n_] := a[n] = 1 + a[n - FactorInteger[n - 1][[-1, 1]]]; Array[a, 97] (* Michael De Vlieger, Jun 26 2017 *)

PROG

(PARI) a006530(n) = if(n>1, vecmax(factor(n)[, 1]), 1);

q=vector(100000); q[1]=1; for(n=2, #q, q[n]=q[n-a006530(n-1)]+1); q

(Python)

from sympy import primefactors

l=[0, 1, 2]

for n in range(3, 201): l.append(l[n - primefactors(n - 1)[-1]] + 1)

print(l[1:]) # Indranil Ghosh, Jun 23 2017

CROSSREFS

Cf. A002024, A006530.

Sequence in context: A143117 A076221 A029235 * A329046 A281856 A106696

Adjacent sequences:  A289049 A289050 A289051 * A289053 A289054 A289055

KEYWORD

nonn

AUTHOR

Altug Alkan, Jun 23 2017

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 17 13:51 EST 2022. Contains 350396 sequences. (Running on oeis4.)