|
| |
|
|
A019460
|
|
Add 1, multiply by 1, add 2, multiply by 2, etc.
|
|
6
|
|
|
|
2, 3, 3, 5, 10, 13, 39, 43, 172, 177, 885, 891, 5346, 5353, 37471, 37479, 299832, 299841, 2698569, 2698579, 26985790, 26985801, 296843811, 296843823, 3562125876, 3562125889, 46307636557, 46307636571, 648306911994
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
|
OFFSET
|
0,1
|
|
|
COMMENTS
|
After a(7)=43, the next prime in the sequence is a(649) with 676 digits.- M. F. Hasler, Jan 12 2011
|
|
|
REFERENCES
|
New York Times, Oct 13, 1996.
|
|
|
LINKS
|
Table of n, a(n) for n=0..28.
Nick Hobson, Python program for this sequence
|
|
|
FORMULA
|
a(2n) = 2(A000522(n) + n!) - n - 2
a(2n+1) = 2(A000522(n) + n!) - 1
Recursive: a(0) = 2, a(n) = ( 1 + floor((n-1)/2) - ceil((n-1)/2) ) * ( a(n-1) + (n+2)/2 ) + ( ceil((n-1)/2) - floor((n-1)/2) ) * ( (n/2)*a(n-1) ). - Wesley Ivan Hurt, Jan 12 2013
|
|
|
MATHEMATICA
|
a[n_] := If[ OddQ@n, a[n - 1] + (n + 1)/2, a[n - 1]*n/2]; a[0] = 2; Table[ a@n, {n, 0, 28}] (* Robert G. Wilson v, Jul 21 2009 *)
|
|
|
PROG
|
A019460(n)=2*(A000522(n\2)+(n\2)!)-if(bittest(n, 0), 1, n\2+2)
/* For producing the terms in increasing order, the following 'hack' can be used M. F. Hasler, Jan 12 2011 */
lastn=0; an1=1; A000522(n)={ an1=if(n, n==lastn & return(an1); n==lastn+1|error(); an1*lastn=n)+1 }
|
|
|
CROSSREFS
|
Cf. A019463, A019462, A019461, A082448.
Sequence in context: A065460 A175147 A001180 * A049855 A064339 A174010
Adjacent sequences: A019457 A019458 A019459 * A019461 A019462 A019463
|
|
|
KEYWORD
|
nonn,easy
|
|
|
AUTHOR
|
N. J. A. Sloane.
|
|
|
EXTENSIONS
|
Added one more term and the Mathematica coding - Robert G. Wilson v, Jul 21 2009
Formula provided by Nathaniel Johnston, Nov 11 2010
Double-checked formula and added PARI code - M. F. Hasler, Nov 12 2010
|
|
|
STATUS
|
approved
|
| |
|
|