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!)
A214320 a(0)=a(1)=a(2)=1; thereafter a(n) = gpf(a(n-1)+a(n-3)), where gpf = "greatest prime factor". 3

%I #15 Jul 08 2017 10:52:34

%S 1,1,1,2,3,2,2,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,

%T 5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,

%U 2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3,5,2,5,5,7,3,2,3,3

%N a(0)=a(1)=a(2)=1; thereafter a(n) = gpf(a(n-1)+a(n-3)), where gpf = "greatest prime factor".

%C Suggested by A214551 and A177904.

%F After 7 terms, cycles with period 9.

%p with(numtheory, divisors); A006530 := proc(n) local i, t1, t2, t3, t4, t5; t1 := divisors(n); t2 := convert(t1, list); t3 := sort(t2); t4 := nops(t3); t5 := 1; for i from 1 to t4 do if isprime(t3[t4+1-i]) then RETURN(t3[t4+1-i]); fi; od; 1; end;

%p f:=proc(n) option remember; if n <= 2 then 1 else A006530(f(n-1)+f(n-3)); fi; end;

%p [seq(f(n),n=0..120)];

%t nxt[{a_,b_,c_}]:={b,c,FactorInteger[c+a][[-1,1]]}; NestList[nxt,{1,1,1},120][[All,1]] (* or *) PadRight[{1,1,1,2,3,2,2},130,{3,2,3,3,5,2,5,5,7}] (* _Harvey P. Dale_, Jul 08 2017 *)

%o (Haskell)

%o a214320 n = a214320_list !! n

%o a214320_list = 1 : 1 : 1 : (map a006530 $

%o zipWith (+) a214320_list (drop 2 $ a214320_list))

%o -- _Reinhard Zumkeller_, Jul 24 2012

%Y Cf. A000930, A006530, A177904, A214320.

%K nonn

%O 0,4

%A _N. J. A. Sloane_, Jul 22 2012

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 March 28 18:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)