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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260218 a(1) = 2; for n > 1 if n is even a(n) = spf(1 + Product_{odd m,m<n}a(m)), while if n is odd a(n) = spf(1 + Product_{even m,m<n}a(m)). 1
2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 257, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 65537, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 97, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 641, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..255

FORMULA

It appears that for odd k, a(k) = 2 and for even k, a(k) = A002586(k/2). - Michel Marcus, Jul 20 2015

MATHEMATICA

f[n_] := Block[{a = {2}, k, m}, Do[If[EvenQ@ k, AppendTo[a, FactorInteger[Product[a[[m]], {m, 1, k - 1, 2}] + 1][[1, 1]]], AppendTo[a, FactorInteger[Product[a[[m]], {m, 2, k - 1, 2}] + 1][[1, 1]]]], {k, 2, n}]; a]; f@ 80 (* Michael De Vlieger, Jul 20 2015 *)

PROG

(PARI) spf(n)=factor(n)[1, 1]

first(m)=my(v=vector(m), i, odd=2, even=1); v[1]=2; for(i=2, m, if(i%2==0, v[i]=spf(odd+1); even*=v[i], v[i]=spf(even+1); odd*=v[i])); v; /* Anders Hellström, Jul 19 2015 */

(PARI)

A020639(n) = if(1==n, n, vecmin(factor(n)[, 1]));

memoA260218 = Map();

A260218(n) = if(1==n, 2, if(mapisdefined(memoA260218, n), mapget(memoA260218, n), my(k, m, v = if(!(n%2), k=1; m=1; while(k<n, m *= A260218(k); k += 2); A020639(m+1), k=2; m=1; while(k<n, m * A260218(k); k += 2); A020639(m+1))); mapput(memoA260218, n, v); (v))); \\ (An incrementally memoized version). Antti Karttunen, Sep 30 2018

CROSSREFS

Cf. A000945, A005265, A007978, A053669, A075019, A258581.

Sequence in context: A094290 A265111 A101876 * A087986 A129088 A086418

Adjacent sequences:  A260215 A260216 A260217 * A260219 A260220 A260221

KEYWORD

nonn,less

AUTHOR

Anders Hellström, Jul 19 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 23 02:38 EST 2019. Contains 319365 sequences. (Running on oeis4.)