login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A177186 a(n+1) = a(n) + p, where p is the largest prime dividing a(n) but not a(n-1), or 1 if there is no such prime. 0
1, 2, 4, 5, 10, 12, 15, 20, 22, 33, 36, 38, 57, 60, 65, 78, 81, 82, 123, 126, 133, 152, 154, 165, 170, 187, 198, 201, 268, 270, 275, 286, 299, 322, 329, 376, 378, 385, 396, 399, 418, 429, 442, 459, 462, 473, 516, 519, 692, 694, 1041, 1044, 1073, 1110, 1115, 1338 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Setting a(1) = 1 is arbitrary; since 1 has no prime divisors, we must then have p = 1 => a(2) = 2, without reference to a(0).

There are three cases where p = 1: n=1 (a(n)=1); n=3 (a(n)=4); n=17 (a(n)=81); and no others through n = 10000. Except that there cannot be such cases consecutively, p=1 iff a(n) is a prime power.

LINKS

Table of n, a(n) for n=1..56.

EXAMPLE

After a(9)=22, a(10)=33, the prime divisors of a(10) are 3 and 11; 11 divides 22, so p=3, and a(11)=36.

MATHEMATICA

p[n1_, n2_] := If[pp = Complement[Transpose[FactorInteger[n2]][[1]],

Transpose[FactorInteger[n1]][[1]]]; pp == {}, 1, Last[pp]]; a[1] = 1; a[2] = 2; a[n_] := a[n] = a[n-1] + p[a[n-2], a[n-1]]; Table[a[n], {n, 56}] (* From Jean-François Alcover, Sep 02 2011 *)

PROG

(PARI) invec(v, x)=for(i=1, #v, if(v[i]==x, return(1))); 0

lastnotin(vi, vx, dft)=forstep(i=#vi, 1, -1, if(!invec(vx, vi[i]), return(vi[i]))); dft

al(n)=local(r); r=vector(n); r[1]=1; r[2]=2; for(k=3, n, r[k]=r[k-1]+lastnotin(factor(r[k-1])[, 1]~, factor(r[k-2])[, 1]~, 1)); r

CROSSREFS

Cf. A076271, A060735, A002620.

Sequence in context: A141481 A047611 A120491 * A022944 A133732 A128215

Adjacent sequences:  A177183 A177184 A177185 * A177187 A177188 A177189

KEYWORD

nonn

AUTHOR

Franklin T. Adams-Watters, May 04 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 25 06:36 EDT 2013. Contains 225644 sequences.