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!)
A146887 a(n) = prime(n)*a(n-1) - a(n-2). 1
1, 1, 2, 9, 61, 662, 8545, 144603, 2738912, 62850373, 1819921905, 56354728682, 2083305039329, 85359151883807, 3668360225964372, 172327571468441677, 9129692927601444509, 538479555157016784354, 32838123171650422401085 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
MATHEMATICA
seq[n_] := (v = {1, 1}; For[i = 3, i <= n, ++i, AppendTo[v, Prime[i - 1]*v[[i - 1]] - v[[i - 2]]]]; v) (* Jon Maiga, Nov 09 2018 *)
PROG
(PARI) seq(n)={my(v=vector(n)); v[1]=v[2]=1; for(n=3, n, v[n]=prime(n-1)*v[n-1] - v[n-2]); v} \\ Andrew Howroyd, Nov 08 2018
(Magma) [n le 2 select 1 else NthPrime(n-1)*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Oct 12 2022
(SageMath)
@CachedFunction # a = A146887
def a(n): return 1 if (n<2) else nth_prime(n)*a(n-1) - a(n-2)
[a(n) for n in range(31)] # G. C. Greubel, Oct 12 2022
CROSSREFS
Sequence in context: A006155 A121870 A268450 * A173498 A113662 A352326
KEYWORD
nonn,easy,less
AUTHOR
Roger L. Bagula, Nov 02 2008
EXTENSIONS
Edited and simpler name by Jon Maiga and Andrew Howroyd, Nov 08 2018
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 7 00:25 EDT 2024. Contains 372298 sequences. (Running on oeis4.)