[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Revision History for A033556 (Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
a(n+1) = 2a(n) - {largest prime < a(n)}.
(history; published version)
#24 by N. J. A. Sloane at Sun Oct 22 01:34:55 EDT 2017
STATUS

reviewed

approved

#23 by G. C. Greubel at Sat Oct 21 23:06:31 EDT 2017
STATUS

proposed

reviewed

#22 by Iain Fox at Sat Oct 21 17:49:19 EDT 2017
STATUS

editing

proposed

Discussion
Sat Oct 21
18:15
David A. Corneth: Leave it as is, it's fine.
#21 by Iain Fox at Sat Oct 21 17:47:21 EDT 2017
PROG

(PARI) a(n) = if(n==0, return(3), return(, 2*a(n-1)-precprime(a(n-1)-1))) \\ Iain Fox, Oct 18 2017

STATUS

proposed

editing

Discussion
Sat Oct 21
17:48
Iain Fox: Since my PARI code is much slower, should I get rid of it or make a note next to it noting its lack of efficiency.
#20 by David A. Corneth at Wed Oct 18 17:05:05 EDT 2017
STATUS

editing

proposed

#19 by David A. Corneth at Wed Oct 18 17:03:05 EDT 2017
PROG

(PARI) first(n) = my(res = vector(n)); res[1] = 3; for(i = 2, n, res[i] = 2 * res[i - 1] - precprime(res[i - 1] - 1)); res \\ David A. Corneth, Oct 18 2017

Discussion
Wed Oct 18
17:03
David A. Corneth: Let's save ourselves a lot of calls of a(n).
#18 by David A. Corneth at Wed Oct 18 16:59:29 EDT 2017
CROSSREFS
STATUS

proposed

editing

#17 by Michel Marcus at Wed Oct 18 16:55:18 EDT 2017
STATUS

editing

proposed

#16 by Michel Marcus at Wed Oct 18 16:54:08 EDT 2017
PROG

(PARI) a(n) = if(n==0, return(3), return(2*a(n-1)-precprime(a(n-1)-1))) \\_ _Iain Fox_, Oct 18 2017

STATUS

reviewed

editing

Discussion
Wed Oct 18
16:55
Michel Marcus: could also be a(n) = if(n==0, 3, 2*a(n-1)-precprime(a(n-1)-1)) without the returns
#15 by Andrey Zabolotskiy at Wed Oct 18 16:11:35 EDT 2017
STATUS

proposed

reviewed