OFFSET
0,2
COMMENTS
LINKS
National Science Teachers Association, Quantum CyberTeaser Archive #B205, May/June 1997
EXAMPLE
a(4)=18=3+2+7+3+3 is the time required to cross the bridge for a boy, his sister, his father and his mother if they require 2,3,5,7 minutes, respectively, to cross the bridge individually (using the moves B+G,B,M+F,G,B+G).
PROG
(PARI)
BRIDGE( a )={ local( s=vector(#a), t ); vector( #a, n, t=vecsort( vecextract( a, 2^n-1 )); t[n]+if( n>3, t[1]+2*t[2]+BRIDGE( vecextract( t, 2^(n-2)-1 ))[n-2], if(n==3, t[1]+t[2] ))) }
A147673 = BRIDGE( vector( 20, n, prime(n)))
(PARI)
a=[2, 3, 10]; for( n=4, 90, a=concat(a, a[n-2]+prime(n)+8)); a
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
M. F. Hasler, Nov 10 2008
STATUS
approved