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!)
A284374 a(1) = a(2) = 1; a(n) is the largest prime <= (a(n-a(n-1)) + a(n-a(n-2))) for n > 2. 5
1, 1, 2, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 13, 11, 7, 11, 13, 11, 13, 13, 13, 13, 13, 13, 13, 23, 13, 11, 19, 19, 13, 23, 19, 13, 23, 23, 19, 19, 23, 23, 19, 23, 23, 23, 23, 23, 23, 23, 43, 19, 29, 31, 23, 23, 43, 31, 31, 23, 31, 37, 31, 23, 43, 31, 23, 43, 31 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(1) = a(2) = 1; a(n) = A007917(a(n-a(n-1)) + a(n-a(n-2))) for n > 2.
EXAMPLE
a(4) = 3 because a(4 - a(3)) + a(4 - a(2)) = a(2) + a(3) = 1 + 2 = 3 and A007917(3) = 3.
MATHEMATICA
a[1] = a[2] = 1; a[n_] := a[n] = Prime@ PrimePi[a[n - a[n - 1]] + a[n - a[n - 2]]]; Array[a, 73] (* Michael De Vlieger, Mar 25 2017 *)
PROG
(PARI) a=vector(1000); a[1]=a[2]=1; for(n=3, #a, a[n] = precprime(a[n-a[n-1]]+a[n-a[n-2]])); a
CROSSREFS
Sequence in context: A136348 A353710 A284397 * A137847 A295820 A164023
KEYWORD
nonn
AUTHOR
Altug Alkan, Mar 25 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 14:37 EDT 2024. Contains 372294 sequences. (Running on oeis4.)